Goal is to have a data store between MacOS and Linux (Ubuntu Server on a Raspberry Pi 4), with the main use case being for Plex Media Server.
The hard drive:
- A single 12TB USB HDD.
The systems:
- Ubuntu Server on a Raspberry Pi 4
- MacOS Big Sur on a MacBook Pro
Goal:
- Either direct compatibility between the systems,
- or, Samba sharing between the systems
Considerations:
- Encryption is optional
- Data integrity desirable
- Hard drive should be allowed to sleep when not in use
uname -a
of the Raspberry Pi 4 is:
Linux ubuntu 5.8.0-1010-raspi #13-Ubuntu SMP PREEMPT Wed Dec 9 17:14:07 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
Finder copy works, and diff -rq
confirms everything as intended.
However, I could not get ExFAT being read-write, it was only ever read-only.
The M1 Mac Mini did not support my Yeti X microphone, nor did it support APFS time machine over LAN (APFS volumes over LAN would be reported as read only by the client machine).
This lead me to return the M1 Mac Mini and look to using my Raspberry Pi 4 for this instead.
Finder copied the data over successfully, however running diff -rq
on the result files, provided many ._
files that contains the missing metadata (as Ext4 does not support metadata natively), however more concerningly, is two files did not have matching checksums, indicating file corruption that was unreported by finder.
This lead me to look for file systems that have built in data integrity features.
Finder copy works, and diff -rq
confirms everything as intended.
However, the APFS drivers do not build on the Rasberry Pi 4.
Can't seem to get it working with Samba or SFTP. Nothing shows up at /$pool
.
It just works.
# via rsync, file by file progress
# --archive, -a: archive mode; equals -rlptgoD (no -H,-A,-X)
# --recursive, -r: recurse into directories
# --links, -l: copy symlinks as symlinks
# --perms, -p: preserve permissions
# --times, -t: preserve modification times
# --group, -g: preserve group
# --owner, 0o: preserve owner (super-user only)
# -D: same as --devices --specials
# --devices: preserve device files (super-user only)
# --specials: preserve special files
# --human-readable, -h: output numbers in a human-readable format
# --checksum, -c: skip based on checksum, not mod-time & size
# --acls, -A: preserve ACLs (implies --perms)
# --xattrs, -X: preserve extended attributes
# --atimes, -U: preserve access (use) times
# --crtimes, -N: preserve create times (newness)
# --delete: delete extraneous files from dest dirs
# --partial: keep partially transferred files
# --progress: show progress during transfer
# -P: same as --partial --progress
rsync -ahcAXUNP /media/plex /mnt/tank/Plex
# verify
# --dry-run, -n: perform a trial run with no changes made
# --itemize-changes, -i: output a change-summary for all updates
rsync -inahcAXUNP /media/plex /mnt/tank/Plex
# via gcp, overall progress
# -a, --archive: same as -dR --preserve=all
# -d: same as --no-dereference --preserve=links
# -R, -r, --recursiveL copy directories recursively
# -v, --verbose: display what is being done
# -p: same as --preserve=mode,ownership,timestamps
# --preserve PRESERVE: preserve specified attributes; accepted values: 'all', or one or more amongst {'ownership', 'timestamps', 'mode'}
sudo apt install gcp
gcp -av /media/plex /mnt/tank/Plex
# via scp
# -p: Preserves modification times, access times, and modes from the original file.
# -r: Recursively copy entire directories. Note that scp follows symbolic links encountered in the tree traversal.