4

I attached an 'old' SSD drive that I removed from my Mac, to my Turris Omnia via one of its two USB 3 ports.

While I've been able to mount the device, it's in read-only mode. I can't seem to mount it in read/write mode.

Steps:

identifying the drive:

root@turris:/# fdisk -l

Disk /dev/mtdblock0: 1 MiB, 1048576 bytes, 2048 sectors 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disk /dev/mtdblock1: 7 MiB, 7340032 bytes, 14336 sectors 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disk /dev/mmcblk0: 7.3 GiB, 7818182656 bytes, 15269888 sectors 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disklabel type: dos 
Disk identifier: 0x77f5941d

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       2048 15269887 15267840  7.3G 83 Linux

Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disk /dev/sda: 465.9 GiB, 500277790720 bytes, 977105060 sectors 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disklabel type: gpt 
Disk identifier: 6FD6A401-727C-43A0-92A5-XXXXXXXXXX

Device      Start       End   Sectors   Size Type
/dev/sda1      40    409639    409600   200M EFI System
/dev/sda2  409640 976842879 976433240 465.6G Apple HFS/HFS+

mounting the drive:

root@turris:/# mount -t hfsplus /dev/sda2 /mnt/jetdrive

listing drive's contents:

root@turris:/# ls -al /mnt/jetdrive
drwxrwxr-x    1 root     root            13 Nov 13 10:07 .
drwxr-xr-x    1 root     root            44 Nov 13 20:37 ..
-rw-r--r--    1 99       99           10244 Nov 13 10:10 .DS_Store
dr-xr-xr-t    1 root     root             2 Nov 13 10:06 .HFS+ Private Directory Data?
drwx------    1 99       99               5 Nov 13 10:06 .Spotlight-V100
drwx------    1 99       99               5 Nov 13 10:11 .fseventsd
----------    1 root     root      41943040 Nov 13 10:06 .journal
----------    1 root     root          4096 Nov 13 10:06 .journal_info_block
drwxr-xr-x    1 99       99               5 Nov 13 10:10 Music
drwxr-xr-x    1 99       99               4 Nov 13 10:09 Pictures

create a file:

root@turris:/mnt# touch /mnt/jetdrive foobar
touch: /mnt/jetdrive: Read-only file system

I tried the approach listed in this answer, but that causes problems:

root@turris:/mnt# mount -t hfsplus -o remount,rw /dev/sda2 /mnt/jetdrive
mount: /mnt/jetdrive not mounted or bad option

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

What am I doing wrong? Can a HFS+ drive be mounted in a read/write manner?

1

3 Answers 3

3

My HFS+ drive would only remount as read-only (ro) after a power-loss. You can see this in the boot logs:

dmesg | grep hfsplus
# [    8.421832] hfsplus: Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended.  mounting read-only.

I resolved this by adding a small script to /etc/rc.local to unmount, run fsck.hfsplus and remount on startup. Works like a charm.

{
    echo "*** Mounted dirs *************************"
    ls /mnt
    echo "*** Unmounting disk **********************"
    umount /mnt/samsungT5
    echo "*** Performing fsck **********************"
    fsck.hfsplus /dev/sda1
    echo "*** Remounting disk **********************"
    mount -t hfsplus -o rw /dev/sda1 /mnt/samsungT5
    echo "*************************"
} 2>&1 > /tmp/rc.local.log
1
  • How much time does this add to the initialization sequence?
    – craig
    Commented Feb 14, 2020 at 22:50
1

Had a similar problem. Tried installing packages suggested here with no success. I ended up reformatting the disk and disabling journaling (just as I had done the first time) and it worked. The second time around I made sure I safe unmounted the disk before disconnecting it from the Mac I was using

1
  • 1
    It happened to me again (I had a power blackout, the router rebooted, and the problem reappeared). Instead of reformatting the drive this time, I mounted the drive on my Mac and run: sudo fsck_hfs -l 1 /dev/disk2s2 then remounted the drive on my router. It seems to be fine now Commented Feb 6, 2017 at 17:47
1

It seems that not only journal and unclean unmount is causing the issues.

After checking the filesystem and fixing it to be clean, on router still:

dmesg | grep hfs
[ 1728.605465] hfsplus: write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.

Adding this to Mount options in System/Mount Points resolved the issue:

force,rw,noatime

now mount command shows:

/dev/sda1 on /mnt/sda1 type hfsplus (rw,noatime,umask=0,uid=0,gid=0,nls=utf8)

Start SAMBA again

service samba start

and access the router shared drive with smb://routername_or_ip and form Windows just \\routername_or_ip I was able to write the files afterwards.

Hope it helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .