PDA

View Full Version : HOWTO: Mounting ext4 in LVM2


elmo
February 9th, 2012, 08:45
Hi there! As a FreeBSD newbie I found it hard to find this information (how to mount your Linux ext4 filesystems on LVM2 in FreeBSD) on the interwebs, so I'm posting it here for another clueless Linux convert like me.

Prerequisites: FreeBSD 9.0 with ports. I used the amd64 version.

The process is actually extremely simple, once you know the right tools. You only need to:
Gain access to the LVM logical volumes (Now the volumes should appear in /dev/linux_lvm/)
Get the ext4 filesystem driver,
Mount happily away!
Maybe chown, if needed

# kldload /boot/kernel/geom_linux_lvm.ko
# cd /usr/ports/sysutils/fusefs-ext4fuse/
# make install clean
# mkdir /mnt/blah
# ext4fuse /dev/linux_lvm/volumegroup-logicalvolume /mnt/blah
# cp -r /mnt/blah/home/username/stuff /home/username/stuff
# chown -R username /home/username/stuff

vermaden
February 12th, 2012, 02:30
Nice, did not even know that FreeBSD would let me use Linux LVM and then even mount ext4.

Seems that the old sentence about FreeBSD is still true:
"FreeBSD can be Linux, but Linux can't be FreeBSD" ;)