0

Q1 - How to properly modify the contents of an LVM Logical Vollume that is being use by a Virtual machine?.

Q2 - On Xen?.

Q3 - On VirtualBox?.

Q4 - On KVM?.

Thanks for our time.

5
  • In such a way that corruption does not happen, even while the Virtual Machine is running.
    – FreeFog
    Dec 1, 2014 at 1:11
  • "even while the VM is running" might never work, it'd be like editing (or running fsck) on a fs while it's mounted. You might want to look into shared/networked folders between the host & the VM, or even an app like dropbox that can manage changes in two places at once.
    – Xen2050
    Dec 1, 2014 at 1:40
  • But is not LVM in charge of managing the write queues? There has to be a way they both understand the pointers.
    – FreeFog
    Dec 1, 2014 at 2:07
  • While the VM is running the VM is the only one in control of the virtual drive, circumventing that could cause the same problems up if you fsck a mounted (ex. ext) volume, mixes things up and could scramble the drive. Having only one program (one person driving the car) should prevent a crash. To share access is to use networking & sharing tools, that's what they're designed to do.
    – Xen2050
    Dec 1, 2014 at 2:21
  • @FreeFog - the virtual machines use the LVM partition as a raw image, not as LVM. Some operations with LVM you can do while the partition is in use, such as make it larger, or snapshots. Some things you can not. "modify the contents" is too vague.
    – Panther
    Dec 1, 2014 at 14:00

1 Answer 1

1

You don't: you have to shut down the vm. Or at the very least, make sure the vm does not have the partition mounted that you are trying to mount in the host.

2
  • Is there a way to make the VM and the host OS to use a same interface, I mean an intermediary that will queue the disks operations, so both parties can work?.
    – FreeFog
    Dec 2, 2014 at 3:09
  • @FreeFog, you can use a network filesystem such as NFS or CIFS ( samba ).
    – psusi
    Dec 2, 2014 at 14:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .