I have RAID 5 self-powered external array in here, and I can't mount it.

pi@raspberrypi:~ $ lsblk
sda           8:0    0 36.4T  0 disk
├─sda1        8:1    0  200M  0 part
└─sda2        8:2    0 36.4T  0 part
mmcblk0     179:0    0 59.5G  0 disk
├─mmcblk0p1 179:1    0 41.8M  0 part /boot
└─mmcblk0p2 179:2    0 59.4G  0 part /

FS is HFS+, so I've installed hfstools and tried this:

pi@raspberrypi:~ $ sudo mount -t hfsplus -o force,rw /dev/sda2 /media/vault
mount: mount /dev/sda2 on /media/vault failed: File too large

You are trying to mount 36.4 terrabyte. Wikipedia says to mounting HFS+ partitions on Linux:

In 2009, these drivers were diagnosed to be corrupting HFS+ drives with a capacity greater than 2 TB.[19] Consequently, Linux distributions such as Debian and Ubuntu also stopped allowing mounting of HFS+ drives or partitions greater than 2 TB. As of February 2011, work is in progress to lift this restriction. [21]

  • What a sad life, so there's totally no way to use HFS+ in Linux..?
    – holms
    Apr 12 '18 at 18:09
  • @holms Don't know, I use debian with its default file system ext4. But it seems there is some hope for HFS+. I have updated my answer. Quote: "As of February 2011, work is in progress to lift this restriction." Follow note [21]
    – Ingo
    Apr 12 '18 at 22:18
  • Okay there's seems to be Paragon ntfs/hfs+ for linux 9 product working just fine. Software costs 25£ and fine with paying this amount, as I'll be using this raid array a lot under under mac too not just for rpi
    – holms
    Apr 15 '18 at 0:15
  • Is this because Raspbian is 32-bit? Will it work with a 64-bit Raspbian? I have a normal mdadm array that isn't mounting also and giving the same error. I don't know if it's HFS+. Jul 13 at 18:01

So, I was trying to mount my 64 TB array, and it didn't work with the same error. I thought the 2 TB limit has something to do with 32-bit, and it does. Here's the soluion:

Change your raspberry pi kernel to a 64-bit kernel

You can do this with Raspberry Pi 4, not with the older ones. To do this:

First, make sure you're using Debian Buster (version 10) or later by running this:

lsb_release -a

The output should be:

Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

(if it's not buster, please stop... I can't guarantee the outcome. Find out how to upgrade to buster then come back).

Then update and upgrade your system to the latest of everything:

sudo apt-get update
sudo apt-get upgrade

And then make sure that you DO have the 64-bit kernel file:

ls /boot/kernel8.img

If this exists and doesn't give an error, you're probably good to go.

WARNING: This may fail and you may need to revert it. I'll give you an example on how this failed for me and I honestly don't know if there was another reason. But if it does fail, make sure you have a Linux system somewhere where you can edit the configuration file I'll be talking about without booting the system. Simply insert the SD card, and edit config.txt in the boot partition (which will be a drive on its own in Ubuntu and similar systems).

To switch to 64-bit:

  1. edit the fail /boot/config.txt
  2. find the section [pi4] in that file
  3. if the section doesn't exist, add it at the end of the file (simply add [pi4] at the end of the file)
  4. after adding that section, add under it arm_64bit=1
  5. reboot
  6. if it boots, run uname -a, and it should show you aarch64 within the text of the result. This means you succeeded.

Now, if it doesn't boot. For me, it didn't boot the first time because I added the arm_64bit=1 in the wrong section. Quite frankly I have no idea if this is the only reason. But I took my SSD (I don't use an SD card), plugged it into another computer, changed that, and then it booted. So, you gotta give it a shot.

PS: Not everything works out of the box on 64-bit. Kodi, Java and Wolfram Mathematica have problems (not impossible to fix, but needs work). Please investigate these on your own.

After this, mounting my array with mdadm worked.

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.