CD/DVD Mount point in FSTAB failure
Is there a better way to mount a removable optical disk on RHEL 7.2? I am required to have a CD/DVD mount at mnt/updates when inserted, However, if I add the mount point to FSTAB and don't have a cd/dvd inserted, the system fails to boot and I am dumped into emergency mode. CD/DVD's MUST mount at that location automatically, as the users will not be able to manually mount them.
When I used this entry in RHEL 5.11, it would fail to mount and then continue on with booting the OS, and mount the disk whenever inserted. Here, I can't seem to figure out how to have it boot successfully AND have CD/DVDs mount at /mnt/updates automatically when a disk is inserted.
The mount folders are there, and my FSTAB entry looks like:
/dev/sr0 /mnt/updates auto defaults,rw,user 0 0
Any suggestions?
Responses
Ok i kind of understood. I do not know your local security policy but why don't you use a nfs server to achieve this. Place the Software content on the nfs server and export it to all of the client machines in read-only mode. Or even better, point the update directory of your software to the optical drive, instead of /mnt/updates. There are many more solutions i can think of to solve the problem. Is it really necessary to use a optical disk to perform updates? There is one fact that is not getting into my mind. Why allowing unprivileged users to perform software updates?
You can avoid dropping into emergency mode by adding the "nofail" mount option to your fstab entry, like this: /dev/sr0 /mnt/updates auto defaults,ro,user,nofail 0 0
Note that pre-burned CD/DVDs can only be mounted read-only, so I changed the "rw" option to "ro" to minimize noise in the logs.
Also, if you're using a local GUI and haven't installed automount/autofs, the automatic mounting of the CD-ROM is most likely a GNOME desktop feature. It seems that modern distributions are standardizing such user-controlled removable media mounts as /media/(name or serial number of media/filesystem) or perhaps /media/(username)/(name or S/N of media/filesystem).
You could redirect the application to effectively use a different mount point by symlinking the new mountpoint to the old: for example, if you enable your desktop CD automount feature and learn that it mounts the updates CD to /media/UpdateMedia, you could make a symbolic link like this:
ln -s /media/UpdateMedia /mnt/updatesYou can do this even if /media/UpdateMedia doesn't exist yet: until /media/UpdateMedia exists, the link will act as a broken symlink, which is for most practical purposes equivalent to a non-existent file/directory.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
