Renaming Mdadm Name

Home » CentOS » Renaming Mdadm Name
CentOS No Comments

Hi

I have a disk which two of the partitions are part of a RAID1 setup. I’m trying to rename the the second raided partition mdadm -E /dev/sdc4
/dev/sdc4:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 83d7657b:ebfddcb7:36b0fa14:d29a350c
Name : oldname:2
Creation Time : Tue Aug 30 15:25:10 2016
Raid Level : raid1
Raid Devices : 2

Avail Dev Size : 486696960 (232.08 GiB 249.19 GB)
Array Size : 243348480 (232.08 GiB 249.19 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before&2056 sectors, after=0 sectors
State : clean
Device UUID : 97aba979:dd4cf85c:f6dbf4f6:f1e9ccab

Internal Bitmap : 8 sectors from superblock
Update Time : Fri Sep 23 14:21:00 2016
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 749e26a8 – correct
Events : 7319

Device Role : Active device 0
Array State : A. (‘A’ == active, ‘.’ == missing, ‘R’ == replacing)

For the first partition I stopped the RAID using mdadm –stop /dev/md127

and then reassembeld using

mdadm –assemble /dev/md127 –name=newname_boot –update=name /dev/sdc2

The first partition was easy as the system had started the RAID, but the second parition the system does start, and when I try to assemble it, it tells me it’s already active:-

mdadm –assemble –uuid

LEAVE A COMMENT