LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   root partition will not remount (https://www.linuxquestions.org/questions/linux-newbie-8/root-partition-will-not-remount-4175520373/)

tonj 09-28-2014 09:43 AM

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?

EDDY1 09-28-2014 10:04 AM

You might have to unmount it to remount.

tonj 09-28-2014 11:45 AM

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

EDDY1 09-28-2014 01:06 PM

What does fstab say?

rknichols 09-28-2014 01:07 PM

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.

tonj 09-28-2014 03:35 PM

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.


All times are GMT -5. The time now is 12:17 AM.