Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a problem with ext3 filesystem. It's not writable and I can't remount it.

# echo 1 > /file
-bash: /file: Read-only file system 
# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
# mount -o remount,rw /
mount: block device /dev/VolGroup00/LogVol00 is write-protected, mounting read-only

Can I fix it without server restart?

share|improve this question
    
Anything in the logs about LVM problems? –  wazoox Jul 8 '09 at 13:08
    
Can you post output of cat /proc/mounts? –  wzzrd Jul 8 '09 at 13:15

3 Answers 3

It's probably dropped into read-only mode at the LVM level (lvs will lack a 'w' in the second caracter of the Attr column), so you might be able to flick it back with an lvchange --ignorelockingfailure -p w VolGroup00/LogVol00. Alternately, the VG may have dropped write access (typically caused by a hardware failure), in this case indicated by a lack of w in the first character of the Attr column in the output of vgs. That can't be changed at runtime, by the look of it.

If LVM has dropped write perms on either the LV or VG, it's probably for a very, very good reason, and unless you care not for your data, I'd be looking into the root cause rather than trying to bludgeon LVM into allowing writes again.

share|improve this answer
1  
Attr for this volume: -wi-ao, lvchange command returns "Locking type 1 initialisation failed." –  Maciej Nowakowski Jul 8 '09 at 11:28
    
Answer extended. –  womble Jul 9 '09 at 2:50

If this happened since the machine booted, check dmesg or other system logs for reports of anything terrifying going wrong with the hardware (e.g IO errors reported when accessing the underlying disks) such errors can trigger the kernel to put things into read-only mode until someone (you!) comes along to make a more informed decision.

share|improve this answer

There is probably filesystem error. Run fsck after umount. This wont require reboot. Try to fsck without using -a or -p.

share|improve this answer
    
Yes, it will require a reboot: it is his root filesystem :P –  wzzrd Jul 8 '09 at 13:13
    
My bad. Should have read question properly. :'( –  Saurabh Barjatiya Jul 8 '09 at 18:47

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.