[root@redhatAS6 home]# mount -o loop rhel-server-6.3-x86_64-dvd.iso /mnt/cdrompython
[root@redhatAS6 home]# chmod 777 –R /mnt/cdrombabel
[root@redhatAS6 home]# rm –rf /mnt/cdromapp
刪除/mnt/cdrom下的文件時出現以下錯誤:ide
rm: 沒法刪除"/mnt/cdrom/Packages/pygtk2-devel-2.16.0-3.el6.i686.rpm": 只讀文件系統oop
rm: 沒法刪除"/mnt/cdrom/Packages/pygtk2-devel-2.16.0-3.el6.x86_64.rpm": 只讀文件系統spa
rm: 沒法刪除"/mnt/cdrom/Packages/pygtk2-doc-2.16.0-3.el6.noarch.rpm": 只讀文件系統server
rm: 沒法刪除"/mnt/cdrom/Packages/pygtk2-libglade-2.16.0-3.el6.x86_64.rpm": 只讀文件系統it
rm: 沒法刪除"/mnt/cdrom/Packages/pygtksourceview-2.8.0-1.el6.x86_64.rpm": 只讀文件系統class
rm: 沒法刪除"/mnt/cdrom/Packages/pykickstart-1.74.10-1.el6.noarch.rpm": 只讀文件系統map
rm: 沒法刪除"/mnt/cdrom/Packages/pyorbit-2.24.0-5.el6.x86_64.rpm": 只讀文件系統
rm: 沒法刪除"/mnt/cdrom/Packages/pyparted-3.4-3.el6.x86_64.rpm": 只讀文件系統
rm: 沒法刪除"/mnt/cdrom/Packages/python-2.6.6-29.el6_2.2.x86_64.rpm": 只讀文件系統
rm: 沒法刪除"/mnt/cdrom/Packages/python-Coherence-0.6.4-2.el6.noarch.rpm": 只讀文件系統
rm: 沒法刪除"/mnt/cdrom/Packages/python-babel-0.9.4-5.1.el6.noarch.rpm": 只讀文件系統
rm: 沒法刪除"/mnt/cdrom/Packages/python-beaker-1.3.1-6.el6.noarch.rpm": 只讀文件系統
rm: 沒法刪除"/mnt/cdrom/Packages/python-cheetah-2.4.1-1.el6.x86_64.rpm": 只讀文件系統
rm: 沒法刪除"/mnt/cdrom/Packages/python-configobj-4.6.0-3.el6.noarch.rpm": 只讀文件系統
解決辦法:
1.查看已掛載設備
[root@redhatAS6 home]# df
文件系統 1K-塊 已用 可用已用% 掛載點
/dev/mapper/vg_redhatas6-lv_root
36744792 13647708 21230540 40% /
tmpfs 1958216 112 1958104 1% /dev/shm
/dev/sda1 495844 38050 432194 9% /boot
/home/rhel-server-6.3-x86_64-dvd.iso
3592530 3592530 0 100% /mnt/cdrom
2.卸載掛載設備/home/rhel-server-6.3-x86_64-dvd.iso
[root@redhatAS6 home]# umount -l /home/rhel-server-6.3-x86_64-dvd.iso
3.刪除目錄文件cdrom
[root@redhatAS6 home]# rm –rf /mnt/cdrom