Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ubuntu@ubuntu:~$ sudo -i
- root@ubuntu:~# apt-get update
- Ign:1 cdrom://Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1) focal InRelease
- Hit:2 cdrom://Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1) focal Release
- Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
- Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
- Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
- Reading package lists... Done
- root@ubuntu:~# apt-get install lvm2 mdadm
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- lvm2 is already the newest version (2.03.07-1ubuntu1).
- Suggested packages:
- default-mta | mail-transport-agent dracut-core
- The following NEW packages will be installed:
- mdadm
- 0 upgraded, 1 newly installed, 0 to remove and 327 not upgraded.
- Need to get 417 kB of archives.
- After this operation, 1,255 kB of additional disk space will be used.
- Do you want to continue? [Y/n] y
- Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 mdadm amd64 4.1-5ubuntu1.2 [417 kB]
- Fetched 417 kB in 0s (6,482 kB/s)
- Preconfiguring packages ...
- Selecting previously unselected package mdadm.
- (Reading database ... 189770 files and directories currently installed.)
- Preparing to unpack .../mdadm_4.1-5ubuntu1.2_amd64.deb ...
- Unpacking mdadm (4.1-5ubuntu1.2) ...
- Setting up mdadm (4.1-5ubuntu1.2) ...
- Generating mdadm.conf... done.
- update-initramfs is disabled since running on read-only media
- /usr/sbin/grub-probe: error: failed to get canonical path of `/cow'.
- Created symlink /etc/systemd/system/mdmonitor.service.wants/mdcheck_continue.timer → /lib/systemd/system/mdcheck_continue.timer.
- Created symlink /etc/systemd/system/mdmonitor.service.wants/mdcheck_start.timer → /lib/systemd/system/mdcheck_start.timer.
- Created symlink /etc/systemd/system/mdmonitor.service.wants/mdmonitor-oneshot.timer → /lib/systemd/system/mdmonitor-oneshot.timer.
- Processing triggers for man-db (2.9.1-1) ...
- root@ubuntu:~# fdisk -f
- fdisk: invalid option -- 'f'
- Try 'fdisk --help' for more information.
- root@ubuntu:~# fdisk -l
- Disk /dev/loop0: 1.99 GiB, 2109763584 bytes, 4120632 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop1: 31.9 MiB, 32595968 bytes, 63664 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop2: 55.48 MiB, 58159104 bytes, 113592 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop3: 218.102 MiB, 229629952 bytes, 448496 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop4: 64.79 MiB, 67915776 bytes, 132648 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop5: 51.4 MiB, 53522432 bytes, 104536 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/sda: 9.1 TiB, 10000831348736 bytes, 19532873728 sectors
- Disk model: WDC WD100EZAZ-11
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disklabel type: gpt
- Disk identifier: B9F2626E-F015-42A8-829F-BFDFC91A88DF
- Device Start End Sectors Size Type
- /dev/sda1 2048 4982527 4980480 2.4G Linux RAID
- /dev/sda2 4982528 9176831 4194304 2G Linux RAID
- /dev/sda5 9453280 19532653343 19523200064 9.1T Linux RAID
- Disk /dev/sdb: 14.94 GiB, 16013852672 bytes, 31277056 sectors
- Disk model: TF10
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disklabel type: gpt
- Disk identifier: 1A826E20-5822-40F2-8AA1-EAF0220CD13A
- Device Start End Sectors Size Type
- /dev/sdb1 2048 31277022 31274975 14.9G Microsoft basic data
- root@ubuntu:~# fdisk -l
- Disk /dev/loop0: 1.99 GiB, 2109763584 bytes, 4120632 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop1: 31.9 MiB, 32595968 bytes, 63664 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop2: 55.48 MiB, 58159104 bytes, 113592 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop3: 218.102 MiB, 229629952 bytes, 448496 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop4: 64.79 MiB, 67915776 bytes, 132648 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/loop5: 51.4 MiB, 53522432 bytes, 104536 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk /dev/sda: 9.1 TiB, 10000831348736 bytes, 19532873728 sectors
- Disk model: WDC WD100EZAZ-11
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 4096 bytes
- I/O size (minimum/optimal): 4096 bytes / 4096 bytes
- Disklabel type: gpt
- Disk identifier: B9F2626E-F015-42A8-829F-BFDFC91A88DF
- Device Start End Sectors Size Type
- /dev/sda1 2048 4982527 4980480 2.4G Linux RAID
- /dev/sda2 4982528 9176831 4194304 2G Linux RAID
- /dev/sda5 9453280 19532653343 19523200064 9.1T Linux RAID
- Disk /dev/sdb: 14.94 GiB, 16013852672 bytes, 31277056 sectors
- Disk model: TF10
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disklabel type: gpt
- Disk identifier: 1A826E20-5822-40F2-8AA1-EAF0220CD13A
- Device Start End Sectors Size Type
- /dev/sdb1 2048 31277022 31274975 14.9G Microsoft basic data
- root@ubuntu:~# fdisk -l | grep /dev/sd
- Disk /dev/sda: 9.1 TiB, 10000831348736 bytes, 19532873728 sectors
- /dev/sda1 2048 4982527 4980480 2.4G Linux RAID
- /dev/sda2 4982528 9176831 4194304 2G Linux RAID
- /dev/sda5 9453280 19532653343 19523200064 9.1T Linux RAID
- Disk /dev/sdb: 14.94 GiB, 16013852672 bytes, 31277056 sectors
- /dev/sdb1 2048 31277022 31274975 14.9G Microsoft basic data
- root@ubuntu:~# mdadm --create /dev/md0 --assume-clean --verbose --level=raid1 --raid-devices=4 missing /dev/sda1
- mdadm: You haven't given enough devices (real or missing) to create this array
- root@ubuntu:~# mdadm --create /dev/md0 --assume-clean --verbose --level=raid1 --raid-devices=4 /dev/sda1 missing missing missing
- mdadm: /dev/sda1 appears to contain an ext2fs file system
- size=2490176K mtime=Wed Jul 21 09:49:03 2021
- mdadm: /dev/sda1 appears to be part of a raid array:
- level=raid1 devices=4 ctime=Sun Dec 8 21:09:22 2019
- mdadm: Note: this array has metadata at the start and
- may not be suitable as a boot device. If you plan to
- store '/boot' on this device please ensure that
- your boot-loader understands md/v1.x metadata, or use
- --metadata=0.90
- mdadm: size set to 2487168K
- Continue creating array?
- Continue creating array? (y/n) y
- mdadm: Defaulting to version 1.2 metadata
- mdadm: array /dev/md0 started.
- root@ubuntu:~# mkdir /mnt/hoi
- root@ubuntu:~# mount /dev/md0 /mnt/hoi
- mount: /mnt/hoi: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.
- root@ubuntu:~# vgchange -ay
- root@ubuntu:~# vgchange -ay -v
- No volume groups found.
- root@ubuntu:~# lvm lvscan
- root@ubuntu:~# partprobe
- root@ubuntu:~# vgscan
- root@ubuntu:~# vgchange -ay
- root@ubuntu:~# parted /dev/sda print
- Model: ATA WDC WD100EZAZ-11 (scsi)
- Disk /dev/sda: 10.0TB
- Sector size (logical/physical): 512B/4096B
- Partition Table: gpt
- Disk Flags:
- Number Start End Size File system Name Flags
- 1 1049kB 2551MB 2550MB ext4 raid
- 2 2551MB 4699MB 2147MB linux-swap(v1) raid
- 5 4840MB 10.0TB 9996GB raid
- root@ubuntu:~# mdadm --examine /dev/m
- mapper/ mcelog md0 md2 mei0 mem mqueue/
- root@ubuntu:~# mdadm --examine /dev/m
- mapper/ mcelog md0 md2 mei0 mem mqueue/
- root@ubuntu:~# mdadm --examine /dev/m
- mapper/ mcelog md0 md2 mei0 mem mqueue/
- root@ubuntu:~# mdadm --examine /dev/md0
- mdadm: No md superblock detected on /dev/md0.
- root@ubuntu:~# mdadm --examine /dev/sda1
- /dev/sda1:
- Magic : a92b4efc
- Version : 1.2
- Feature Map : 0x0
- Array UUID : bd0f783a:8d107f67:157b3d9b:9b274067
- Name : ubuntu:0 (local to host ubuntu)
- Creation Time : Wed Jul 21 11:34:03 2021
- Raid Level : raid1
- Raid Devices : 4
- Avail Dev Size : 4974336 (2.37 GiB 2.55 GB)
- Array Size : 2487168 (2.37 GiB 2.55 GB)
- Data Offset : 6144 sectors
- Super Offset : 8 sectors
- Unused Space : before=6064 sectors, after=0 sectors
- State : clean
- Device UUID : 3e914f84:6f395c5b:8779c962:e03874b9
- Update Time : Wed Jul 21 11:34:03 2021
- Bad Block Log : 512 entries available at offset 16 sectors
- Checksum : aac859ed - correct
- Events : 0
- Device Role : Active device 0
- Array State : A... ('A' == active, '.' == missing, 'R' == replacing)
- root@ubuntu:~# pvscan
- No matching physical volumes found
- root@ubuntu:~# lvdisplay vg1
- Volume group "vg1" not found
- Cannot process volume group vg1
Advertisement
Add Comment
Please, Sign In to add comment