Need fstab advice for a new node

Hi there!

I am setting up a new storage node on a VPS I have available (CentOS7).
The docs say I must mount my storage directory/disk statically through /etc/fstab which is all well and good, but my node has a single disk (3TB) for root which will hold the storage directory as well as OS files.

Root (“/”) is mounted by UUID in /etc/fstab and the storage directory will be a folder somewhere under root (probably “/mnt/storj”) - is that enough to satisfy requirements, or must the storage directory be specified on its own fstab line?

Here’s my /etc/fstab:

#
# /etc/fstab
# Created by anaconda on Sun Dec 16 03:58:25 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=69259f6d-413b-4bcb-80d3-c17f4fda4d97 /boot xfs defaults 0 0
/mnt/swapfile.swap none swap sw 0 0

If it must have its own line, can anyone suggest what to enter in my fstab?

It’s fine. The rule is stated so to discourage various automounting schemes like auto-detecting USB drives, which might sometimes change paths where the drives are mounted because of weird reasons, and then storage node configuration would have to be manually updated. Storing data on the root file system is static enough :wink:

1 Like

If the storage directory is actually on the root filesystem, /var/storj makes more sense. /mnt by convention is for mounting additional filesystems; data on the root filesystem should not go in there.

1 Like

Great! Makes total sense :slight_smile:

Right, good catch :wink:

Thank you guys.

I mount mine at /srv/storj as a personal preference.