LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-13-2012, 01:06 AM   #1
craigcurtin
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Rep: Reputation: Disabled
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
 
Old 10-13-2012, 01:56 AM   #2
craigcurtin
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Looks like i need to use pvcreate --uuid

I have done this and now the VG is happy

Going to try a reboot now to see if it remembers the MD group

I think i know what the problem was - i did not use GDISK to set the partition type to Linux RAID (fd00) - i have just downloaded that now and installed and set both member disks to fd00 - hopefully this does not wipe out the disk/data

rebooting now

Will report back

Craig
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is GPT and LVM what I really need? tauro_kpo Linux - Newbie 6 11-14-2013 03:18 PM
lvm, usb, mdadm = }:-| zbot1 Linux - Software 2 08-21-2010 01:10 PM
MDADM screws up the LVM partitions? Can't mount the LVMs after mdadm stopped alirezan1 Linux - Newbie 3 11-18-2008 04:42 PM
Huge piles of disk with LVM and/or RAID - GPT/GUID?? petcherd Slackware 2 12-18-2007 04:50 PM
LVM + MDADM...help carve81 Debian 2 08-25-2006 03:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration