public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.28 ext4, xen and lvm volume becomes ro after snapshot
@ 2008-12-26 11:06 Andreas Sundstrom
  2008-12-26 14:07 ` Theodore Tso
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Sundstrom @ 2008-12-26 11:06 UTC (permalink / raw)
  To: linux-kernel

Decided to try out 2.6.28 on a xen VM yesterday.
Used my old 2.6.27 .config as a base and did an "make oldconfig" and
answered any questions that came up.

Everything went fine and the new kernel booted and worked nicely.

Now I wanted to try the new ext4 fs (for no particular reason other than
it being new)
So to start with I tried it without updating the actual fs layout to
ext4, I left it at ext3 and only mounted it as ext4.

That meant adding this to the xen VM config file:
extra = "console=hvc0 rootfstype=ext4"

And also changing to ext4 in /etc/fstab

That also worked fine and I saw that some stuff was being enabled (like
barriers)
But today I noticed that something was wrong with the VM and I noticed
after a while that the root volume was read-only (this VM only has a
root partition).

I noticed the time that the logs were written to last and that was
around the time my backups are being run.

I use a little script that backup this xen VM from xen dom0.

Here is the interesting part of my script:
/usr/sbin/xm sysrq xenfw1 s
/usr/sbin/xm pause xenfw1
sync
/sbin/lvm lvcreate --snapshot --permission rw --size 1G --name xenfw1_s
/dev/3w250g/xenfw1 > /dev/null
/usr/sbin/xm unpause xenfw1
/bin/mount -o ro,noatime /dev/3w250g/xenfw1_s /mnt/snapshots/xenfw1 ||
/bin/rmdir /mnt/snapshots/xenfw1
# Here's where the actual backups take place
/bin/umount /mnt/snapshots/xenfw1 2> /dev/null
/sbin/lvm lvremove --force /dev/3w250g/xenfw1_s > /dev/null

After the "lvcreate --snapshot" if I check within the xen VM (with cat
/proc/mounts) I can see that / changed from rw to ro:
Before snapshot:
/dev/root / ext4 rw,noatime,barrier=1,noextents,data=ordered 0 0
After snapshot:
/dev/root / ext4 ro,noatime,barrier=1,noextents,data=ordered 0 0

It was not possible to do "mount -o remount,rw /":
mount -o remount,rw
/                                                                                      

mount: block device /dev/xvda1 is write-protected, mounting read-only  

I don't see how this could be an expected behaviour so I thought it
might be good to report it here.
I hope I explained the scenario good enough, I can reproduce this if you
want more details (now I'm back on ext3 on this xen VM)

P.S. I'm currently not subscribed so please CC me on any posts regarding
this.

/Andreas Sundstrom

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-01-03 10:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-26 11:06 2.6.28 ext4, xen and lvm volume becomes ro after snapshot Andreas Sundstrom
2008-12-26 14:07 ` Theodore Tso
2008-12-26 15:42   ` Andreas Sundstrom
2008-12-26 18:21     ` Theodore Tso
2008-12-26 18:48       ` Andreas Sundstrom
2008-12-26 19:33         ` Theodore Tso
2008-12-26 22:00           ` Andreas Sundstrom
2008-12-27  3:06             ` Theodore Tso
2008-12-27  9:19               ` Andreas Sundstrom
2009-01-02  3:11                 ` Theodore Tso
2009-01-02  8:29                   ` Andreas Sundstrom
2009-01-02 14:10                     ` Theodore Tso
2009-01-03 10:25                       ` Andreas Sundstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox