Issues with mounting a HFS+ drive

I am trying to attach a HFS+ formatted, USB drive. This is somewhat related to my other posting: Mount read-write HFS+ drive in OpenWRT.

I installed the necessary packages: hfsfsck , kmod-fs-hfs , kmod-fs-hfsplus , mkhfs , and sshfs.

I created a mounting directory: /mnt/jetdrive.

I added a dummy file to the directory to make it easy to determine if the drive is actually mounted:

# ls -al /mnt/jetdrive
drwxr-xr-x    1 root     root            48 Sep 10 18:50 .
drwxr-xr-x    1 root     root            58 Sep 10 18:50 ..
-rw-r--r--    1 root     root             0 Sep 10 18:49 jetdrive not mounted.txt

Got the device specifics:

# lsblk -f
...
sdc                                                                                
|-sdc1       vfat              EFI            67E3-XXXX                            
`-sdc2       hfsplus           JetDrive 500GB dfeb02d3-XXXX-XXXX-XXXX-54d540ac16eb 

For some reason, the hfsplus partition’s UUID isn’t included in the UI’s list, but the vfat partition is:

I used the custom option to add the hfsplus partition’s UUID, which resulted in the fstab file:

config mount
	option enabled '1'
	option target '/mnt/jetdrive'
	option fstype 'hfsplus'
	option options 'force,rw'
	option enabled_fsck '1'
	option uuid 'dfeb02d3-XXXX-XXXX-XXXX-54d540ac16eb'

The UI thinks that the device isn’t presented:

Which is supported by listing the directory:

# ls -al /mnt/jetdrive/
-rw-r--r--    1 root     root             0 Sep 10 18:49 jetdrive not mounted.txt

If I mount the device using /dev/sdc2:

config mount
	option enabled '1'
	option target '/mnt/jetdrive'
	option fstype 'hfsplus'
	option options 'force,rw'
	option enabled_fsck '1'
	option device '/dev/sdc2'

the mount is successful:

# ll jetdrive/
-rw-r--r--    1 99       99            6148 Aug 13  2017 .DS_Store
dr-xr-xr-t    1 root     root             2 Jun 29  2017 .HFS+ Private Directory Data?/
drwx------    1 99       99               5 Jun 29  2017 .Spotlight-V100/
drwx------    1 99       99               5 Sep 10 18:39 .fseventsd/
----------    1 root     root      41943040 Jun 29  2017 .journal
----------    1 root     root          4096 Jun 29  2017 .journal_info_block

Questions:

  • Can hfsplus devices be mounted using the UUID?
  • Does it matter if I use the front or rear USB port? Does this result in a different /dev listing?

Ultimately, I would like to make /mnt/jetdrive read-only if the device doesn’t mount successfully (to prevent damage to the flash memory), but read-write if it is successful. Can this be done?