mount and umount 的使用小计
挂载一个iso 镜像:
mkdir /media/oel
mount /dev/cdrom /media/oel
卸载镜像:
umonut /media/oel
补充:umount提示说device busy是因为当前有程序正在使用你所卸载的设备
举个例子:你当前的路径可能就在设备的挂载点,可以使用
fuser -km /dev/sdb1(设备名) 杀掉占用此设备的程序方可卸载
FYI“:
[root@oracle11g /]# mount /dev/cdrom /media
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@oracle11g /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
14220336 12285584 1200752 92% /
/dev/sda1 101086 22569 73298 24% /boot
tmpfs 219412 0 219412 0% /dev/shm
/dev/sr0 3592530 3592530 0 100% /media
[root@oracle11g /]#
[root@oracle11g repodata]# umount /media
umount: /media: device is busy
umount: /media: device is busy
[root@oracle11g repodata]# pwd
/media/repodata
[root@oracle11g repodata]#
[root@oracle11g media]# cd ..
[root@oracle11g /]# pwd
/
[root@oracle11g /]# umount /media
[root@oracle11g /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
14220336 12285584 1200752 92% /
/dev/sda1 101086 22569 73298 24% /boot
tmpfs 219412 0 219412 0% /dev/shm
[root@oracle11g /]#