[opensuse] creating a degraded RAUD array using mdadm
Felix, this is for you - I have not actually tested it, but I think it's accurate. Let's start with your use-case:
Use case: only 4 SATA ports on mobo (most common mATX motherboard configuration) 1 SATA port connected to DVD RW (also common) 2 SATA ports connected to original RAID1
User wants to replace entire RAID by first creating (degraded) new RAID1 on larger disk on last SATA port, then rsync from old to new while booted from DVD, after which remove old raid intact to some other machine as a backup, and lastly boot from new with other new disk connected and complete the new RAID.
SR1 = source RAID1 (sda, sdb) DR1 = destination RAID1. First, fail and remove a device on SR1: mdadm --manage SR1 -f /dev/sdb mdadm --manage SR1 -r /dev/sdb. sdb being the disk you wish to remove. Now replace sdb with your new disk and create a new degraded array: mdadm --create DR1 -l1 -f -n1 /dev/sdb create filesystem on DR1, mount etc. rsync SR1 -> DR1 umount etc. replace sda with appropriate new drive mdadm --manage DR1 --add /dev/sda. sda is now a spare drive in DR1 mdadm --grow /dev/md0 -n2 DR1 should now be rsync'ing. -- Per Jessen, Zürich (10.1°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Looks about right but ... On 2016-04-21 10:00, Per Jessen wrote:
Felix, this is for you - I have not actually tested it, but I think it's accurate. Let's start with your use-case:
Use case: only 4 SATA ports on mobo (most common mATX motherboard configuration) 1 SATA port connected to DVD RW (also common) 2 SATA ports connected to original RAID1
User wants to replace entire RAID by first creating (degraded) new RAID1 on larger disk on last SATA port, then rsync from old to new while booted from DVD, after which remove old raid intact to some other machine as a backup, and lastly boot from new with other new disk connected and complete the new RAID.
SR1 = source RAID1 (sda, sdb) DR1 = destination RAID1.
First, fail and remove a device on SR1:
I think the user has a spare port, so no need for this step, he can keep SR1 intact.
mdadm --manage SR1 -f /dev/sdb mdadm --manage SR1 -r /dev/sdb.
sdb being the disk you wish to remove.
Now replace sdb with your new disk and create a new degraded array:
mdadm --create DR1 -l1 -f -n1 /dev/sdb
and here it is mdadm --create DR1 -l1 -f -n1 /dev/sdc et seq below
create filesystem on DR1, mount etc. rsync SR1 -> DR1
umount etc. replace sda with appropriate new drive
mdadm --manage DR1 --add /dev/sda.
sda is now a spare drive in DR1
mdadm --grow /dev/md0 -n2
DR1 should now be rsync'ing.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Dave Howorth
-
Per Jessen