[opensuse] Add more disks to RAID 5
Hi all I have setup a home server running a RAID 5 (3 disks). Now I would like to add 2 more disks to my RAID 5 but I'm not sertain how to do it. The RAID 5 is created of sda1, sdb1, sdc1 and I would like to add sdd1, sde1 - what process do you recommend? Both sdd1 and sde1 are currently mounted under /media/. So I assume sdd and sde should be unmounted, formated to ext4 and changed to '0xFD Linux RAID' - is this correct? Anything more I should do? Thanks a lot in advance. Venlig hilsen / Best regards Allan Dreyer Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Allan Dreyer andersen wrote:
Hi all
I have setup a home server running a RAID 5 (3 disks). Now I would like to add 2 more disks to my RAID 5 but I'm not sertain how to do it.
The RAID 5 is created of sda1, sdb1, sdc1 and I would like to add sdd1, sde1 - what process do you recommend?
Both sdd1 and sde1 are currently mounted under /media/. So I assume sdd and sde should be unmounted, formated to ext4 and changed to '0xFD Linux RAID' - is this correct?
Hej Allan Assuming we're talking about software RAID, I don't know of any way to grow a RAID5. Therefore the process is roughly like this: backup your data unmount filesystem, destroy array create new array with your new disks create filesystem, mount filesystem, copy back your backup -- Per Jessen, Zürich (16.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
Assuming we're talking about software RAID, I don't know of any way to grow a RAID5.
Sorry, that's not correct. Look up the --grow option for mdadm. The process would be something like this: backup data mdadm --grow /dev/mdx -n 5 /dev/sda1 /dev/sdb1 ..... -- Per Jessen, Zürich (16.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 21 Apr 2010 16:34:46 +0200, Per Jessen <per@opensuse.org> wrote: Hello Per and Adam
Assuming we're talking about software RAID, I don't know of any way to grow a RAID5.
Sorry, that's not correct. Look up the --grow option for mdadm. The process would be something like this:
backup data mdadm --grow /dev/mdx -n 5 /dev/sda1 /dev/sdb1 .....
Thanks for your comments and ideas, which has brought me closer to a solution. Think I have tried every possible command I can come of but I keep having issues. Using your feedback I come across this step-by-step guide: http://ubuntuforums.org/showthread.php?t=517282 Beside using this guide I've changed my setup so my root is on a single disk as it was the only way I good get started with the guide. My problem is I can't do a e2fsck on the raid - I get: buffy:~ # e2fsck -f /dev/md0 e2fsck 1.41.9 (22-Aug-2009) e2fsck: Device or resource busy while trying to open /dev/md0 Filesystem mounted or opened exclusively by another program? System details: --- buffy:~ # cat /proc/mdstat Personalities : [raid6] [raid5] [raid4] md0 : active raid5 sdb4[0] sde1[4] sdd1[3] sdc1[1] 5825594112 blocks super 1.0 level 5, 128k chunk, algorithm 0 [4/4] [UUUU] unused devices: <none> --- buffy:~ # mdadm --detail /dev/md0 /dev/md0: Version : 1.00 Creation Time : Tue Apr 20 04:10:24 2010 Raid Level : raid5 Array Size : 5825594112 (5555.72 GiB 5965.41 GB) Used Dev Size : 1941864704 (1851.91 GiB 1988.47 GB) Raid Devices : 4 Total Devices : 4 Persistence : Superblock is persistent Update Time : Mon Apr 26 18:54:19 2010 State : clean Active Devices : 4 Working Devices : 4 Failed Devices : 0 Spare Devices : 0 Layout : left-asymmetric Chunk Size : 128K Name : linux:0 UUID : cf81fff7:872a647e:74943f95:dd45bb7d Events : 314319 Number Major Minor RaidDevice State 0 8 20 0 active sync /dev/sdb4 1 8 33 1 active sync /dev/sdc1 3 8 49 2 active sync /dev/sdd1 4 8 65 3 active sync /dev/sde1 Any idea what I have overlooked since my array keep being busy. I can find a PID with md0 but have no idea what are causing this. This disks or raid is not mounted or exist (yet) in fstab. buffy:~ # ps auxf|grep md0 root 801 0.0 0.0 0 0 ? S< 18:09 0:00 \_ [md0_raid5] -- Venlig hilsen / Best regards Allan Dreyer Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Allan Dreyer andersen wrote:
Beside using this guide I've changed my setup so my root is on a single disk as it was the only way I good get started with the guide.
My problem is I can't do a e2fsck on the raid - I get: buffy:~ # e2fsck -f /dev/md0 e2fsck 1.41.9 (22-Aug-2009) e2fsck: Device or resource busy while trying to open /dev/md0 Filesystem mounted or opened exclusively by another program?
Sounds a lot like the filesystem is mounted, so unmount it.
Any idea what I have overlooked since my array keep being busy. I can find a PID with md0 but have no idea what are causing this. This disks or raid is not mounted or exist (yet) in fstab.
What does 'df' show ? -- Per Jessen, Zürich (15.4°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 26 Apr 2010 20:28:00 +0200, Per Jessen <per@opensuse.org> wrote:
My problem is I can't do a e2fsck on the raid - I get: buffy:~ # e2fsck -f /dev/md0 e2fsck 1.41.9 (22-Aug-2009) e2fsck: Device or resource busy while trying to open /dev/md0 Filesystem mounted or opened exclusively by another program?
Sounds a lot like the filesystem is mounted, so unmount it.
Any idea what I have overlooked since my array keep being busy. I can find a PID with md0 but have no idea what are causing this. This disks or raid is not mounted or exist (yet) in fstab.
What does 'df' show ?
'df' shows the following: Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 30969568 3944508 25451900 14% / udev 3836336 360 3835976 1% /dev /dev/sda3 447685780 204680 424739888 1% /home None of these are part of the raid. 'mount' shows this: /dev/sda1 on / type ext4 (rw,acl,user_xattr) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) debugfs on /sys/kernel/debug type debugfs (rw) udev on /dev type tmpfs (rw) devpts on /dev/pts type devpts (rw,mode=0620,gid=5) /dev/sda3 on /home type ext4 (rw,acl,user_xattr) fusectl on /sys/fs/fuse/connections type fusectl (rw) securityfs on /sys/kernel/security type securityfs (rw) /proc on /var/lib/ntp/proc type none (ro,bind) -- Venlig hilsen / Best regards Allan Dreyer Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Allan Dreyer andersen wrote:
On Mon, 26 Apr 2010 20:28:00 +0200, Per Jessen <per@opensuse.org> wrote:
My problem is I can't do a e2fsck on the raid - I get: buffy:~ # e2fsck -f /dev/md0 e2fsck 1.41.9 (22-Aug-2009) e2fsck: Device or resource busy while trying to open /dev/md0 Filesystem mounted or opened exclusively by another program?
Sounds a lot like the filesystem is mounted, so unmount it.
Any idea what I have overlooked since my array keep being busy. I can find a PID with md0 but have no idea what are causing this. This disks or raid is not mounted or exist (yet) in fstab.
What does 'df' show ?
'df' shows the following: Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 30969568 3944508 25451900 14% / udev 3836336 360 3835976 1% /dev /dev/sda3 447685780 204680 424739888 1% /home
Hmmm. The error message from e2fsck is interesting: "Filesystem mounted or opened exclusively by another program?" - as it's not mounted, is something else using the device directly? Pretty weird, but possible. -- Per Jessen, Zürich (10.6°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 27 Apr 2010 08:10:00 +0200, Per Jessen <per@opensuse.org> wrote: Hello Per,
My problem is I can't do a e2fsck on the raid - I get: buffy:~ # e2fsck -f /dev/md0 e2fsck 1.41.9 (22-Aug-2009) e2fsck: Device or resource busy while trying to open /dev/md0 Filesystem mounted or opened exclusively by another program?
What does 'df' show ?
'df' shows the following: Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 30969568 3944508 25451900 14% / udev 3836336 360 3835976 1% /dev /dev/sda3 447685780 204680 424739888 1% /home
Hmmm. The error message from e2fsck is interesting: "Filesystem mounted or opened exclusively by another program?" - as it's not mounted, is something else using the device directly? Pretty weird, but possible.
Thanks a lot Per for taking interest to my issue. Right now I'm afraid that my RAID in some way is broken and data then is lost? -- Venlig hilsen / Best regards Allan Dreyer Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Allan Dreyer andersen wrote:
On Tue, 27 Apr 2010 08:10:00 +0200, Per Jessen <per@opensuse.org> wrote:
Hello Per,
> My problem is I can't do a e2fsck on the raid - I get: > buffy:~ # e2fsck -f /dev/md0 > e2fsck 1.41.9 (22-Aug-2009) > e2fsck: Device or resource busy while trying to open /dev/md0 > Filesystem mounted or opened exclusively by another program?
What does 'df' show ?
'df' shows the following: Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 30969568 3944508 25451900 14% / udev 3836336 360 3835976 1% /dev /dev/sda3 447685780 204680 424739888 1% /home
Hmmm. The error message from e2fsck is interesting: "Filesystem mounted or opened exclusively by another program?" - as it's not mounted, is something else using the device directly? Pretty weird, but possible.
Thanks a lot Per for taking interest to my issue. Right now I'm afraid that my RAID in some way is broken and data then is lost?
Well, it IS possible, there's no denying that. I don't think we have enough data to be certain though. Questions: Have you got a backup copy? Are you still unable to do a filesystem check on /dev/md0 ? Try 'lsof | grep md0' and let us know what you see (if anything). -- Per Jessen, Zürich (17.6°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 29 Apr 2010 10:56:01 +0200, Per Jessen <per@opensuse.org> wrote:
Well, it IS possible, there's no denying that. I don't think we have enough data to be certain though. Questions:
Have you got a backup copy?
Partly. There were 1 copy of the data on the RAID, 1 copy of the data on the disk I'm adding and beside this I have part of the data on other disks.
Are you still unable to do a filesystem check on /dev/md0 ?
Yup, I'm still not able to do check 'e2fsck -f /dev/md0': e2fsck: Device or resource busy while trying to open /dev/md0 Filesystem mounted or opened exclusively by another program?
Try 'lsof | grep md0' and let us know what you see (if anything).
buffy:~ # lsof |grep md0 md0_raid5 857 root cwd DIR 8,1 4096 2 / md0_raid5 857 root rtd DIR 8,1 4096 2 / md0_raid5 857 root txt unknown /proc/857/exe -- Venlig hilsen / Best regards Allan Dreyer Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Allan Dreyer andersen wrote:
On Thu, 29 Apr 2010 10:56:01 +0200, Per Jessen <per@opensuse.org> wrote:
Well, it IS possible, there's no denying that. I don't think we have enough data to be certain though. Questions:
Have you got a backup copy?
Partly. There were 1 copy of the data on the RAID, 1 copy of the data on the disk I'm adding and beside this I have part of the data on other disks.
So if necessary you could restore your data?
Are you still unable to do a filesystem check on /dev/md0 ?
Yup, I'm still not able to do check 'e2fsck -f /dev/md0': e2fsck: Device or resource busy while trying to open /dev/md0 Filesystem mounted or opened exclusively by another program?
That is weird - try doing one or two "umount /dev/md0" - just in case the device is mounted, but it isn't listed in /etc/mtab. -- Per Jessen, Zürich (18.1°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
That is weird - try doing one or two "umount /dev/md0" - just in case the device is mounted, but it isn't listed in /etc/mtab.
umount -v /dev/md0 just for fun. Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 29 Apr 2010 10:38:28 +0100, Dave Howorth <dhoworth@mrc-lmb.cam.ac.uk> wrote: Hello Dave,
Per Jessen wrote:
That is weird - try doing one or two "umount /dev/md0" - just in case the device is mounted, but it isn't listed in /etc/mtab.
umount -v /dev/md0
buffy:~ # umount -v /dev/md0 Could not find /dev/md0 in mtab umount: /dev/md0: not mounted Almost the same message like when trying without '-v'. -- Venlig hilsen / Best regards Allan Dreyer Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Allan Dreyer andersen wrote:
On Thu, 29 Apr 2010 10:38:28 +0100, Dave Howorth <dhoworth@mrc-lmb.cam.ac.uk> wrote:
Hello Dave,
Per Jessen wrote:
That is weird - try doing one or two "umount /dev/md0" - just in case the device is mounted, but it isn't listed in /etc/mtab. umount -v /dev/md0
buffy:~ # umount -v /dev/md0 Could not find /dev/md0 in mtab umount: /dev/md0: not mounted
Almost the same message like when trying without '-v'.
Yes :( You could also try the reverse to see whether it gives any better diagnostics: mount -v /dev/md0 (you may need more arguments depending on your config of course) Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 29 Apr 2010 11:29:06 +0200, Per Jessen <per@opensuse.org> wrote:
Have you got a backup copy?
Partly. There were 1 copy of the data on the RAID, 1 copy of the data on the disk I'm adding and beside this I have part of the data on other disks.
So if necessary you could restore your data?
Only partly - like 50%.
Yup, I'm still not able to do check 'e2fsck -f /dev/md0': e2fsck: Device or resource busy while trying to open /dev/md0 Filesystem mounted or opened exclusively by another program?
That is weird - try doing one or two "umount /dev/md0" - just in case the device is mounted, but it isn't listed in /etc/mtab.
buffy:~ # umount /dev/md0 umount: /dev/md0: not mounted -- Venlig hilsen / Best regards Allan Dreyer Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 2010-04-21 at 15:25 +0200, Allan Dreyer andersen wrote:
Hi all I have setup a home server running a RAID 5 (3 disks). Now I would like to add 2 more disks to my RAID 5 but I'm not sertain how to do it.
The RAID 5 is created of sda1, sdb1, sdc1 and I would like to add sdd1, sde1 - what process do you recommend? Both sdd1 and sde1 are currently mounted under /media/. So I assume sdd and sde should be unmounted, formated to ext4 and changed to '0xFD Linux RAID' - is this correct? Anything more I should do? Thanks a lot in advance.
They should be unmounted. But I don't see any mention of adding new drives in "man dmraid"; only adding new hot spares. I don't recall if I ever did that in the old MD raid. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Adam Tauno Williams
-
Allan Dreyer andersen
-
Dave Howorth
-
Per Jessen