In this guide, I will show you how to connect a cheap, high-capacity external hard drive (HDD) to your Ubuntu Linux server, partition it safely, and share it over Samba. You will be able to archive your video projects directly from your Mac with full Gigabit speeds.
The best part? The network drive remains invisible to everyone else on the network, keeping your footage secure.
Step 1: Identify & Format the Drive
Connect your hard drive via USB to your server. First, list all connected drives in the terminal to identify the correct device path:
lsblk
Look for your new drive based on its size (e.g., sdc or sdc1). Once identified, format the partition directly to the robust Linux native ext4 file system:
sudo mkfs.ext4 -L <YOUR_DRIVE_LABEL> /dev/<YOUR_DRIVE_PARTITION>
(Example: Replace /dev/<YOUR_DRIVE_PARTITION> with your specific path like /dev/sdc1).
Step 2: Create a Mount Point & Adjust Permissions
We will create a clean mounting directory directly under /media and transfer full read/write ownership to your standard Linux user account:
sudo mkdir -p /media/<YOUR_MOUNT_FOLDER_NAME>
sudo chown -R <YOUR_SERVER_USERNAME>:<YOUR_SERVER_USERNAME> /media/<YOUR_MOUNT_FOLDER_NAME>
sudo chmod -R 750 /media/<YOUR_MOUNT_FOLDER_NAME>
Step 3: Mount Automatically on Boot (fstab)
To make sure the drive mounts automatically after every server restart, we use its unique UUID. Find your drive’s UUID with this command:
sudo blkid | grep <YOUR_DRIVE_PARTITION>
Copy the long string inside the quotes (UUID="..."). Next, open the system configuration file:
sudo nano /etc/fstab
Scroll to the very bottom and append the following line. The nofail flag is critical here—it ensures your server still boots normally even if the USB drive is unplugged during a restart:
UUID=<YOUR_DRIVE_UUID> /media/<YOUR_MOUNT_FOLDER_NAME> ext4 defaults,nofail 0 2
Save the file by pressing Ctrl + O, hit Enter to confirm, and exit using Ctrl + X. Test your mount line immediately with:
sudo mount -a
Step 4: Optimize Samba for macOS (smb.conf)
To make the share extremely stable, lightning-fast, and natively compatible with Apple metadata files, we need to optimize our Samba configurations.
Open your Samba configuration file:
sudo nano /etc/samba/smb.conf
Global Apple Settings
Add these parameters right under the [global] block. This minimizes file-browsing latency on macOS and handles resource forks natively:
[global]
min protocol = SMB3_00
# Apple related settings
ea support = yes
vfs objects = catia fruit streams_xattr
fruit:encoding = native
fruit:metadata = stream
fruit:model = MacSamba
fruit:posix_rename = yes
fruit:veto_appledouble = no
fruit:zero_file_id = yes
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
Create the Private Archive Share
Scroll to the absolute bottom of the file and define your hidden share block. Setting browsable = no prevents the drive from automatically showing up in anyone’s network sidebars:
[<YOUR_SHARE_DISPLAY_NAME>]
comment = Private Video Project Archives
path = /media/<YOUR_MOUNT_FOLDER_NAME>
writable = yes
valid users = <YOUR_SERVER_USERNAME>
guest ok = no
browsable = no
vfs objects = catia fruit streams_xattr
fruit:aapl = yes
Save by pressing Ctrl + O, exit with Ctrl + X, and restart the Samba daemon to apply your settings:
sudo systemctl restart smbd
Step 5: Connect on Your Mac
Because the share is hidden from network discovery, you have to target the path manually in Finder:
- Open Finder on your Mac.
- Press Command + K (Connect to Server).
- Enter the exact network address:
smb://<YOUR_SERVER_USERNAME>@<YOUR_SERVER_IP_OR_HOSTNAME>/<YOUR_SHARE_DISPLAY_NAME>
- Authenticate using your server username and password.
Your clean, wireless studio archive is now active in your macOS sidebar. Once you verify everything is transferring smoothly, reboot your server one last time with sudo reboot to make sure your auto-mounting works flawlessly.
PS: I also made a YT video on this: