UPDATE: In the next major update (4.3), Synology will be supporting HSF+ natively. If you really need this functionality, I highly recommend downloading the 4.3 beta.
———————————-
I recently purchased a Synology DS213Air NAS to backup all my files. Since I use a Mac at home, there were several HFS+ volumes that I needed to transfer data from. Mounting these disks isn’t quite natively supported right now, but it’s possible to mount these disks using the terminal.
Prerequisites:
Synology NAS running DSM 4.2 or later
Minor terminal ninja skills
Preparation
Removing journaling from your USB drive (Synology doesn’t support this feature)
- Insert your USB disk in your Mac
- Open “Disk Utility” application
- Select the disk on the left hand side
- Hold the option key, go to the file menu and select “Disable Journaling”
- You won’t receive a confirmation, but the “Enable Journaling” icon will be lit up when you’re successful
Turn on SSH
- Log into your Synology web interface
- Select “Control Panel”
- Select the “Terminal” icon
- Check the box next to “Enable SSH Service”
- Click on “Apply” and then close the control panels
Create a new shared directory
- Log into your Synology web interface
- Select “File Station”
- Select “Create” and then “Create New Shared Folder”
- Give the shared folder a short name, I called mine “USB1”
- Select “OK” and then close
Mounting the Drive
After you’ve completed each of those above sections, open up the Terminal application on your Mac.
- Insert your USB drive into the Synology NAS
- Verify the disk is recognized by clicking on the USB icon in the top right
- Log into your Synology NAS
$ ssh root@<synology nas ip address> (e.g. root@192.168.1.2) - Get a listing of all the disks in your Synology
$ fdisk -l (lowercase L)Disk /dev/sda: 2199.0 GB, 2199023255040 bytes255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sda1 1 267350 2147483647+ ee EFI GPT
fdisk: device has more than 2^32 sectors, can’t use all of themDisk /dev/sdb: 2199.0 GB, 2199023255040 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee EFI GPTDisk /dev/sdq: 4022 MB, 4022337024 bytes
255 heads, 63 sectors/track, 489 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sdq1 1 490 3928063 ee EFI GPT
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(1023, 254, 63) logical=(0, 0, 2)
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(489, 5, 27)Disk /dev/sdr: 1000.1 GB, 1000170586112 bytes
255 heads, 63 sectors/track, 121597 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sdr1 1 121598 976729087+ ee EFI GPT - USB Drives will appear on the bottom. Each HFS+ drive will actually have at least two partitions listed. The first which is of the “EFI GPT” type and the second which is the HFS+ drive with the data (or others if you have the drive formatted with multiple partitions)
- Find the location you need to mount by looking near the bottom for the drive information. Add one to the location to find the partition after the “EFI GPT”. For example, the drive shown in bold has the location of “/dev/sdr1”. Therefore, the HFS+ drive is “/dev/sdr2”. Different drives have different names and numbers.
- Mount the drive to the shared folder you created earlier
$ mount -t hfsplus /dev/sdr2 /volume1/USB1/
All done! Now you can explore the drive using the “File Station” or by using the terminal.
Gotchas
- When copying files over using the terminal, make sure you use “cp -r” even if you’re copying a single file due to the differences in file systems.
- This mount is only temporary (until you remove the drive or reset the NAS), if you want to make it permanent, see this article for more information on making it permanent
- Make sure you unmount the disk when you’re finished with it (via the terminal or UI). Journaling was disabled so the drive is more prone to corruption if it’s not removed safely.
Related links
Thank you for your help!
It worked great the first time…then I tried to eject the drive through DSM4.2 and use the drive on my mac. After plugging the drive back into my DS213 and trying to mount the drive again, this time the procedure would not work.
I ejected the drive again and plugged it into my mac and did a scan with DiskUtility. It reported that the drive was corrupted and could not be repaired! Luckily a scan and repair with DriveGenious did the trick and repaired the drive; now the drive scans OK.
However, after plugging the drive back into the DS213 and retrying your procedure, I get this response from terminal, which I had not seen before:
BusyBox v1.16.1 (2013-04-16 20:15:54 CST) multi-call binary.
Usage: mount [OPTIONS] [-o OPTS] DEVICE NODE
Mount a filesystem. Filesystem autodetection requires /proc.
Options:
-a Mount all filesystems in fstab
-f Update /etc/mtab, but don’t mount
-n Don’t update /etc/mtab
-r Read-only mount
-w Read-write mount (default)
-t FSTYPE Filesystem type
-O OPT Mount only filesystems with option OPT (-a only)
-o OPT:
loop Ignored (loop devices are autodetected)
[a]sync Writes are [a]synchronous
[no]atime Disable/enable updates to inode access times
[no]diratime Disable/enable atime updates to directories
[no]relatime Disable/enable atime updates relative to modification time
[no]dev (Dis)allow use of special device files
[no]exec (Dis)allow use of executable files
[no]suid (Dis)allow set-user-id-root programs
[r]shared Convert [recursively] to a shared subtree
[r]slave Convert [recursively] to a slave subtree
[r]private Convert [recursively] to a private subtree
[un]bindable Make mount point [un]able to be bind mounted
bind Bind a file or directory to another location
move Relocate an existing mount point
remount Remount a mounted filesystem, changing flags
ro/rw Same as -r/-w
There are filesystem-specific -o flags.
What do I do now?
Are you sure you’re typing in the command correctly? Generally you’ll see a “usage” reply when the command you’re typing in isn’t syntactically correct.
Thanks for the clear instructions this worked great for my hfs+ drives.
Any idea if this could be scripted so that they auto mount like regular drives (would be great for mac usb sticks).
First problem I hit is:
fdisk: device has more than 2^32 sectors, can’t use all of them
2nd is I try every single dev/sdaX & none of them work:
mount: mounting /dev/sda5 on /volume1/storage-usb failed: Device or resource busy
Great write up! Worked as a charm.
I’m having have the same problem as poster above – failed: Device or resource busy
Any ideas?
jeez guys really?! it’s 2013 and Synology doesn’t let us mount hfs+ drive on the external usb of the nas? I was about to buy a nas from them (DSM and the specs look good) but I’m changing my mind! Please do you know if Qnap NAS produtct offer better hfs+ support? Thanks
Upgrade to the latest beta. It supports HFS+ natively now.