LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-16-2012, 11:09 AM   #1
ikn3
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Rep: Reputation: Disabled
Cannot remove Mounted File System. Tried rm -rf <dir.path> and get below result.


rm: cannot remove `'<dir>'//Updates/zzipfile': Read-only file system
rm: cannot remove `'<dir>'//utils': Read-only file system
rm: cannot remove ``<dir>'//version': Read-only file system
rm: cannot remove ``<dir>'//xml': Read-only file system
rm: cannot remove ``<dir>'//.oem': Read-only file system

Last edited by ikn3; 10-16-2012 at 11:11 AM.
 
Old 10-16-2012, 11:35 AM   #2
frederickbear
LQ Newbie
 
Registered: Oct 2012
Posts: 7

Rep: Reputation: Disabled
From the error message: 'Read-only file system'

the rm command does attempt to modify the file system which is why this fails.

Either the whole directory/file system is mounted read only in which case it would need to be mounted read write to be modified, assuming the media is writeable.

or

These are read-only file systems mounted below the directory you're trying to remove, and will need to be unmounted using the umount command before you can remove the directory.
 
Old 10-16-2012, 11:38 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,577
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
Yikes!!!

"rm -rf" does not unmount a filesystem - it removes files and directories.

However it can NOT remove "read only" files. The fact your message says you have filesystems rather than just files means you have to unmount those filesystems before removing the files in the directory.

If in fact you want to remove all the files/directories then you FIRST need to unmount the filesystems then do the rm.

The question is WHY are you trying to remove all files?

Also if you are in fact removing the files and do the unmount you need to be sure you get rid of the mounts in /etc/fstab (or automounter) if you're mounting that way so they don't attempt to remount on reboot.
 
Old 10-16-2012, 11:43 AM   #4
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Type below command and check whether you had mounted filesystem.If you find mounted ,umount the filesystem and then try to remove the directory

#mount
 
Old 10-16-2012, 12:52 PM   #5
ikn3
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
THis is the ISO image of Application I installed and now I wanted to remove it. The ISO was extracted to /tmp/commvault....
SO am trying to remove this to free space using rm -rf /tmp/commvaultinstall/.
Here is the result of mount command
unmount gives error

#mount
.
.
.
nfsd on /proc/fs/nfsd type nfsd (rw)
/tmp/Disk 3.iso on /tmp/commvaultinstall type iso9660 (rw,loop=/dev/loop0)


#unmount /tmp/commvaultinstall/
-bash: unmount: command not found
 
Old 10-16-2012, 12:55 PM   #6
frederickbear
LQ Newbie
 
Registered: Oct 2012
Posts: 7

Rep: Reputation: Disabled
try umount rather than unmount.
 
Old 10-16-2012, 01:06 PM   #7
ikn3
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
THanks Fredrick.

umount worked and was able to delete the concerned folder.

Is "umount" used in Linux instead of "unmount"?
 
Old 10-16-2012, 01:50 PM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,577
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
Quote:
Originally Posted by ikn3 View Post
Is "umount" used in Linux instead of "unmount"?
Yes - and in UNIX.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Certain Files/Dir from Large Dir thomas.beaver Linux - Newbie 2 01-27-2008 09:47 AM
File path to a mounted volume? pilot11 Linux - Newbie 4 10-18-2006 07:01 PM
Find file/dir path nc3b Programming 5 08-28-2006 05:49 AM
Need to remove spaces from all file / dir names ?? Solution here! jsjohnst Linux - General 2 07-20-2004 10:39 PM
I can't remove file or dir canay Linux - Newbie 2 01-19-2002 07:44 PM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration