Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Expanding LVM on an MD Raid1 on GPT disk - [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
jasonpf
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2002
Posts: 86
Location: Tempe, AZ

PostPosted: Sun Jun 19, 2011 8:04 am    Post subject: Expanding LVM on an MD Raid1 on GPT disk - [SOLVED] Reply with quote

I have a server that's getting a disk upgrade (from 2 x 500 GB to 2 x 1 TB) and the system was originally set up as follows:

GPT Partitioned disks w/ 3 partitions (set as "raid") and software raid 1 setup on these (md). The 3rd partition is set up as an LVM w/ 2 logical volumes.

I've created a DD image of one of the original disks onto a fileserver (running Gentoo) and I'm now using DD to copy it back to the bigger 1 TB disk. I tried previously to modify the GPT partition table with parted (after I verified the validity of the copy, LVs show up properly so I deactivated everything for resizing). Parted at first complains about the alternate GPT not being at the end of the disk (I tell it to fix it), I then change to units to blocks and tried resizing the 3rd partition, but it said it didn't recognize the partition type. It was set to RAID, so I set it to LVM to test, it still failed with the same error. I then tried scanning/recognizing the LVs and lvmdiskscan doesn't show anything anymore (seems my LVM setup got corrupted by parted).

So now I've used DD to recopy the contents of my backup image back to the 1 TB drive and am needing to figure out what to do from here to avoid the same issue I just had. Any help would be greatly appreciated.


Last edited by jasonpf on Sun Jun 19, 2011 1:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sun Jun 19, 2011 9:54 am    Post subject: Reply with quote

Just create another partition that fills up the free space, create another raid on that partition, make it a PV and add it to VG?

The alternative is to create a new raid 1, starting out with just one disk, copy the data onto that disk, and once the copy is good add the other disk to the raid...
Back to top
View user's profile Send private message
jasonpf
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2002
Posts: 86
Location: Tempe, AZ

PostPosted: Sun Jun 19, 2011 1:06 pm    Post subject: Reply with quote

Got it! Thanks! I hadn't considered creating a new partition and extending the VG/LV. When I was adjusting the old partition in parted it was was causing it to corrupt, so that bypasses that problem. I was able to move the GPT table to the end of the drive (when it complained due to the DD from a smaller drive) and then create the new partition, do a pvcreate, vgextend, lvextend, now I just have to expand the filesystem within Xen (the LVM hosts an NTFS partition for Windows 2003 in Xen). ^^
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum