How to access LVM partitions on OS X?

Solution 1:

I had the same problem... to address this issue I created a Mac OS X kernel extension which maps simple Linux LVM layouts to logical partitions in Mac OS X:
https://github.com/unsound/IOLVMPartitionScheme

It's available under an open source license (LGPLv2.1). It's not a complete volume manager, obviously, so only single-disk LVM layouts can be expected to work, and only non-snapshot volumes, etc. but should be good enough for most automatically created LVM layouts for the boot drive.

You still have to find a way to mount the ext3 volume though... fuse-ext2 should do the trick.

Edit: More info, including a binary, is available on my blog.

Solution 2:

OS X Cannot read an LVM Volume, and there are no 3rd party drivers at the moment (or that I'm aware of) to do so. The easiest solution would be to boot off a linux live cd (Ubuntu etc) on your imac, mount the drive, and copy the data elsewhere.

You could also maybe try installing a Linux virtual machine using one of many 3rd party products (VMware Fusion, Parallels, Virtual Box), and mount the volume in there.


Solution 3:

The diskutil cs list command is what you're looking for. Try that at the terminal. Then type diskutil cs for a short list of CoreStorage commands you can use. I wrote more about it on my blog here:.


Solution 4:

I went with Ryan's solution and it worked. Note that using a virtual machine for data transfer will be slower than booting directly into a live cd. Here's a more in detail how to:

Assuming your disk is on a usb device:

  1. Grab virtualbox with extension-pack (usually works better) Example using brew and brew cask:

    brew cask install virtualbox virtualbox-extension-pack

  2. Download a virtualbox ubuntu image (could be an other distro too btw, i used Ubuntu Linux 15.04 x86_64 with password reverse)

  3. Configure a shared folder from the settings (optional, do this only if you want to copy data from disk to your mac)

  4. Enable USB Controller from Ports settings (I used USB 3.0 (xHCI) controller)

    virtualbox-ports-usb-settings

  5. Start the vm

  6. Insert guest cd from virtualbox menu devices > Insert guest cd image and install it, (I did this, but I don't know if it was necessary for usb support).
  7. Open a terminal in ubuntu and install lvm2

    sudo apt-get install -y lvm2
    
  8. Make sure all disks from the usb device are ejected on your mac side

  9. Click the usb icon bottom right (Mine was a seagate, don't judge me) :P

    virtualbox usb icon bottom right menu

If things went well, you should see your lvm volume(s) in the sidebar of the ubuntu's file browser (Nautilus). It should automount into /media/ubuntu/<name_of_lvm_volume>

Otherwise, you may have to follow How to mount lvm partition on ubuntu.

Enjoy :)