The Raspberry Pi 3 + external 4TB drive setup, originally I tried to set it up as Plex server. And the CPU is just not powerful enough.
I decided to convert it to a NAS for Time machine purpose.
Follow this post to install netatalk and other related setup.
Note that it's wrong info about afp configuration (Edit the file /etc/afp.conf) section.
To configure afp, you should edit
sudo nano /etc/netatalk/AppleVolumes.default
, as stated in this post (File sharing with OSX).
To share the storage with Window machines, install samba.