GPT - MDADM and LVM woes - please help
Guys,
I have a Centos 5.4 system that i have been running for ages - it is setup as follows
1) Single IDE drive that holds partitions for boot, root swap etc
2) a set of MDADM RAID1 disks that i use LVM ontop of to house all my data. (Currently 8 drives in the set)
Basically this is out home mediastore with all movies and TV shows.
Over the years as i have added more content i have used the LVM system to enable me to add larger drives to the LVM setup and then retire smaller drives. So at the moment the LVM partition is composed of 4 x 2TB RAID1 arrays - giving me just under 8TB of useable space - this is access as a mount point on the /Storage directory.
My process in the past has been as follows as the array fills
1) Buy 2 x new drives and connect to the system
2) Setup a RAID1 array on the drives
3) Extend the VG to include this space
4) PVMove the data from the smallest RAID pair to free them up
5) Vgreduce to remove the smallest pair.
6) Disconnect and retire
I have done this many times of the years as i initially started with 250GB drives and grew it from there. I have never had an issue doing this.
This time around was my first foray into 3TB drives. Without thinking about it i used Fdisk to create the partitions on the two new drives then changed the type to Lunux RAID and created an MDADM RAID1 out of them - as it was creating i realised that it was not seeing all the space and forced an abort of the creation.
I then zero'd the superblock, and used parted to create a GPT primary partition on each drive of 3TB
I then created the new array (MD3) and left it to mirror - watching it in /proc/mdstat it took about 6 hours.
Once this was done i then created a PV on the RAID set and added it to my VG
I used VGextend
Once that was i done i then did a PVMOVE to retire the old disks - this took about 24 hours and finished with no issues - all the while the VG was accessible and was happily serving out TV shows etc.
I then did a shutdown of the box - when i started it back up - it refused to mount the volume group saying it could not find a UUID
(doing a vgdisplay shows the same message)
When i then did a cat /proc/mdstat my new array does not show up !!!
mdadm --examine --scan does not see the array - it shows the other 4 arrays however
I checked that i do not have a /etc/mdadm/mdadm.conf file so no conflict there.
I then did a heap of googling and similar issues led me to try and reassemble the array (reported back it did not exist)
Examining the drives with mdadm did not show them as part of a set
So some other googling led me to actually recreate the array which i did with
mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/sdg1 /dev/sdh1
(This command was in the history buffer and was the one i used to create the array in the first place)
This almost instantly finished and reported back that i had the array - but this is where the weird part is
1) The UUID is different and
2) the name of the array is strange as per below
mdadm --examine --scan
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=e274c80a:48700410:71859ed0:acd08d5e
ARRAY /dev/md6 level=raid1 num-devices=2 UUID=c2a72c98:f67620c8:fe37d3e6:da1db879
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=c3318262:53a3c039:c88adb7b:514b83e9
ARRAY /dev/md/3 level=raid1 metadata=1.0 num-devices=2 UUID=d2c1b787:a189fb7a:f56e0964:dc1ad8ba name=3
ARRAY /dev/md7 level=raid1 num-devices=2 UUID=bf8de9b3:ee6ec511:cd26978e:f80aa438
and when i do a vgdisplay i get
[root@MediaStore etc]# vgdisplay
Couldn't find device with uuid fYUJn5-YLOA-3S3w-M2Mg-qqb9-pbWC-ctqqHi.
--- Volume group ---
VG Name vg1
System ID
Format lvm2
Metadata Areas 4
Metadata Sequence No 20
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 5
Act PV 4
VG Size 9.28 TB
PE Size 32.00 MB
Total PE 303999
Alloc PE / Size 238464 / 7.28 TB
Free PE / Size 65535 / 2.00 TB
VG UUID BiDOhK-8QYI-WPTc-BWcj-OtXN-QQeO-0QHEAi
So how can i change the info that the VG is using to point to the new RAID1 disk ? and anyone have any ideas why this happened ? and will it happen when i reboot again - and how do i fix the seemingly strange MD name ?
Craig
|