Skip to content

Instantly share code, notes, and snippets.

@olivierlambert
Created January 31, 2018 13:41
Show Gist options
  • Save olivierlambert/fbd69561990e46b496eca4eac9c68c68 to your computer and use it in GitHub Desktop.
Save olivierlambert/fbd69561990e46b496eca4eac9c68c68 to your computer and use it in GitHub Desktop.
Manual mount multi-disks LVM

Requirements

vhdimount

  • On Debian: libvhdi-utils package
  • On Fedora:
sudo dnf install https://forensics.cert.org/cert-forensics-tools-release-27.rpm
sudo dnf install libvhdi-tools

LVM2

lvm2 packages (both Debian/Fedora)

VHD mount

You need access to the remote, for mounting VHD files. Create 2 different folders, let's say /mnt/disk1 and /mnt/disk2 for example.

Now we'll mount both VHD files into those 2 mount points:

# vhdimount <VDI1_UUID>.vhd /mnt/disk1
# vhdimount <VDI2_UUID>.vhd /mnt/disk2

We need to "refresh" the active disks with:

# losetup --show -f /mnt/disk1/vhdi1
# losetup --show -f /mnt/disk2/vhdi1

Now, the lv is detected, list it with lvs command. You can mount it:

# mount /dev/testVG/dataLV /tmp/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment