[opensuse] create md RAID1 from old HD's ordinary partition with data plus new virgin HD's empty 0xFD partition
Before starting, I looked in /usr/share/doc/manual/opensuse-manuals_en/manual/sec.yast2.system.raid.html and http://www.linuxmanpages.com/man8/mdadm.8.php and http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/ and http://tr.opensuse.org/SDB:Migration_to_Linux_Software_RAID and elsewhere without finding any example of doing what I am trying to do. I want to make /dev/md7 out of sdb14 which is formatted EXT3 and is 86% full of data, plus sda14, which is identically partitioned but virgin space on a brand new HD replacing the old sda. I've already rebuilt /dev/md[0-7]. sdb14 was originally created using the excess of sdb's size over the size of the old sda. On 11.4, I tried using YaST2 to do this, but it won't let me initialize md7 with only the old partition, and I see no clear indication that my data on sdb14 won't be eradicated by initially combining it with sda14 to create md7. So I tried on cmdline instead of YaST2: mdadm --create --verbose /dev/md7 --level=1 /dev/sdb14 missing but that gives an error "mdadm: no raid-devices specified". I tried: mdadm --create --verbose --force -n1 /dev/md7 --level=1 /dev/sdb14 but this gives a warning: mdadm: /dev/sdb14 appears to contain an ext2fs file system size=156280288K mtime=Fri Apr 15 17:42:57 2011 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 156579192K Continue creating array? The size disparity between the two size numbers, and lack of mention of the significance of the existing filesystem, has me worried what would happen if I answered yes. Without really thinking about the --create results, I did: mdadm --build --verbose --force -n1 /dev/md7 --level=1 /dev/sdb14 The result was "mdadm: array /dev/md7 built and started." Fsck says /dev/md7 is clean. Mounted, things seemed to be OK, but /proc/mdstat shows differently for md7 than for others: md7 : active raid1 sdb14[0] 156280288 blocks super non-persistent [1/1] [U] md6 : active raid1 sda13[2] sdb13[1] 78140056 blocks super 1.0 [2/2] [UU] bitmap: 0/150 pages [0KB], 256KB chunk md5 : active raid1 sda12[2] sdb12[1] 1036148 blocks super 1.0 [2/2] [UU] bitmap: 0/8 pages [0KB], 64KB chunk md4 : active raid1 sda11[2] sdb11[1] 28362652 blocks super 1.0 [2/2] [UU] bitmap: 0/217 pages [0KB], 64KB chunk Before adding sda14 to md7 with mdadm, does anyone have any comments or advice that might prevent needing to restore sdb14's content from backup? -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata wrote:
I want to make /dev/md7 out of sdb14 which is formatted EXT3 and is 86% full of data, plus sda14, which is identically partitioned but virgin space on a brand new HD replacing the old sda. I've already rebuilt /dev/md[0-7]. sdb14 was originally created using the excess of sdb's size over the size of the old sda.
On 11.4, I tried using YaST2 to do this, but it won't let me initialize md7 with only the old partition, and I see no clear indication that my data on sdb14 won't be eradicated by initially combining it with sda14 to create md7. [snip]
Without really thinking about the --create results, I did:
mdadm --build --verbose --force -n1 /dev/md7 --level=1 /dev/sdb14
The result was "mdadm: array /dev/md7 built and started."
Fsck says /dev/md7 is clean. Mounted, things seemed to be OK, but /proc/mdstat shows differently for md7 than for others:
md7 : active raid1 sdb14[0] 156280288 blocks super non-persistent [1/1] [U]
One issue might be that sdb14 doesn't have a superblock. --build is some sort of special option that doesn't create persistent superblocks, I don't think I've ever used it. -- Per Jessen, Zürich (6.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/15 22:21 (GMT-0400) Felix Miata composed:
Before starting, I looked in /usr/share/doc/manual/opensuse-manuals_en/manual/sec.yast2.system.raid.html and http://www.linuxmanpages.com/man8/mdadm.8.php and http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/ and http://tr.opensuse.org/SDB:Migration_to_Linux_Software_RAID and elsewhere without finding any example of doing what I am trying to do.
I want to make /dev/md7 out of sdb14 which is formatted EXT3 and is 86% full of data, plus sda14, which is identically partitioned but virgin space on a brand new HD replacing the old sda. I've already rebuilt /dev/md[0-7]. sdb14 was originally created using the excess of sdb's size over the size of the old sda.
On 11.4, I tried using YaST2 to do this, but it won't let me initialize md7 with only the old partition, and I see no clear indication that my data on sdb14 won't be eradicated by initially combining it with sda14 to create md7.
So I tried on cmdline instead of YaST2:
mdadm --create --verbose /dev/md7 --level=1 /dev/sdb14 missing
but that gives an error "mdadm: no raid-devices specified".
I tried:
mdadm --create --verbose --force -n1 /dev/md7 --level=1 /dev/sdb14
but this gives a warning:
mdadm: /dev/sdb14 appears to contain an ext2fs file system size=156280288K mtime=Fri Apr 15 17:42:57 2011 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 156579192K Continue creating array?
The size disparity between the two size numbers, and lack of mention of the significance of the existing filesystem, has me worried what would happen if I answered yes.
Without really thinking about the --create results, I did:
mdadm --build --verbose --force -n1 /dev/md7 --level=1 /dev/sdb14
The result was "mdadm: array /dev/md7 built and started."
Fsck says /dev/md7 is clean. Mounted, things seemed to be OK, but /proc/mdstat shows differently for md7 than for others:
md7 : active raid1 sdb14[0] 156280288 blocks super non-persistent [1/1] [U]
md6 : active raid1 sda13[2] sdb13[1] 78140056 blocks super 1.0 [2/2] [UU] bitmap: 0/150 pages [0KB], 256KB chunk
md5 : active raid1 sda12[2] sdb12[1] 1036148 blocks super 1.0 [2/2] [UU] bitmap: 0/8 pages [0KB], 64KB chunk
md4 : active raid1 sda11[2] sdb11[1] 28362652 blocks super 1.0 [2/2] [UU] bitmap: 0/217 pages [0KB], 64KB chunk
Before adding sda14 to md7 with mdadm, does anyone have any comments or advice that might prevent needing to restore sdb14's content from backup?
Ping. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata wrote: [snip]
Before adding sda14 to md7 with mdadm, does anyone have any comments or advice that might prevent needing to restore sdb14's content from backup?
Ping.
Pong - like I tried to hint four days ago, I think you ought to investigate how the --build option really works and how you create persistent superblocks. -- Per Jessen, Zürich (11.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2011/04/20 09:21 (GMT+0200) Per Jessen composed:
Felix Miata wrote:
Before adding sda14 to md7 with mdadm, does anyone have any comments or advice that might prevent needing to restore sdb14's content from backup?
Ping.
Pong - like I tried to hint four days ago, I think you ought to investigate how the --build option really works and how you create persistent superblocks.
Your previous reply coupled to this reply constitutes about an equal number or words to what the mdadm man page has to say about build, which is to say little better than useless. The man page ends with these words: "the Build mode should only be used together with a complete understanding of what you are doing". Investigate how and where? Why should any ordinary user trying to replace a disk with the only kind available, bigger, even care what a persistent superblock is? No ordinary user should need to understand any more than how to use YaST2 and/or mdadm to couple an old partition to a new blank space on a replacement disk to create another raid1 device. It seems just too basic & common a job to do. But such I was unable to find, and why I started the thread. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata wrote:
On 2011/04/20 09:21 (GMT+0200) Per Jessen composed:
Felix Miata wrote:
Before adding sda14 to md7 with mdadm, does anyone have any comments or advice that might prevent needing to restore sdb14's content from backup?
Ping.
Pong - like I tried to hint four days ago, I think you ought to investigate how the --build option really works and how you create persistent superblocks.
Your previous reply coupled to this reply constitutes about an equal number or words to what the mdadm man page has to say about build, which is to say little better than useless. The man page ends with these words: "the Build mode should only be used together with a complete understanding of what you are doing". Investigate how and where?
Google, the linux-raid mailing list and perhaps even the source code. Unfortunately it doesn't look like the --build option is used very much.
Why should any ordinary user trying to replace a disk with the only kind available, bigger, even care what a persistent superblock is?
A user that is confident enough to use mdadm --build ought to know what a persistent superblock is. I'm not sure "ordinary" is quite the right word here.
No ordinary user should need to understand any more than how to use YaST2 and/or mdadm to couple an old partition to a new blank space on a replacement disk to create another raid1 device. It seems just too basic & common a job to do.
I think it's neither basic nor very common to want to create a new RAID device based on data on an existing non-RAID drive. Just my opinion of course. My _guess_ is that you can go ahead and add sda14 to md7 without problems, but without a persistent superblock, it can't be used for booting from. -- Per Jessen, Zürich (12.6°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 4/20/2011 4:00 AM, Per Jessen wrote:
Felix Miata wrote:
On 2011/04/20 09:21 (GMT+0200) Per Jessen composed:
Felix Miata wrote:
Before adding sda14 to md7 with mdadm, does anyone have any comments or advice that might prevent needing to restore sdb14's content from backup?
Ping.
Pong - like I tried to hint four days ago, I think you ought to investigate how the --build option really works and how you create persistent superblocks.
Your previous reply coupled to this reply constitutes about an equal number or words to what the mdadm man page has to say about build, which is to say little better than useless. The man page ends with these words: "the Build mode should only be used together with a complete understanding of what you are doing". Investigate how and where?
Google, the linux-raid mailing list and perhaps even the source code. Unfortunately it doesn't look like the --build option is used very much.
Why should any ordinary user trying to replace a disk with the only kind available, bigger, even care what a persistent superblock is?
A user that is confident enough to use mdadm --build ought to know what a persistent superblock is. I'm not sure "ordinary" is quite the right word here.
No ordinary user should need to understand any more than how to use YaST2 and/or mdadm to couple an old partition to a new blank space on a replacement disk to create another raid1 device. It seems just too basic& common a job to do.
I think it's neither basic nor very common to want to create a new RAID device based on data on an existing non-RAID drive. Just my opinion of course.
My _guess_ is that you can go ahead and add sda14 to md7 without problems, but without a persistent superblock, it can't be used for booting from.
I was going to say "what happened when you tried it?" As in, why not just try some experiments with small ramdisks? You can create virtual block devices, and mdadm them into arrays, slice, dice, fail, rebuild, remove, re-add, etc all you like without ever touching a real disk or rebooting or anything. Just be sure to use all clearly distinguisable names for the temp ramdisks and arrays that can't be mistaken for any of your real devices so with all the normally dangerous commands you'll be using so many times in such a short while you aren't at unnecessary risk of zapping any real disks or filesystems. Then you will know for sure what a given command will do before you have to do it on the real disks. Iv'e done some weird repairs on software raid arrays and I don't think I've ever used --build either so I can't simply say what exactly it does or whether you want it or something else either. -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Brian K. White
-
Felix Miata
-
Per Jessen