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

Today I did something stupid on production xen vm server. I mounted the external device mapper as read only to make a copy of the filesystem. This process went well but then the rootfs / become read-only inside the guest machine.

/dev/xvda on / type ext4 (ro,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)

Fortunately all the important services on it using the /home and /var partitions so the machine won't stop functioning but now I cannot remount the /root as RW without rebooting it (which is not an option since it's production).

I tried:

  1. fsck -f /dev/xvda
  2. mount -o rw,remount /
  3. mount -n -o remount,rw /

It does not allow to remount it as RW.

[Mon Jul  7 14:59:06 2014] EXT4-fs error (device xvda): ext4_remount:4558: Abort forced by user
[Mon Jul  7 14:59:21 2014] EXT4-fs error (device xvda): ext4_remount:4558: Abort forced by user
[Mon Jul  7 14:59:50 2014] EXT4-fs error (device xvda): ext4_remount:4558: Abort forced by user
[Mon Jul  7 15:00:13 2014] EXT4-fs error (device xvda): ext4_remount:4558: Abort forced by user
[Mon Jul  7 15:00:16 2014] EXT4-fs error (device xvda): ext4_remount:4558: Abort forced by user

Please tell me is it possible without reboot?

share|improve this question
    
Is it possible you have been writing to the file system from outside the VM? Even attempting to mount the file system readonly is enough to trigger writing, as a journal replay would likely have been needed. If that's what happened, you could have a corrupted file system in need of fsck. For the root file system, there is an advantage to shutting down the VM and doing the fsck from outside the VM, because then you can do it without having it mounted. Just ensure you are running an up to date fsck command. –  kasperd Jul 7 at 13:27

1 Answer 1

I've used mount -o rw,remount / without problems many times. The "Abort forced by user" message indicates there may be a problem with the filesystem, which can only be fixed with an fsck. Unfortunately, you'll probably have to reboot to do this. Another alternative is that the disk is a USB or flash device with a physical read-only toggle, which needs to be flipped.

share|improve this answer

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.