Umount mediacdrom

The one catch when unmounting a filesystem is that you cannot unmount a filesystem when any process is using any file on that directory. This includes processes that you might easily overlook, such as a bash shell in which you have simply used the cd command to change disks to somewhere in the filesystem that you want to unmount. Before unmounting a filesystem, you must use the cd command to exit that filesystem or terminate any processes that are using that filesystem in any way.

Identifying the processes that are using or accessing a mounted filesystem can be tedious, especially if you have multiple applications, konsole windows, or xterm windows open on your system. To save time, SUSE provides two convenient commands as part of its Linux distribution, the lsof (list open files) and fuser (find user) commands.

■ To use the lsof command to identify the files open on a specific filesystem, simply provide the name of that filesystem or its mount point as an argument to the lsof command, as in the following example:

Was this article helpful?

0 0

Post a comment