Let's assume I have a KVM-based virtual machine. There is a volume that contains the operating system and the data.

I know it is possible to access from host at least READ-ONLY the filesystem which is on guest.

If it is possible to access the guest FS in RW mode, then could I somehow detect that the filesystem was mounted?

The filesystem is ext4, is it storing any information about how and when it was mounted?

  • Just the dirty bit. – Michael Hampton Oct 19 '18 at 18:47
  • @MichaelHampton I would have expected that to work. But when I verified with tune2fs on a file system definitely mounted rw, I saw this: Filesystem state: clean. I think that's because that bit has a different meaning when journaling is in use. – kasperd Oct 19 '18 at 19:32
  • LVM track usage of partition with "o" flag in lvs command. – Michal Petrilak Oct 22 '18 at 14:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.