How-To: Mount an ext4 partition on macOS
Sometimes it may be necessary to mount a native Linux ext4 file system partition on your Mac to access the data. For example, if you are using an external USB 3.0 hard drive for backups of your NAS (Synology, or something similar) and want to access the data on a MacBook. ext4 (or alternatively NTFS or HFS+) can be be used instead of exFAT for that purpose*.
This guide describes the use of FUSE for macOS and ext4fuse to enable read-only access to the partition on macOS Mojave (10.14). It is recommended not to enable read-write access.
You can install ext4fuse with Homebrew by executing the following in your Terminal:
brew install ext4fuse
Plug in the hard disk drive and execute
diskutil list
to see all the available drives.
If it's an external drive, you should see something like this:
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *5.0 TB disk2
1: Linux Filesystem 5.0 TB disk2s1
You can then create an empty folder inside your home directory (~/) to avoid having to mount as root with sudo. You can do the following:
cd ~
mkdir mnt
ext4fuse /dev/diskXsY mnt
ls -la mnt
diskXsY can be something like disk2s1. Instead of mnt you can also use any other directory name.
A new drive should then appear within your home directory like this:
To unmount execute:
umount ~/mnt
or click on the small "eject" button in Finder. Execute mount in the terminal to see all mounted drives make sure the ext4 file system is unmounted.
Permissions
It may be necessary to add your user to the group "_lpoperator" to get read access to the data.
Execute the following with "bob" as your user name (get it by executing whoami):
sudo /usr/sbin/dseditgroup -o edit -a bob -t user _lpoperator
You can also check if your user is in the group with:
dseditgroup -o checkmember -m bob _lpoperator
This should return something like "yes bob is a member of _lpoperator"
Alternatively you can also add ALL users (specifically: the group "everyone") to the group _lpoperator:
dseditgroup -o edit -a everyone -t group _lpoperator
Alternative solutions
Keep in mind that one alternative solution to accessing data from an ext4 file system would be to use a Linux virtual machine, for example with VirtualBox, and then mount the drive inside the VM. ext4 is natively supported by Linux, so that way you can safely read and write to the disk.
Additional info & links
StackExchange posts regarding the topic of how to mount and access a Linux EXT4 partition on a Mac (macOS):
Info about dseditgroup:
Similar articles and blog posts:
* Be aware that there might be issues opening the .bkpi File on an ext4 partition. Usually exFAT works smoother and is natively supported on Windows and Mac, but requires you to purchase an additional package from Synology for a small fee. Because extFAT is know to cause problems, consider using NTFS or HFS+ as alternatives, but be aware that for both you will need to purchase additional software to access them on both Mac and Windows.