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*.
Plug in the hard disk drive and execute
to see all the available drives.
If it's an external drive, you should see something like this:
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:
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:
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.
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):
You can also check if your user is in the group with:
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:
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.