Background
I was trying to use netatalk
to create Time Capsule
using an Raspberry Pi 3
, following the tutorial here. Some version info:
- netatalk 3.1.12
- macOS 10.14.5
- Raspberian 4.19.50-v7+
Issues and findings
After reaching the last part of the tutorial, and able to connect over afp://
, I realised that the volume is read-only.
I re-read the tutorial and realised that I didn't do the first step, because the drive is already HFS+. My guess is the ignore ownership on this volume
is essential for netatalk
to work properly.
Result / Symptom list
- [✔︎] able to connect over
afp://
- [✔︎] able to mount the external drive on
RPi
- [] mounted drive on
RPi
isread-only
- [] some of the directory can't be read, neither
RPi
nor viaafp://
- i.e.
cp
result incp: cannot open 'filename' for reading: Permission denied
- i.e.
- [] unable to mount the external drive on macOS
- [] volume is read-only on macOS over
afp://
The configurations used
/etc/fstab
proc /proc proc defaults 0 0
PARTUUID=7e67b292-01 /boot vfat defaults 0 2
PARTUUID=7e67b292-02 / ext4 defaults,noatime 0 1
/dev/sda2 /media/tm hfsplus force,rw,user,auto 0 0
/etc/netatalk/afp.conf
; Netatalk 3.x configuration file
;
[Global]
; Global server settings
; [Homes]
; basedir regex = /xxxx
;[My AFP Volume]
;path = /media/tm
[Timestone]
path = /media/tm
time machine = yes
/etc/nsswitch.conf
passwd: files
group: files
shadow: files
gshadow: files
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
/etc/avahi/services/afpd.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=TimeCapsule</txt-record>
</service>
</service-group>
Attempts to fix
- macOS mount doesn't work
- macOS force mount doesn't work
- macOS gui
diskutil first aid
is unable - macOS cli diskVerify is unable to mount and stopped
- macOS cli diskRepair is unable to mount and stopped
- RPi fsck does not seems to fix the problem
- RPi fsck.hfsplus does not seems to fix the problem
Questions and directions
The drive is able to be mounted read-only with some barred access on RPi, the data is likely to be safe. Currently, the drive refuses to mount on macOS, so I can't use macOS to enable the ignore ownership on this volume
.
How come the volume (HFS+, created and used on macOS) is mountable on RPi after the tutorial and became unmountable on macOS afterwards?
Give the symptoms, is there any key step that cause this (besides not check ignore ownership on this volume
)?
Are there some tracks as a resolution? to either:
mount the drive on macOS, which allow me to fix the permission and backup the data
fix the permission on RPi, so the backup and be done via
afp://
or, any better suggestions to overcome these obstacles.