Monday, April 14, 2014

IOLVMPartitionScheme - Basic Linux LVM support in Mac OS X

Today I'm publishing a new project on github:

Some time ago I wrote a Mac OS X kernel extension for parsing and exposing simple Linux LVM volumes as partitions, mostly for my own use at home since I have various Linux distributions set up on many of my Macs. Many of those use an LVM layout for the root file system, which means Mac OS X cannot access it (e.g. using fuse-ext2).
Today the code is available on github under an LGPL v2.1 license. This should hopefully be usefeul to anyone having the same problem as I did.

This kernel extension simplifies an LVM layout into a partition scheme. This means that only single-PV LVM layouts are supported and only contiguous simple LVM volumes are exposed as partitions.
It has not been widely tested, only by myself internally. Feedback is much appreciated.
Possible future development may include extending this kernel extension to fully supporting LVM concatenated volumes spanning several drives, snapshots, etc. (This is not currently planned.)

Precompiled kernel extension:
IOLVMPartitionScheme-2014.11.15.tar.bz2 (source code)

Supported Mac OS X versions: 10.5 and higher (i386, x86_64 and ppc kernels are supported)

Please report any problems encountered as issues on github:

Old versions:
IOLVMPartitionScheme-2014.4.14f1.tar.bz2 (source code)
IOLVMPartitionScheme-2014.4.14.tar.bz2 (source code)


Dustin Wright said...

Would this work /w an iSCSI device? I installed your kext but the LVM volumes don't appear when I connect to iSCSI.

This would be really great feature.

Erik said...

Dustin Wright, November 19, 2014 at 6:52 PM:

I have never personally used iSCSI, but as long as it exposes the devices as if they were normal disks (i.e. as /dev/disk, /dev/rdisk) then I suppose it should work.

However please keep in mind the limitation of this kernel extension... you will only be able to access single-disk, non-fragmented LVM volumes... no mirrors, stripes, concatenated volumes.

I have made a few fixes recently and I just updated the kernel extension to version 2014.11.15. Please try again with the version... if it still does not work then please create a new issue on github including dmesg output.

Mario Brenes said...

I added the extension to the kernel now what is supposed to happen? Will the partitions mount automatically? How do I use the extension?

Erik said...

Mario Brenes, December 29, 2014 at 4:57 PM:

This partition scheme driver only parses the LVM layout and exposes it as partitions.
If it works, you you should see subvolumes appear under the LVM partition in Disk Utility.

You have to use a file system driver that supports the file system that is used on the LVM volume to actually mount it. In the Ext2/3/4 case, fuse-ext2 should do it.