0

I am using Red Hat Enterprise 6.3 and I have just mounted a new volume in one folder of my preference.

After reboot that mount point was lost and the volume was mounted at his original place.

In which place I can set my mount call so that I can have my volume always at the same place? Do I have to look at init.d or is there a better place?

pauska
  • 19,620
  • 5
  • 57
  • 75

2 Answers2

11

/etc/fstab is the traditional configuration file to define permanent mounts.

jscott
  • 24,484
  • 8
  • 79
  • 100
NickW
  • 10,263
  • 1
  • 20
  • 27
0

Elaborating more on the @NickW's solution, a general way to add a new entry to the /etc/fstab file is the following:

  1. check the UUID of your device with blkid command:
sudo blkid

Output should be of the following type:

...
/dev/<DEVICE>: UUID="<DEVICE-UUID>" ...
...
  1. Knowing the UUID of a device, append a new entry to the bottom of /etc/fstab file, (followed by a new line, to avoid warnings):
# /dev/<DEVICE>  <-- comment to identify what you mounted
UUID=<DEVICE-UUID>    <MOUNT-POINT>   auto    rw,user,auto    0    0

  1. Double check /etc/fstab ! In case of a mistake you would have to recover your system!

  2. Reboot ensured that everything is fine :)

satk0
  • 1
  • 1