Using autofs to mount an external drive
If you wish to make the process of attaching an external drive (through cifs
) permanent (persistent), then you will need to begin by installing the autofs
package in the following way:
# yum install autofs
Having installed the package, you will then need to ensure that you start and enable the autofs
service like this:
# systemctl start autofs # systemctl enable autofs
Having done this, and assuming we will be using the same mount point as discussed here, you should begin the configuration of the autofs
service by creating a credentials file in your favorite text editor by typing this:
# nano /path/to/credentials.txt
Now, add the required network credentials like this:
username=<access_username> password=<access_password> ...
Get Troubleshooting CentOS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.