Node Operator
Search…
How do I setup static mount via /etc/fstab for Linux?
First, run the following command and find the name of the hard drive you wish to use (for example sda2)
1
lsblk
Copied!
Once you find it, we will now get the Unique ID (UUID) of the hard drive
1
lsblk -d -fs /dev/<location (example: sda2)>
Copied!
‌Copy the UUID, as well as the FSTYPE. We’ll need that later. ‌ Next, we will create a new directory in the /mnt folder where you want your Storj files to be stored; you can name this directory whatever you would like.
1
sudo mkdir /mnt/<directory name>
Copied!
‌Next, we will add our hard drive to the etc/fstab file
1
sudo nano /etc/fstab
Copied!
‌Add the following line at the end of the file:
1
UUID=<your HD UUID> /mnt/<directory name> <FSTYPE> defaults 0 2
Copied!
‌To save changes, press Ctrl-X, Y, Enter
Once saved, run the following command:
1
sudo mount -a
Copied!
‌That’s it! ‌ If you’d like to confirm, you can run this command again and your new mount point will be updated in the mount column
1
lsblk -d -fs /dev/<location (example: sda2)>
Copied!
‌Congrats, you’ve successfully static mounted your hard drive!
Last modified 1yr ago
Copy link