How to use the SATA port

  • FreedomBox is plugged into a router at home
  • Running Freedombox 19.2 up to date

Hi,

I would like to attach a bigger hard drive to the Freedom box so I can sync my smartphone photos and documents from my PC to serve as a backup. I’m not planning on streaming or anything else too demanding, just backup.

Ideally it would be good to have two sata drives so one can act as mirror (not RAID). I’ve been searching online but I’m struggling to find how to put it together from the hardware side (i.e. do I just get a two bay sata enclosure and conect it up?). Also, I am assuming I would use Syncthing across my PC, smartphone and Freedom box?

Any recommendations would be much appreciated.

Thanks,

Rob

If you are only going to use Syncthing on both the SATA disks, I think this setup would be overly redundant. Syncthing maintains full copies of synced folders on all the configured devices. If your photos are synced across smartphone, PC and FreedomBox, do you really need a fourth copy of the same?

The Pioneer edition hardware supports one SATA port to which I once connected a laptop SATA disk with external power supply. Didn’t try connecting multiple SATA disks though.

Also, note that FreedomBox 19.2 doesn’t automatically mount SATA disks (though it might in some future version), so you have to write the /etc/fstab entry for the SATA disk yourself.

Thanks. How do I write the /etc/fstab entry for the SATA disk?

Run the full command:

blkid

You get the following looking output:

/dev/sda1: UUID="f4506c81-9ba1-49a7-8138-d685f4e7317c" UUID_SUB="c63f6edc-147f-4b2c-af5e-6da787ec0486" TYPE="btrfs" PARTUUID="ed5eda3b-01"
/dev/sdb: UUID="7439473b-607a-4ce4-80c3-f2d4cc4011dc" TYPE="ext4"

Identify the line corresponding the partition you want to mount from the SATA disk. Output of ‘df’ might help with is a bit. Note down the UUID mentioned in that line. Then add the following line to your /etc/fstab.

UUID=<found_uuid>    /mnt/mydisk     vfat   defaults       0 2

Here /mnt/mydisk is where you will be able to access the disk. You do run mkdir mydisk to ensure that the directory exists before mounting. ‘vfat’ assumes that you have FAT32 filesystem on the partitions. Other filesystems should use a different value… Replace <found_uuid> with the UUID you found the previous blkid command. See man page for fstab(5) for more details. After this reboot the machine or run mount -a to mount immediately without reboot.