Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Clone an LVM formatted disk to a smaller disk (VM)

  • 12-12-2011 9:50am
    #1
    Registered Users, Registered Users 2 Posts: 10,288 ✭✭✭✭


    Anyone have any experience with this? Looknig to clone a 20Gb LVM partition to a 12Gb one in CentOS 5.7. It's a virtual machine too on vSphere 5

    Clonezilla/gparted etc don't see the contents of the disk, same with vmware converter.

    Any ideas?
    Will try a lvm mirror and then break the mirror but was hoping there might be an easier way.

    Cheers!


Comments

  • Registered Users, Registered Users 2 Posts: 10,288 ✭✭✭✭Standard Toaster


    Had some luck with vgextend/pvmove, will report back with results later tomorrow.


  • Registered Users, Registered Users 2 Posts: 10,288 ✭✭✭✭Standard Toaster


    What I ended up doing was using dd to copy /boot to second smaller harddrive and then introducing the rest of the harddrive's space to the LVM volume (smaller partition)
    Used vgextend/pvmove/vgreduce/pvremove to move the data and remove original harddrive from the volume group.
    Finally reinstalled grub and all seems fine now.

    I'll fire up the steps at some point as I can see myself doing this again.


Advertisement