LinuxQuestions.org
Review your favorite Linux distribution.
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 09-28-2014, 10:43 AM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 469

Rep: Reputation: 34
root partition will not remount


I'm running centos6 64bit and I've got my root partition in read-only mode. I need to do some zero'ing and that will only work with the parition in ro. I'm trying to change it to back to rw but it always throws this error:
Quote:
mount: / not mounted already, or bad option
the command I used to change it to ro was:
Quote:
mount /dev/mapper/vg_x2100centos6v-lv_root/ -o remount,ro
and it worked fine, I'm now trying to switch it back to rw with this command:
Quote:
mount /dev/mapper/vg_x2100centos6v-lv_root/ -o remount,rw
but it won't work, I just get 'mount: / not mounted already, or bad option' all the time and it's driving me batty. Can anyone help?

Last edited by tonj; 09-28-2014 at 04:36 PM. Reason: solved
 
Old 09-28-2014, 11:04 AM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
You might have to unmount it to remount.
 
Old 09-28-2014, 12:45 PM   #3
tonj
Member
 
Registered: Sep 2008
Posts: 469

Original Poster
Rep: Reputation: 34
thanks but that didn't work. I did:
Quote:
umount /dev/mapper/vg_x2100centos6v-lv_root/
and the cursor dropped to the next line and then I did
Quote:
mount /dev/mapper/vg_x2100centos6v-lv_root/ -o remount,rw
and I got:
Quote:
mount: / not mounted already, or bad option
 
Old 09-28-2014, 02:06 PM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
What does fstab say?
 
Old 09-28-2014, 02:07 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,578

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
With the root filesystem mounted read-only, the failure might be the mount command's inability to update /etc/mtab. Try adding the "-n" (--no-mtab) option to block the mtab update. If that works, you can run it again with "-f" (--fake) in place of the "-n" to just update /etc/mtab.

Last edited by rknichols; 09-28-2014 at 02:16 PM. Reason: Add long option name
 
Old 09-28-2014, 04:35 PM   #6
tonj
Member
 
Registered: Sep 2008
Posts: 469

Original Poster
Rep: Reputation: 34
thanks for the responses here. I've found 'a' solution which is a reboot of the machine. If I reboot and then run
Quote:
mount /dev/mapper/vg_x2100centos6v-lv_root/ -o remount,rw
as a first action it works and I can change the root partition to rw.
 
  


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
messed up /etc/fstab file. Can't remount root partition! LinuxN00bee Linux - Newbie 4 02-15-2013 04:32 AM
Remount /root to a different device DavidDiepUSC Linux - Newbie 4 02-06-2012 02:55 PM
[SOLVED] how can i remount root filesystem as read/write after modify readonly-root file jcwkyl Linux - Newbie 3 12-21-2010 11:40 PM
remount partition as rw vikas027 Linux - General 2 11-12-2008 01:06 PM
remount root to new partition khutze Linux - Software 0 08-20-2002 06:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:49 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