Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to resize my virtual hard disk, so I've cloned it, and right now I have two disks in my virtual machine.

I'm trying now to boot off the old virtual disk and then resize the new hard disk's partitions, but when I do pvresize complains that there duplicate physical volumes (PV) with the same ID (presumably because I cloned my disk).

What do I do?

Can i just change the ID of one of the physical volumes?

share|improve this question

3 Answers 3

Have you considered trying pvchange -u on the new physical volume to give it a new UUID?

share|improve this answer
    
Thanks for the suggestion, I wasn't aware of pvchange. I have since scrapped the whole thing and re-installed Ubuntu on a big virtual hard disk. –  user12259 Jul 12 '09 at 21:19

Why can't you just disconnect the old volume since you have already cloned it?

share|improve this answer
    
I'm booting off the old volume to make changes to the new volume (unmounted) –  user12259 Jul 9 '09 at 21:27
    
Boot off a live CD instead. Or make the changes in single-user mode, if you can. LVM doesn't cope with having duplicate PV UUIDs. –  MikeyB Jul 9 '09 at 21:38
    
It would probably be easier and safer to simply boot off a livecd and do the resize with the livecd. –  Zoredache Jul 9 '09 at 21:39
    
which live cd would you recommend? are you sure its not simpler just to change the pv id? –  user12259 Jul 9 '09 at 21:49

I haven't tried this and I would do it om a disk that I didn't care about but the LVM FAQ says "pvcreate only overwrites the lvm metadata areas on disk and doesn't touch the data areas (the logical volumes). ". So you might be able to get away with doing a pvremove followed by a pvcreate although as I say I would do it with a disc of data I didn't care about first

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.