Introduction
This is a how-to on how to add storage devices to /etc/fstab and have them mount on boot.
Please note that the cPanel staff can't perform these tasks for you as these are actions that our software does not manage. The server owner or System Administrator must perform this.
Procedure
You can create a new entry in fstab by following the steps below.
1. Create the directory for the partition and get the device id. If you already have a directory you would like to use as a mount point, you can skip this step.
The dirtectory can be created via:
mkdir /your/directory/here
Replace the directory destination with the directory you would like to make your device's mount point.
2. Add the fstab entry:
-
- Use the command
blkid
and locate the desired device. - This is an example of the output:
/dev/sda2: UUID="32a4b76f-246e-486e-8495-31b8a781fb4c" TYPE="swap" /dev/sda1: UUID="31f39d50-16fa-4248-b396-0cba7cd6eff2" TYPE="ext4"
- Then open the file /etc/fstab using the editor of your choice
- Then append the line:
UUID=31f39d50-16fa-4248-b396-0cba7cd6eff2 /your/directory/here auto rw,user,auto 0 0
- Be sure to add a new line after the entry to avoid any warnings.
- Use the command
To mount the partition, open a terminal and type:
mount /your/directory/hereBecause of the entry
auto
the device should be mounted automatically on next boot.
Comments
0 comments
Article is closed for comments.