How to mount a mointpoint using a shell/bash script?

Rajvin

New Member
Credits
13
Hi, I have created a mountpoint /dev/xvdk /usr. Also made the entry in /etc/fstab, but when the system reboots the mountpoint is missing and I had to manually mount the mountpoint in the system. Is there any solution for this? Is there any script available to mount it automatically after restarting the system.
 


f33dm3bits

Gold Member
Gold Supporter
Credits
25,554
What does your /etc/fstab entry look like for that mount point?
 

Fanboi

Active Member
Credits
3,575
You should not be mounting filesystems in /dev. /dev is a directory structure to allow human access to devices and managed (usually) by udev. Try creating the mount point elsewhere, for example /media/parent/thischild/ (probably the best if you may have multiple custom mount points as each can be a child of /media/parent/).
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top