Mount NTFS drive on Paspberry 4

Having a spare SSD harddrive and the new Raspberry 4 running Raspbian Buster (Debian 10.0 – Buster) I wanted to expand the storage with the 125GB SSD. I plugged it in with the SATA 22pin USB 3.0 connector but like most things it is not that simple.. running fdisk the SSD does not show the volume out of the box.

Goals in this post:

  1. Get support for NTFS drives
  2. Mount NTFS USB drive
  3. Automount on reboot
  4. Share in your network
 $ sudo fdisk -l

Before you start you might want to update

$ sudo apt-get update
$ sudo apt-get upgrade

You need to istall ntfs-3g before the system can understand the windows format.

 $ sudo apt-get install ntfs-3g

Now you can see the SSD

 $ sudo fdisk -l
Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1        2048 234438655 234436608 111.8G  7 HPFS/NTFS/exFAT

Create a directory

 $ sudo mkdir /mnt/128Gb

And mount the SSD to that folder

 $ sudo mount /dev/sda /mnt/125Gb/

If this does not work, you probablue need to reboot

Now set correct permissions

sudo chgrp YOUR-GROUP/mnt/125Gb
sudo chmod 770 /mnt/125Gb/

Set it to do it automatically after reboot

sudo cp /etc/fstab /etc/fstab.backup
sudo nano /etc/fstab

Use your own folde name and UUID which you can see running

blkid
UUID=D088269688267B5C/mnt/125Gbntfs-3g async,big_writes,noatime,nodiratime,nofail,uid=1000,gid=1000,umask=007 0 0

Now share the folder with windows

sudo nano /etc/samba/smb.conf

Restart the samba service

sudo systemctl restart smbd.service