Posts Tagged as ‘filesystems’

November 24, 2009

New tool: virt-list-filesystems

$ virt-list-filesystems Debian5×64.img
/dev/debian5×64/home
/dev/debian5×64/root
/dev/debian5×64/tmp
/dev/debian5×64/usr
/dev/debian5×64/var
/dev/sda1

You can also augment this tool with the -a and -l options. The -a option tells it to list swap partitions too. The -l option tells it to show the filesystem type on each partition that was found:

$ virt-list-filesystems -a -l Fedora12.img
/dev/sda1 ext4
/dev/vg_f12×64/lv_root ext4
/dev/vg_f12×64/lv_swap swap

While this is a fairly simple tool, [...]

November 4, 2009

Terabyte virtual disks

This is fun. I added a new command to guestfish which lets you create sparse disk files. This makes it really easy to test out the limits of partitions and Linux filesystems.
Starting modestly, I tried a 1 terabyte disk:

$ guestfish

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: ‘help’ for [...]

August 18, 2009

How does mount load the right kernel module?

On any recent Linux distro, you can mount any filesystem type directly. For example:

# dd if=/dev/zero of=/tmp/test.img bs=4k count=4096
# mkfs.xfs /tmp/test.img
# mount -v -o loop /tmp/test.img /mnt/tmp

The mount command works even though I didn’t have the xfs.ko kernel module loaded, and I didn’t tell mount that it’s xfs.
How does it do that? I [...]