#!/usr/bin/python import sys import guestfs g = guestfs.GuestFS (python_return_dict=True) for disk in sys.argv[1:]: g.add_drive_opts (disk, readonly=1) g.launch () fses = g.list_filesystems () for dev in fses: try: g.mount (dev, "/") stats = g.statvfs ("/") print "%s, %s\n" % (dev, stats) except: pass g.umount_all ()