I am currently running CentOS 5 on a server that has a built-in CDROM drive. I currently have a setup where /media/cdrom is automatically mounted by autofs as needed and I am exporting /media/cdrom via NFS. I need to be able to unmount this cdrom, eject it, and put in a new one without breaking anything, but this doesn't seem to work. Is there a better way to do this (noting that I have very little control over the server that is attempting to mount /media/cdrom via NFS)?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
|||
|
|
The problem is that when you want to export a directory via NFS, the Linux NFS server "hangs on" to the exported directory as if it were a process running with an open file descriptor in that directory, preventing the mountpoint from being unmounted (well, technically, the kernel is doing this in the nfs kernel module). You'd have to shut down the NFS server, unmount the CD (or tell autofs to unmount it), insert the new CD, then restart the NFS server. Hopefully, you can do this in the time before the NFS client times out. It would be considerably easier to just mount ISO images, as Nils suggested. |
|||
|
