snapshot an lvm disk containing ext4 partitions
Hello,
I was use to snapshot an LVM volume containing ext4 partitions for backup purpose. This is a disk for Xen DomU paravirtualized linux box.
With lvm-2.02.98 and kernel 3.4.11 from opensuse 12.2 the ext4 partitions inside the snapshot were clean.
Now I've upgraded to opensuse 12.3 (kernel 3.7.10 lvm-2.02.98)
Is lvm supposed to keep my inside ext4 partitions clean when snapshotting my volume? If not is theire any way of doing this?
Any advices welcome.
Thyank you.
Here some informations on my volume
#lvdisplay /dev/mes_volumes/serveur2
--- Logical volume ---
LV Path /dev/mes_volumes/serveur2 LV Name serveur2 VG Name mes_volumes LV UUID RcWN3e-oBYI-OnhW-Hdi5-eHjR-pe6R-ldpKDU LV Write Access read/write LV Creation host, time , LV Status available # open 1 LV Size 100,00 GiB Current LE 25600 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 1024 Block device 253:1
#kpartx /dev/mes_volumes/serveur2
mes_volumes-serveur2p1 : 0 4176837 /dev/mes_volumes/serveur2 63 mes_volumes-serveur2p2 : 0 41913585 /dev/mes_volumes/serveur2 4176900 mes_volumes-serveur2p3 : 0 142303770 /dev/mes_volumes/serveur2 46090485 mes_volumes-serveur2p4 : 0 21237930 /dev/mes_volumes/serveur2 188394255
Dne 23.5.2013 08:31, Alexis napsal(a):
Quoted 8 lines
Hello,
I was use to snapshot an LVM volume containing ext4 partitions for backup purpose. This is a disk for Xen DomU paravirtualized linux box.
With lvm-2.02.98 and kernel 3.4.11 from opensuse 12.2 the ext4 partitions inside the snapshot were clean.
Quoted 6 lines
Now I've upgraded to opensuse 12.3 (kernel 3.7.10 lvm-2.02.98)
Is lvm supposed to keep my inside ext4 partitions clean when snapshotting my volume? If not is theire any way of doing this?
Any advices welcome.
From your description is not very clear who is creating 'snapshot'
If you pass a device to your XEN guest and you make a snapshot in your host, than obviously host device view knows nothing about guest's ext4 filesystem.
I'm not an expert in paravirtualization here - but if you want to have clean
snapshot - you need to create then within the same environment used for filesystem - so your guest should be creating it.
There is not much host can do with guest's filesystem if you would be creating snapshot on the host while guest is pushing data to the filesystem. You only get 'sync' but not filesystem freeze in this case.
Zdenek
Quoted 5 lines · On Thu, 23 May 2013 09:31:23 +0300 Alexis <[email protected]> wrote:
Hello,
I was use to snapshot an LVM volume containing ext4 partitions for backup purpose. This is a disk for Xen DomU paravirtualized linux box.
Quoted 7 lines
With lvm-2.02.98 and kernel 3.4.11 from opensuse 12.2 the ext4 partitions inside the snapshot were clean.
Now I've upgraded to opensuse 12.3 (kernel 3.7.10 lvm-2.02.98)
Is lvm supposed to keep my inside ext4 partitions clean when snapshotting my volume? If not is theire any way of doing this?
Use read-write snapshots instead of read-only ones.
The first time you mount the snapshot (read-only mount is enough) the journal will get replayed and the stored file-system will become clean.
Greets,
Jacek
And theire is no risk to lose data?
Quoted 24 lines · Jacek Konieczny
Quoted 5 lines · On Thu, 23 May 2013 09:31:23 +0300 Alexis <[email protected]> wrote:
Hello,
I was use to snapshot an LVM volume containing ext4 partitions for backup purpose. This is a disk for Xen DomU paravirtualized linux box.
Quoted 7 lines
With lvm-2.02.98 and kernel 3.4.11 from opensuse 12.2 the ext4 partitions inside the snapshot were clean.
Now I've upgraded to opensuse 12.3 (kernel 3.7.10 lvm-2.02.98)
Is lvm supposed to keep my inside ext4 partitions clean when snapshotting my volume? If not is theire any way of doing this?
Use read-write snapshots instead of read-only ones.
The first time you mount the snapshot (read-only mount is enough) the journal will get replayed and the stored file-system will become clean.
Greets,
Jacek