[opensuse] Moving RAID1 to new system
I have moved a RAID1 setup from an 11.0 to a 11.3 system. I want to be sure I do not mess it up. I can access the system if I do: mdadm --auto-detect and then mount it as before. I would prefer to have this happen automatically at boot. If I add these disks in Yast in the partition manager, should I be confident that they will not be formatted or anything? I have no trouble with this using single disks. But I am not sure that might happen for RAID disks. Any help is appreciated. Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Roger Oberholtzer wrote:
I have moved a RAID1 setup from an 11.0 to a 11.3 system. I want to be sure I do not mess it up. I can access the system if I do:
mdadm --auto-detect
and then mount it as before. I would prefer to have this happen automatically at boot.
If you run "mdadm --examine --scan >/etc/mdadm.conf", you'll get the array(s) started at boot-up.
If I add these disks in Yast in the partition manager, should I be confident that they will not be formatted or anything?
Yes. -- Per Jessen, Zürich (7.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2011-01-07 at 16:55 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
I have moved a RAID1 setup from an 11.0 to a 11.3 system. I want to be sure I do not mess it up. I can access the system if I do:
mdadm --auto-detect
and then mount it as before. I would prefer to have this happen automatically at boot.
If you run "mdadm --examine --scan >/etc/mdadm.conf", you'll get the array(s) started at boot-up.
This seems not to work for me. I have the file, which looks like this: ARRAY /dev/md0 UUID=d679bc98:c9dcd593:b738ad98:3a9a198a But the disks are not mounted. When I try to mount by hand, this is still not enough. I need to do "mdadm --auto-detect" before I can mount. I did look at the disks in yast after doing what you suggested, and they do show up there, looking all ready to use. But, alas, they are not mounting automatically to boot. I looked at the file from 11.0 when the disks did mount properly, and the file looked like this: DEVICE partitions ARRAY /dev/md0 level=unknown UUID=d679bc98:c9dcd593:b738ad98:3a9a198a So I tried that file as well. Same thing. Mounting fails until I run "mdadm --auto-detect". I must still be missing something. Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Roger Oberholtzer wrote:
On Fri, 2011-01-07 at 16:55 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
I have moved a RAID1 setup from an 11.0 to a 11.3 system. I want to be sure I do not mess it up. I can access the system if I do:
mdadm --auto-detect
and then mount it as before. I would prefer to have this happen automatically at boot.
If you run "mdadm --examine --scan >/etc/mdadm.conf", you'll get the array(s) started at boot-up.
This seems not to work for me. I have the file, which looks like this:
ARRAY /dev/md0 UUID=d679bc98:c9dcd593:b738ad98:3a9a198a
Yes, that look fine.
But the disks are not mounted. When I try to mount by hand, this is still not enough. I need to do "mdadm --auto-detect" before I can mount.
Before you do the auto-detect, what does /proc/mdstat say? I'm guessing it is empty.
I looked at the file from 11.0 when the disks did mount properly, and the file looked like this:
DEVICE partitions ARRAY /dev/md0 level=unknown UUID=d679bc98:c9dcd593:b738ad98:3a9a198a
So I tried that file as well. Same thing. Mounting fails until I run "mdadm --auto-detect".
I must still be missing something.
Partition type 0xFD ? -- Per Jessen, Zürich (0.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2011-01-10 at 10:47 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
On Fri, 2011-01-07 at 16:55 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
I have moved a RAID1 setup from an 11.0 to a 11.3 system. I want to be sure I do not mess it up. I can access the system if I do:
mdadm --auto-detect
and then mount it as before. I would prefer to have this happen automatically at boot.
If you run "mdadm --examine --scan >/etc/mdadm.conf", you'll get the array(s) started at boot-up.
This seems not to work for me. I have the file, which looks like this:
ARRAY /dev/md0 UUID=d679bc98:c9dcd593:b738ad98:3a9a198a
Yes, that look fine.
But the disks are not mounted. When I try to mount by hand, this is still not enough. I need to do "mdadm --auto-detect" before I can mount.
Before you do the auto-detect, what does /proc/mdstat say? I'm guessing it is empty.
Before: Personalities: unused devices: <none> After: Personalities: [raid1] md0: active raid1 sdc1[1] sdb1[0] 293000000 blocks [2/2] [UU] unused devices: <none>
I looked at the file from 11.0 when the disks did mount properly, and the file looked like this:
DEVICE partitions ARRAY /dev/md0 level=unknown UUID=d679bc98:c9dcd593:b738ad98:3a9a198a
So I tried that file as well. Same thing. Mounting fails until I run "mdadm --auto-detect".
I must still be missing something.
Partition type 0xFD ?
fdisk -l /dev/sdc Disk /dev/sdc: 300.1 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000b7f1b Device Boot Start End Blocks Id System /dev/sdc1 1 36480 293025568+ fd Linux raid autodetect Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Roger Oberholtzer wrote:
Partition type 0xFD ?
fdisk -l /dev/sdc
Disk /dev/sdc: 300.1 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000b7f1b
Device Boot Start End Blocks Id System /dev/sdc1 1 36480 293025568+ fd Linux raid autodetect
I guess sdb is also okay? I would take a look at the boot-up log, and see if perhaps those scsi devices (b, c) come "up" after md raid is started. -- Per Jessen, Zürich (0.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2011-01-10 at 13:33 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
Partition type 0xFD ?
fdisk -l /dev/sdc
Disk /dev/sdc: 300.1 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000b7f1b
Device Boot Start End Blocks Id System /dev/sdc1 1 36480 293025568+ fd Linux raid autodetect
I guess sdb is also okay?
Exactly the same.
I would take a look at the boot-up log, and see if perhaps those scsi devices (b, c) come "up" after md raid is started.
I see this in /var/log/messages: Jan 10 08:35:03 sto-opq-src kernel: [ 410.067110] md: Autodetecting RAID arrays. Jan 10 08:35:03 sto-opq-src kernel: [ 410.098792] md: Scanned 2 and added 2 devices. Jan 10 08:35:03 sto-opq-src kernel: [ 410.098800] md: autorun ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098804] md: considering sdb1 ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098816] md: adding sdb1 ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098824] md: adding sdc1 ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098830] md: created md0 Jan 10 08:35:03 sto-opq-src kernel: [ 410.098834] md: bind<sdc1> Jan 10 08:35:03 sto-opq-src kernel: [ 410.098857] md: bind<sdb1> Jan 10 08:35:03 sto-opq-src kernel: [ 410.098875] md: running: <sdb1><sdc1> Jan 10 08:35:03 sto-opq-src kernel: [ 410.114585] md: raid1 personality registered for level 1 Jan 10 08:35:03 sto-opq-src kernel: [ 410.115059] raid1: raid set md0 active with 2 out of 2 mirrors Jan 10 08:35:03 sto-opq-src kernel: [ 410.115104] md0: detected capacity change from 0 to 300058083328 Jan 10 08:35:03 sto-opq-src kernel: [ 410.115152] md: ... autorun DONE. Jan 10 08:35:03 sto-opq-src kernel: [ 410.118600] md0: unknown partition table That last statement looks suspicious. Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Roger Oberholtzer wrote:
I see this in /var/log/messages:
Jan 10 08:35:03 sto-opq-src kernel: [ 410.067110] md: Autodetecting RAID arrays. Jan 10 08:35:03 sto-opq-src kernel: [ 410.098792] md: Scanned 2 and added 2 devices. Jan 10 08:35:03 sto-opq-src kernel: [ 410.098800] md: autorun ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098804] md: considering sdb1 ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098816] md: adding sdb1 ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098824] md: adding sdc1 ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098830] md: created md0 Jan 10 08:35:03 sto-opq-src kernel: [ 410.098834] md: bind<sdc1> Jan 10 08:35:03 sto-opq-src kernel: [ 410.098857] md: bind<sdb1> Jan 10 08:35:03 sto-opq-src kernel: [ 410.098875] md: running: <sdb1><sdc1> Jan 10 08:35:03 sto-opq-src kernel: [ 410.114585] md: raid1 personality registered for level 1 Jan 10 08:35:03 sto-opq-src kernel: [ 410.115059] raid1: raid set md0 active with 2 out of 2 mirrors Jan 10 08:35:03 sto-opq-src kernel: [ 410.115104] md0: detected capacity change from 0 to 300058083328 Jan 10 08:35:03 sto-opq-src kernel: [ 410.115152] md: ... autorun DONE. Jan 10 08:35:03 sto-opq-src kernel: [ 410.118600] md0: unknown partition table
That last statement looks suspicious.
I thought so too - I googled a bit, and found one or two references that says it's ok: http://osdir.com/ml/linux-raid/2009-11/msg00344.html However, your md0 array is clearly being found and started - but is this when you start it manually or was it at boot-up? -- Per Jessen, Zürich (0.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2011-01-10 at 14:20 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
I see this in /var/log/messages:
Jan 10 08:35:03 sto-opq-src kernel: [ 410.067110] md: Autodetecting RAID arrays. Jan 10 08:35:03 sto-opq-src kernel: [ 410.098792] md: Scanned 2 and added 2 devices. Jan 10 08:35:03 sto-opq-src kernel: [ 410.098800] md: autorun ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098804] md: considering sdb1 ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098816] md: adding sdb1 ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098824] md: adding sdc1 ... Jan 10 08:35:03 sto-opq-src kernel: [ 410.098830] md: created md0 Jan 10 08:35:03 sto-opq-src kernel: [ 410.098834] md: bind<sdc1> Jan 10 08:35:03 sto-opq-src kernel: [ 410.098857] md: bind<sdb1> Jan 10 08:35:03 sto-opq-src kernel: [ 410.098875] md: running: <sdb1><sdc1> Jan 10 08:35:03 sto-opq-src kernel: [ 410.114585] md: raid1 personality registered for level 1 Jan 10 08:35:03 sto-opq-src kernel: [ 410.115059] raid1: raid set md0 active with 2 out of 2 mirrors Jan 10 08:35:03 sto-opq-src kernel: [ 410.115104] md0: detected capacity change from 0 to 300058083328 Jan 10 08:35:03 sto-opq-src kernel: [ 410.115152] md: ... autorun DONE. Jan 10 08:35:03 sto-opq-src kernel: [ 410.118600] md0: unknown partition table
That last statement looks suspicious.
I thought so too - I googled a bit, and found one or two references that says it's ok:
http://osdir.com/ml/linux-raid/2009-11/msg00344.html
However, your md0 array is clearly being found and started - but is this when you start it manually or was it at boot-up?
When I sent that, I thought it was. But I did a reboot just to be sure, and I see it must have come from a later command I ran by hand. I checked that mdadmd rc script will run. After boot is says it is unused. If I run 'rcmdadmd start' it then reports that it is running. But I still cannot mount anything. The /etc/sysconfig/mdadm on my old and new system is the same with one exception: the old (working) one had this: BOOT_MD_USE_MDADM_CONFIG=yes I added this, and it made no difference. /proc/mdstat remains empty. But the rc script (when run by hand) seems to start this: /sbin/mdadm -F -d 60 -m root@localhost -s -c /etc/mdadm.conf It refers to the /etc/mdadm.conf made earlier in this thread. But it makes no difference. I cannot boot without the "mdadm --auto-detect" command. I see nothing in /var/log/messages Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Roger Oberholtzer wrote:
When I sent that, I thought it was. But I did a reboot just to be sure, and I see it must have come from a later command I ran by hand. I checked that mdadmd rc script will run. After boot is says it is unused.
The mdadmd script is something else - that is for starting the mdadm monitoring daemon. The md startup script is /etc/init.d/boot.md -- Per Jessen, Zürich (0.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2011-01-10 at 16:48 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
When I sent that, I thought it was. But I did a reboot just to be sure, and I see it must have come from a later command I ran by hand. I checked that mdadmd rc script will run. After boot is says it is unused.
The mdadmd script is something else - that is for starting the mdadm monitoring daemon. The md startup script is /etc/init.d/boot.md
Hmm. I reboot the system. Then I ran /etc/init.d/boot.md. Things look promising. When I go looking for /etc/rc.d/boot.d/SXXboot.md, I find nothing. I am guessing the 'B' in Default-Start means it is a boot script. I have added a zillion rc.X scripts with insserv. I have never added a boot.d script. One learns something new every day! Anyway, after installing the script, all works as expected. Once again, thanks Per! Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Roger Oberholtzer wrote:
On Mon, 2011-01-10 at 16:48 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
When I sent that, I thought it was. But I did a reboot just to be sure, and I see it must have come from a later command I ran by hand. I checked that mdadmd rc script will run. After boot is says it is unused.
The mdadmd script is something else - that is for starting the mdadm monitoring daemon. The md startup script is /etc/init.d/boot.md
Hmm. I reboot the system. Then I ran /etc/init.d/boot.md. Things look promising. When I go looking for /etc/rc.d/boot.d/SXXboot.md, I find nothing. I am guessing the 'B' in Default-Start means it is a boot script. I have added a zillion rc.X scripts with insserv. I have never added a boot.d script. One learns something new every day!
Anyway, after installing the script, all works as expected. Once again, thanks Per!
No problems, Roger - it is odd that the boot.md script didn't run automatically, I'm sure it should have. -- Per Jessen, Zürich (0.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 1/10/2011 8:31 AM, Roger Oberholtzer wrote:
On Mon, 2011-01-10 at 16:48 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
When I sent that, I thought it was. But I did a reboot just to be sure, and I see it must have come from a later command I ran by hand. I checked that mdadmd rc script will run. After boot is says it is unused.
The mdadmd script is something else - that is for starting the mdadm monitoring daemon. The md startup script is /etc/init.d/boot.md
Hmm. I reboot the system. Then I ran /etc/init.d/boot.md. Things look promising. When I go looking for /etc/rc.d/boot.d/SXXboot.md, I find nothing. I am guessing the 'B' in Default-Start means it is a boot script. I have added a zillion rc.X scripts with insserv. I have never added a boot.d script. One learns something new every day!
Yes, boot time is the normal place to start raid. It would be unusual to to it when entering any run level. Most people want mount points to persist across all run levels. Chances are if you add the raid to your mtab it would load boot.md for you, because I don't recall ever having to add that explicitly in my installations. (But then, its do once and forget, so I might have). -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* John Andersen <jsamyth@gmail.com> [01-01-70 12:34]:
Chances are if you add the raid to your mtab it would load boot.md for you, because I don't recall ever having to add that explicitly in my installations. (But then, its do once and forget, so I might have).
IIUC, mtab is a system generated list of mounted filesystems. You perhaps intend fstab?? -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 1/10/2011 11:17 AM, Patrick Shanahan wrote:
* John Andersen <jsamyth@gmail.com> [01-01-70 12:34]:
Chances are if you add the raid to your mtab it would load boot.md for you, because I don't recall ever having to add that explicitly in my installations. (But then, its do once and forget, so I might have).
IIUC, mtab is a system generated list of mounted filesystems. You perhaps intend fstab??
DUH, yes, of course, that's what I meant to say. -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2011-01-10 at 11:45 -0800, John Andersen wrote:
On 1/10/2011 11:17 AM, Patrick Shanahan wrote:
* John Andersen <jsamyth@gmail.com> [01-01-70 12:34]:
Chances are if you add the raid to your mtab it would load boot.md for you, because I don't recall ever having to add that explicitly in my installations. (But then, its do once and forget, so I might have).
IIUC, mtab is a system generated list of mounted filesystems. You perhaps intend fstab??
DUH, yes, of course, that's what I meant to say.
Until I added boot.md as a service with insserv, the mount spec in fstab would fail, making the system not boot. I had to log in as root and do a recovery (remove the raid disk from fstab). The file system is not root. It is many subversion repositories, trac management systems, and other data. But I guess it is flagged in my fstab as being required. That is another issue - but not an important one as the system is pretty useless without this file system. Anyway, thanks to Per, the problem is now solved. Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
John Andersen
-
Patrick Shanahan
-
Per Jessen
-
Roger Oberholtzer