Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
[root@SERVER .ssh]# mount|grep -i " / "
/dev/mapper/rootvg-root_lv on / type ext3 (rw)
[root@SERVER .ssh]# mount -o remount /
mount: block device /dev/rootvg/root_lv is write-protected, mounting read-only
[root@SERVER .ssh]# 

How can I make the "/" writable again without a reboot?

[root@SERVER ~]# lsb_release -a
LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Release:    5.4
Codename:   Tikanga
[root@SERVER ~]# 

UPDATE:

[root@SERVER ~]# lvdisplay rootvg/root_lv
  Locking type -1 initialisation failed.
[root@SERVER ~]# lvdisplay rootvg/root_lv --ignorelockingfailure
  --- Logical volume ---
  LV Name                /dev/rootvg/root_lv
  VG Name                rootvg
  LV UUID                2Cccd4-oGrx-ssQW-xzK5-MZuA-g4NS-tFDFpd
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.00 GB
  Current LE             64
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

[root@SERVER ~]# lvchange -p rw rootvg/root_lv
  Locking type -1 initialisation failed.
[root@SERVER ~]# 
[root@SERVER ~]# lvchange --ignorelockingfailure -p rw rootvg/root_lv
  Only -a permitted with --ignorelockingfailure
  Run `lvchange --help' for more information.
[root@SERVER ~]# 

should I use the "-a" function?

share|improve this question
3  
See serverfault.com/questions/37600/… and take a look at Womble's answer. –  JodieC Apr 7 '12 at 20:14
1  
Sounds like the device itself, not the filesystem, is currently in write-protect mode. Look at the hardware settings? –  Shadur Apr 7 '12 at 20:47
    
I couldn't reproduce this on my system. I'd try the -a option, but I suspect you experience some other problem prior to this point. –  JodieC Apr 10 '12 at 23:14
add comment

3 Answers

Check lvdisplay rootvg/root_lv. If it shows that the LV is in read-only mode, you will need to make it read-write. Assuming the LV is in a healthy state, this can be done by lvchange -p rw.

share|improve this answer
    
I updated the question, it didn't worked :\ –  LanceBaynes Apr 7 '12 at 20:24
add comment

I think mount -o remount,rw / should do won't work, as stated in a comment below.

share|improve this answer
    
The block device here is read-only, so remount will fail. –  JodieC Apr 7 '12 at 20:17
    
@JodieC OK, I see. Edited my answer to reflect so. –  Renan Apr 7 '12 at 20:41
add comment

Had the same error, searching for that, I found an answer that said we should reboot in single user mode and run fsck on the disk in question. That resolved our issue.

share|improve this answer
    
I was about to comment that "disk went read-only on me" is normally due to filesystem corruption or some hardware problem. –  vonbrand Jan 23 '13 at 13:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.