giovedì 15 dicembre 2011

Fedora 15 rename RAID1


To rename md0 to md1, first stop md0, assemble those devices with minor=0 (-m0) as md1 and update the super-blocks.

# mdadm --stop /dev/md0
# mdadm -A /dev/md1 -m0 --update=super-minor


EX01:

# mdadm --stop /dev/md0
# mdadm -A /dev/md6 -m0 --update=super-minor /dev/sda5 /dev/sdb5


EX02:
from: http://serverfault.com/questions/267480/how-do-i-rename-an-mdadm-raid-array

# mdadm --detail /dev/md127:

Version : 0.90
Creation Time : Wed Apr 13 20:03:21 2011
Raid Level : raid10
Array Size : 656765952 (626.34 GiB 672.53 GB)
Used Dev Size : 437843968 (417.56 GiB 448.35 GB)
Raid Devices : 3
Total Devices : 2
Preferred Minor : 8
Persistence : Superblock is persistent

The first line shows the metadata version used by this array. Now, stop the array:

# mdadm --stop /dev/md127
# mdadm --remove /dev/md127


And assemble it again using the new name. If the metadata version is 1.0 or higher, use this:

# mdadm --assemble /dev/md3 /dev/sd[abcdefghijk]3 --update=name

For arrays using old metadata structure (most likely 0.90, as it allows for kernel auto-assembly), use this:

# mdadm –assemble /dev/md3 –update=super-minor /dev/sd[abcdefghijk]3



0 commenti: