ralphje / imagemounter

Command line utility and Python package to ease the (un)mounting of forensic disk images
MIT License
118 stars 36 forks source link

Fix issues with LVM mounting. #44

Closed agibbons27 closed 2 years ago

agibbons27 commented 2 years ago

Fixed issue with mounting LVMs, specifically for mounting LVMs using a network block device. Also added a regular expression to remove non-numeric characters when parsing volume size from lvdisplay command output.

ralphje commented 2 years ago

For LVM, maybe we should make sure that we also detect the line lvm may spit out that it is using another device for detecting the LVM.

ralphje commented 2 years ago

This seems OK to me, but I have two questions:

Perhaps the 0-check should be combined with the block device check in here.

agibbons27 commented 2 years ago

I'm not sure if that applies to other types of devices. The specific image I'm using for testing is a .vmdk image that I mount with the qemu-nbd method. Once mounted, the volume group gets activated and the volumes can be mounted. If the 0-check for offset is included, the volume is not mounted.

I could just be misunderstanding this, but I'm not sure what the purpose of the 0-check is. Maybe this is just an edge case, but for my test image, the 0-check prevents mounting the LVM.