[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LVM and hard disk upgrade



Jacek Politowski wrote:
> Hello,
>
> In LVM-HOWTO I found procedure for removing old drives from volume
> group. Just create new PV on new disk, add the new PV to volume group,
> move existing data out of old physical volume using 'pvmove old_pv
> new_pv', remove old disk from volume group using 'vgreduce' and remove
> old drive, rebooting the system.
>
> I guess this could work if only /home (or similar, not important
> during bootup filesystems) were on LVM, but default Debian install
> leaves only /boot on normal partition, putting all the rest (/, /home,
> swap) on LVM logical volumes.
>
> But when / is on LVM, I expect trouble booting system from new disk
> (changed UUIDs? wrong root LV label in initramfs?)
>
>
> What steps do I need to perform to be able to boot system from new
> disk?  Had anyone do similar operation?
>
>
> My system's current layout is:
> /etc/fstab (stripped from unimportant data)
> /dev/mapper/mongoose--vg01-root   /      ext3
> /dev/hda1                         /boot  ext2
> /dev/mapper/mongoose--vg01-home   /home  ext3
> /dev/mapper/mongoose--vg01-swap_1 none   swap
>   

If you follow the procedure you mention above (adding a new physical
volume, moving data, then removing the old one), you should end up with
the exact LVM layout. Your VG will have the same name, and also the LVs
inside it, so it should just work.



-- 
"You, sir, are nothing but a pathetically lame salesdroid!
I fart in your general direction!"
		-- Randseed on #Linux

Eduardo M KALINOWSKI
eduardo@kalinowski.com.br
http://move.to/hpkb


Reply to: