Guest User

Untitled

a guest
Jan 21st, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.90 KB | None | 0 0
  1. root@rescue ~ # sfdisk -d /dev/sdb | sfdisk /dev/sda
  2. Checking that no-one is using this disk right now ...
  3. Warning: extended partition does not start at a cylinder boundary.
  4. DOS and Linux will interpret the contents differently.
  5. OK
  6.  
  7. Disk /dev/sda: 364801 cylinders, 255 heads, 63 sectors/track
  8.  
  9. sfdisk: ERROR: sector 0 does not have an msdos signature
  10. /dev/sda: unrecognized partition table type
  11. Old situation:
  12. No partitions found
  13. New situation:
  14. Units = sectors of 512 bytes, counting from 0
  15.  
  16. Device Boot Start End #sectors Id System
  17. /dev/sda1 2048 16779264 16777217 fd Linux raid autodetect
  18. /dev/sda2 16781312 17829888 1048577 fd Linux raid autodetect
  19. /dev/sda3 17831936 2165315584 2147483649 fd Linux raid autodetect
  20. /dev/sda4 2165317632 5860533167 3695215536 f W95 Ext'd (LBA)
  21. /dev/sda5 2165319680 5860531120 3695211441 fd Linux raid autodetect
  22. Warning: partition 1 does not end at a cylinder boundary
  23. Warning: partition 2 does not start at a cylinder boundary
  24. Warning: partition 2 does not end at a cylinder boundary
  25. Warning: partition 3 does not start at a cylinder boundary
  26. Warning: partition 3 does not end at a cylinder boundary
  27. Warning: partition 4 does not start at a cylinder boundary
  28. Warning: partition 4 does not end at a cylinder boundary
  29. Warning: partition 5 does not end at a cylinder boundary
  30. Warning: no primary partition is marked bootable (active)
  31. This does not matter for LILO, but the DOS MBR will not boot this disk.
  32. Successfully wrote the new partition table
  33.  
  34. Re-reading the partition table ...
  35.  
  36. If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
  37. to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
  38. (See fdisk(8).)
  39. root@rescue ~ # fdisk -l
  40.  
  41. Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
  42. 255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
  43. Units = sectors of 1 * 512 = 512 bytes
  44. Sector size (logical/physical): 512 bytes / 4096 bytes
  45. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  46. Disk identifier: 0x55555555
  47.  
  48. Device Boot Start End Blocks Id System
  49. /dev/sda1 2048 16779264 8388608+ fd Linux raid autodetect
  50. /dev/sda2 16781312 17829888 524288+ fd Linux raid autodetect
  51. /dev/sda3 17831936 2165315584 1073741824+ fd Linux raid autodetect
  52. /dev/sda4 2165317632 5860533167 1847607768 f W95 Ext'd (LBA)
  53. /dev/sda5 2165319680 5860531120 1847605720+ fd Linux raid autodetect
  54.  
  55. Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
  56. 255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
  57. Units = sectors of 1 * 512 = 512 bytes
  58. Sector size (logical/physical): 512 bytes / 4096 bytes
  59. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  60. Disk identifier: 0x0006abe2
  61.  
  62. Device Boot Start End Blocks Id System
  63. /dev/sdb1 2048 16779264 8388608+ fd Linux raid autodetect
  64. /dev/sdb2 16781312 17829888 524288+ fd Linux raid autodetect
  65. /dev/sdb3 17831936 2165315584 1073741824+ fd Linux raid autodetect
  66. /dev/sdb4 2165317632 5860533167 1847607768 f W95 Ext'd (LBA)
  67. /dev/sdb5 2165319680 5860531120 1847605720+ fd Linux raid autodetect
  68.  
  69. Disk /dev/md0: 8589 MB, 8589869056 bytes
  70. 2 heads, 4 sectors/track, 2097136 cylinders, total 16777088 sectors
  71. Units = sectors of 1 * 512 = 512 bytes
  72. Sector size (logical/physical): 512 bytes / 4096 bytes
  73. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  74. Disk identifier: 0x00000000
  75. Disk /dev/md0 doesn't contain a valid partition table
  76. Disk /dev/md1: 536 MB, 536805376 bytes
  77. 2 heads, 4 sectors/track, 131056 cylinders, total 1048448 sectors
  78. Units = sectors of 1 * 512 = 512 bytes
  79. Sector size (logical/physical): 512 bytes / 4096 bytes
  80. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  81. Disk identifier: 0x00000000
  82. Disk /dev/md1 doesn't contain a valid partition table
  83. Disk /dev/md2: 1099.5 GB, 1099511431168 bytes
  84. 2 heads, 4 sectors/track, 268435408 cylinders, total 2147483264 sectors
  85. Units = sectors of 1 * 512 = 512 bytes
  86. Sector size (logical/physical): 512 bytes / 4096 bytes
  87. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  88. Disk identifier: 0x00000000
  89. Disk /dev/md2 doesn't contain a valid partition table
  90. Disk /dev/md3: 1891.9 GB, 1891948101632 bytes
  91. 2 heads, 4 sectors/track, 461901392 cylinders, total 3695211136 sectors
  92. Units = sectors of 1 * 512 = 512 bytes
  93. Sector size (logical/physical): 512 bytes / 4096 bytes
  94. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  95. Disk identifier: 0x00000000
  96. Disk /dev/md3 doesn't contain a valid partition table
  97.  
  98. root@rescue ~ # dd if=/dev/sdb of=sdb.part bs=1024k count=1
  99. 1+0 records in
  100. 1+0 records out
  101. 1048576 bytes (1.0 MB) copied, 0.0158913 s, 66.0 MB/s
  102.  
  103. root@rescue ~ # dd if=sdb.part of=/dev/sda bs=1024k count=1
  104. 1+0 records in
  105. 1+0 records out
  106. 1048576 bytes (1.0 MB) copied, 0.00358636 s, 292 MB/s
  107.  
  108. root@rescue ~ # cat /proc/mdstat
  109. Personalities : [raid1]
  110. md3 : active raid1 sdb5[2]
  111. 1847605568 blocks super 1.0 [2/1] [_U]
  112.  
  113. md2 : active raid1 sdb3[2]
  114. 1073741632 blocks super 1.0 [2/1] [_U]
  115.  
  116. md1 : active raid1 sdb2[2]
  117. 524224 blocks super 1.0 [2/1] [_U]
  118.  
  119. md0 : active raid1 sdb1[2]
  120. 8388544 blocks super 1.0 [2/1] [_U]
  121.  
  122. unused devices: <none>
  123.  
  124. root@rescue ~ # mdadm –manage /dev/md0 –add /dev/sda1
  125. mdadm: An option must be given to set the mode before a second device
  126. (/dev/md0) is listed
  127.  
  128. mdadm /dev/md0 -a /dev/sda1
  129.  
  130. mdadm –manage /dev/md0 –add /dev/sda1
  131.  
  132. root@rescue ~ # cat /proc/mdstat
  133. Personalities : [raid1]
  134. md3 : active raid1 sda5[3] sdb5[2]
  135. 1847605568 blocks super 1.0 [2/1] [_U]
  136. resync=DELAYED
  137.  
  138. md2 : active raid1 sda3[3] sdb3[2]
  139. 1073741632 blocks super 1.0 [2/1] [_U]
  140. [>....................] recovery = 4.8% (52262208/1073741632) finish=88.1min speed=193162K/sec
  141.  
  142. md1 : active raid1 sda2[3] sdb2[2]
  143. 524224 blocks super 1.0 [2/2] [UU]
  144.  
  145. md0 : active raid1 sda1[3] sdb1[2]
  146. 8388544 blocks super 1.0 [2/2] [UU]
  147.  
  148. unused devices: <none>
Add Comment
Please, Sign In to add comment