checking file system with VM on-line

vitor costa

Renowned Member
Oct 28, 2009
142
2
83
I want check filesystem consistence with the VMs on-line. I have many hosts with a lot off Linux Vms.... this VMs is stored in DRBD clusters...

So i try:

1) create a SNAPSHOT from a lvm disk (VM-XXX-disk-1) ,
2) create a loop device (losetup /dev/loop1 /dev/drbdvg/VM-XXX-disk-1 -o DDDD) , when DDDD=offset....
3) The filesystem apear ok in /dev/loop1 and is possible mount then
4) If VM is using LVM internal i can sucessfull mount the lvm inside the VM

The problem is: when i run fsck i receive inconsistence erros.... but if i stop the VM and run fsck all is ok.

So i think runing vm is not in the FS is not in a consistent state.... if its is true to run fsck is true inconsistent to Backup too... So how we can be sure about vzdump backup with snapshot mode ?
 
So i think runing vm is not in the FS is not in a consistent state.... if its is true to run fsck is true inconsistent to Backup too... So how we can be sure about vzdump backup with snapshot mode ?

A snapshot will always throw fsck errors - but that is no real problem because all FS/DB should be able to handle that (it is like a power loss on a physical host).