Guest User

Untitled

a guest
Jul 21st, 2021
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 10.09 KB | None | 0 0
  1. ubuntu@ubuntu:~$ sudo -i
  2. root@ubuntu:~# apt-get update
  3. Ign:1 cdrom://Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1) focal InRelease
  4. Hit:2 cdrom://Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1) focal Release
  5. Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
  6. Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  7. Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
  8. Reading package lists... Done
  9. root@ubuntu:~# apt-get install lvm2 mdadm
  10. Reading package lists... Done
  11. Building dependency tree      
  12. Reading state information... Done
  13. lvm2 is already the newest version (2.03.07-1ubuntu1).
  14. Suggested packages:
  15.   default-mta | mail-transport-agent dracut-core
  16. The following NEW packages will be installed:
  17.   mdadm
  18. 0 upgraded, 1 newly installed, 0 to remove and 327 not upgraded.
  19. Need to get 417 kB of archives.
  20. After this operation, 1,255 kB of additional disk space will be used.
  21. Do you want to continue? [Y/n] y
  22. Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 mdadm amd64 4.1-5ubuntu1.2 [417 kB]
  23. Fetched 417 kB in 0s (6,482 kB/s)
  24. Preconfiguring packages ...
  25. Selecting previously unselected package mdadm.
  26. (Reading database ... 189770 files and directories currently installed.)
  27. Preparing to unpack .../mdadm_4.1-5ubuntu1.2_amd64.deb ...
  28. Unpacking mdadm (4.1-5ubuntu1.2) ...
  29. Setting up mdadm (4.1-5ubuntu1.2) ...
  30. Generating mdadm.conf... done.
  31. update-initramfs is disabled since running on read-only media
  32. /usr/sbin/grub-probe: error: failed to get canonical path of `/cow'.
  33. Created symlink /etc/systemd/system/mdmonitor.service.wants/mdcheck_continue.timer → /lib/systemd/system/mdcheck_continue.timer.
  34. Created symlink /etc/systemd/system/mdmonitor.service.wants/mdcheck_start.timer → /lib/systemd/system/mdcheck_start.timer.
  35. Created symlink /etc/systemd/system/mdmonitor.service.wants/mdmonitor-oneshot.timer → /lib/systemd/system/mdmonitor-oneshot.timer.
  36. Processing triggers for man-db (2.9.1-1) ...
  37. root@ubuntu:~# fdisk -f
  38. fdisk: invalid option -- 'f'
  39. Try 'fdisk --help' for more information.
  40. root@ubuntu:~# fdisk -l
  41. Disk /dev/loop0: 1.99 GiB, 2109763584 bytes, 4120632 sectors
  42. Units: sectors of 1 * 512 = 512 bytes
  43. Sector size (logical/physical): 512 bytes / 512 bytes
  44. I/O size (minimum/optimal): 512 bytes / 512 bytes
  45.  
  46.  
  47. Disk /dev/loop1: 31.9 MiB, 32595968 bytes, 63664 sectors
  48. Units: sectors of 1 * 512 = 512 bytes
  49. Sector size (logical/physical): 512 bytes / 512 bytes
  50. I/O size (minimum/optimal): 512 bytes / 512 bytes
  51.  
  52.  
  53. Disk /dev/loop2: 55.48 MiB, 58159104 bytes, 113592 sectors
  54. Units: sectors of 1 * 512 = 512 bytes
  55. Sector size (logical/physical): 512 bytes / 512 bytes
  56. I/O size (minimum/optimal): 512 bytes / 512 bytes
  57.  
  58.  
  59. Disk /dev/loop3: 218.102 MiB, 229629952 bytes, 448496 sectors
  60. Units: sectors of 1 * 512 = 512 bytes
  61. Sector size (logical/physical): 512 bytes / 512 bytes
  62. I/O size (minimum/optimal): 512 bytes / 512 bytes
  63.  
  64.  
  65. Disk /dev/loop4: 64.79 MiB, 67915776 bytes, 132648 sectors
  66. Units: sectors of 1 * 512 = 512 bytes
  67. Sector size (logical/physical): 512 bytes / 512 bytes
  68. I/O size (minimum/optimal): 512 bytes / 512 bytes
  69.  
  70.  
  71. Disk /dev/loop5: 51.4 MiB, 53522432 bytes, 104536 sectors
  72. Units: sectors of 1 * 512 = 512 bytes
  73. Sector size (logical/physical): 512 bytes / 512 bytes
  74. I/O size (minimum/optimal): 512 bytes / 512 bytes
  75.  
  76.  
  77. Disk /dev/sda: 9.1 TiB, 10000831348736 bytes, 19532873728 sectors
  78. Disk model: WDC WD100EZAZ-11
  79. Units: sectors of 1 * 512 = 512 bytes
  80. Sector size (logical/physical): 512 bytes / 4096 bytes
  81. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  82. Disklabel type: gpt
  83. Disk identifier: B9F2626E-F015-42A8-829F-BFDFC91A88DF
  84.  
  85. Device       Start         End     Sectors  Size Type
  86. /dev/sda1     2048     4982527     4980480  2.4G Linux RAID
  87. /dev/sda2  4982528     9176831     4194304    2G Linux RAID
  88. /dev/sda5  9453280 19532653343 19523200064  9.1T Linux RAID
  89.  
  90.  
  91.  
  92.  
  93. Disk /dev/sdb: 14.94 GiB, 16013852672 bytes, 31277056 sectors
  94. Disk model: TF10            
  95. Units: sectors of 1 * 512 = 512 bytes
  96. Sector size (logical/physical): 512 bytes / 512 bytes
  97. I/O size (minimum/optimal): 512 bytes / 512 bytes
  98. Disklabel type: gpt
  99. Disk identifier: 1A826E20-5822-40F2-8AA1-EAF0220CD13A
  100.  
  101. Device     Start      End  Sectors  Size Type
  102. /dev/sdb1   2048 31277022 31274975 14.9G Microsoft basic data
  103. root@ubuntu:~# fdisk -l
  104. Disk /dev/loop0: 1.99 GiB, 2109763584 bytes, 4120632 sectors
  105. Units: sectors of 1 * 512 = 512 bytes
  106. Sector size (logical/physical): 512 bytes / 512 bytes
  107. I/O size (minimum/optimal): 512 bytes / 512 bytes
  108.  
  109.  
  110. Disk /dev/loop1: 31.9 MiB, 32595968 bytes, 63664 sectors
  111. Units: sectors of 1 * 512 = 512 bytes
  112. Sector size (logical/physical): 512 bytes / 512 bytes
  113. I/O size (minimum/optimal): 512 bytes / 512 bytes
  114.  
  115.  
  116. Disk /dev/loop2: 55.48 MiB, 58159104 bytes, 113592 sectors
  117. Units: sectors of 1 * 512 = 512 bytes
  118. Sector size (logical/physical): 512 bytes / 512 bytes
  119. I/O size (minimum/optimal): 512 bytes / 512 bytes
  120.  
  121.  
  122. Disk /dev/loop3: 218.102 MiB, 229629952 bytes, 448496 sectors
  123. Units: sectors of 1 * 512 = 512 bytes
  124. Sector size (logical/physical): 512 bytes / 512 bytes
  125. I/O size (minimum/optimal): 512 bytes / 512 bytes
  126.  
  127.  
  128. Disk /dev/loop4: 64.79 MiB, 67915776 bytes, 132648 sectors
  129. Units: sectors of 1 * 512 = 512 bytes
  130. Sector size (logical/physical): 512 bytes / 512 bytes
  131. I/O size (minimum/optimal): 512 bytes / 512 bytes
  132.  
  133.  
  134. Disk /dev/loop5: 51.4 MiB, 53522432 bytes, 104536 sectors
  135. Units: sectors of 1 * 512 = 512 bytes
  136. Sector size (logical/physical): 512 bytes / 512 bytes
  137. I/O size (minimum/optimal): 512 bytes / 512 bytes
  138.  
  139.  
  140. Disk /dev/sda: 9.1 TiB, 10000831348736 bytes, 19532873728 sectors
  141. Disk model: WDC WD100EZAZ-11
  142. Units: sectors of 1 * 512 = 512 bytes
  143. Sector size (logical/physical): 512 bytes / 4096 bytes
  144. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  145. Disklabel type: gpt
  146. Disk identifier: B9F2626E-F015-42A8-829F-BFDFC91A88DF
  147.  
  148. Device       Start         End     Sectors  Size Type
  149. /dev/sda1     2048     4982527     4980480  2.4G Linux RAID
  150. /dev/sda2  4982528     9176831     4194304    2G Linux RAID
  151. /dev/sda5  9453280 19532653343 19523200064  9.1T Linux RAID
  152.  
  153.  
  154.  
  155.  
  156. Disk /dev/sdb: 14.94 GiB, 16013852672 bytes, 31277056 sectors
  157. Disk model: TF10            
  158. Units: sectors of 1 * 512 = 512 bytes
  159. Sector size (logical/physical): 512 bytes / 512 bytes
  160. I/O size (minimum/optimal): 512 bytes / 512 bytes
  161. Disklabel type: gpt
  162. Disk identifier: 1A826E20-5822-40F2-8AA1-EAF0220CD13A
  163.  
  164. Device     Start      End  Sectors  Size Type
  165. /dev/sdb1   2048 31277022 31274975 14.9G Microsoft basic data
  166. root@ubuntu:~# fdisk -l | grep /dev/sd
  167. Disk /dev/sda: 9.1 TiB, 10000831348736 bytes, 19532873728 sectors
  168. /dev/sda1     2048     4982527     4980480  2.4G Linux RAID
  169. /dev/sda2  4982528     9176831     4194304    2G Linux RAID
  170. /dev/sda5  9453280 19532653343 19523200064  9.1T Linux RAID
  171. Disk /dev/sdb: 14.94 GiB, 16013852672 bytes, 31277056 sectors
  172. /dev/sdb1   2048 31277022 31274975 14.9G Microsoft basic data
  173. root@ubuntu:~# mdadm --create /dev/md0 --assume-clean --verbose --level=raid1 --raid-devices=4 missing /dev/sda1
  174. mdadm: You haven't given enough devices (real or missing) to create this array
  175. root@ubuntu:~# mdadm --create /dev/md0 --assume-clean --verbose --level=raid1 --raid-devices=4 /dev/sda1 missing missing missing
  176. mdadm: /dev/sda1 appears to contain an ext2fs file system
  177.        size=2490176K  mtime=Wed Jul 21 09:49:03 2021
  178. mdadm: /dev/sda1 appears to be part of a raid array:
  179.        level=raid1 devices=4 ctime=Sun Dec  8 21:09:22 2019
  180. mdadm: Note: this array has metadata at the start and
  181.     may not be suitable as a boot device.  If you plan to
  182.     store '/boot' on this device please ensure that
  183.     your boot-loader understands md/v1.x metadata, or use
  184.     --metadata=0.90
  185. mdadm: size set to 2487168K
  186. Continue creating array?
  187. Continue creating array? (y/n) y
  188. mdadm: Defaulting to version 1.2 metadata
  189. mdadm: array /dev/md0 started.
  190. root@ubuntu:~# mkdir /mnt/hoi
  191. root@ubuntu:~# mount /dev/md0 /mnt/hoi
  192. mount: /mnt/hoi: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.
  193. root@ubuntu:~# vgchange -ay
  194. root@ubuntu:~# vgchange -ay -v
  195.   No volume groups found.
  196. root@ubuntu:~# lvm lvscan
  197. root@ubuntu:~# partprobe
  198. root@ubuntu:~# vgscan
  199. root@ubuntu:~# vgchange -ay
  200. root@ubuntu:~# parted /dev/sda print
  201. Model: ATA WDC WD100EZAZ-11 (scsi)
  202. Disk /dev/sda: 10.0TB
  203. Sector size (logical/physical): 512B/4096B
  204. Partition Table: gpt
  205. Disk Flags:
  206.  
  207. Number  Start   End     Size    File system     Name  Flags
  208.  1      1049kB  2551MB  2550MB  ext4                  raid
  209.  2      2551MB  4699MB  2147MB  linux-swap(v1)        raid
  210.  5      4840MB  10.0TB  9996GB                        raid
  211.  
  212. root@ubuntu:~# mdadm --examine /dev/m
  213. mapper/ mcelog  md0     md2     mei0    mem     mqueue/
  214. root@ubuntu:~# mdadm --examine /dev/m
  215. mapper/ mcelog  md0     md2     mei0    mem     mqueue/
  216. root@ubuntu:~# mdadm --examine /dev/m
  217. mapper/ mcelog  md0     md2     mei0    mem     mqueue/
  218. root@ubuntu:~# mdadm --examine /dev/md0
  219. mdadm: No md superblock detected on /dev/md0.
  220. root@ubuntu:~# mdadm --examine /dev/sda1
  221. /dev/sda1:
  222.           Magic : a92b4efc
  223.         Version : 1.2
  224.     Feature Map : 0x0
  225.      Array UUID : bd0f783a:8d107f67:157b3d9b:9b274067
  226.            Name : ubuntu:0  (local to host ubuntu)
  227.   Creation Time : Wed Jul 21 11:34:03 2021
  228.      Raid Level : raid1
  229.    Raid Devices : 4
  230.  
  231.  Avail Dev Size : 4974336 (2.37 GiB 2.55 GB)
  232.      Array Size : 2487168 (2.37 GiB 2.55 GB)
  233.     Data Offset : 6144 sectors
  234.    Super Offset : 8 sectors
  235.    Unused Space : before=6064 sectors, after=0 sectors
  236.           State : clean
  237.     Device UUID : 3e914f84:6f395c5b:8779c962:e03874b9
  238.  
  239.     Update Time : Wed Jul 21 11:34:03 2021
  240.   Bad Block Log : 512 entries available at offset 16 sectors
  241.        Checksum : aac859ed - correct
  242.          Events : 0
  243.  
  244.  
  245.    Device Role : Active device 0
  246.    Array State : A... ('A' == active, '.' == missing, 'R' == replacing)
  247. root@ubuntu:~# pvscan
  248.   No matching physical volumes found
  249. root@ubuntu:~# lvdisplay vg1
  250.   Volume group "vg1" not found
  251.   Cannot process volume group vg1
Advertisement
Add Comment
Please, Sign In to add comment