Hi
I wanted to see what the Linux Guys are doing and how it stacks up
against ZFS. Maybe it interests you. So here's my experience so far with
the much hyped btrfs filesystem:
Starting with a mirrorpool with mirrored metadata....(you have to set
metadata mirroring explicitly)
# mkfs.btrfs -m raid1 -d raid1 /dev/sdb /dev/sdc
Let's see how it looks:
# btrfs-show
Label: none uuid: cc114afd-c05c-4ce7-b822-e597f76913c8
Total devices 2 FS bytes used 28.00KB
devid 2 size 2.00GB used 417.50MB path /dev/sdc
devid 1 size 2.00GB used 437.50MB path /dev/sdb
Ok, forgot to give a pool-name. Could not find an option to rename the
pool. Will re-create it, which will destroy all data (yuck!).
# mkfs.btrfs -L testpool -m raid1 -d raid1 /dev/sdb /dev/sdc
# btrfs-show
Label: testpool uuid: cc114afd-c05c-4ce7-b822-e597f76913c8
Total devices 2 FS bytes used 28.00KB
devid 2 size 2.00GB used 417.50MB path /dev/sdc
devid 1 size 2.00GB used 437.50MB path /dev/sdb
btrfs pools can be mounted directly with device names, e.g.:
# mount /dev/sdc /mnt
IMHO doesn't make sense. What if I lose this disk? Ok, found one that
looks better:
# mount /dev/disk/by-label/testpool /mnt
What's that? It is still using /dev/sdc, and not a metadevice?
/dev/sdc on /mnt type btrfs (rw)
I wonder what will happen when /dev/sdc fails....Let's go on. df -h
shows 4GB Space. This is obviously a bug, as this is a mirror.
#df -h
/dev/sdc 4.0G 28k 4.0G 1% /mnt
Next, how to remove a disk in a mirror. Hmm, there seems to be no way at
the moment. It seems, only replacing failed disks is possible at the
moment. Let's create subvolumes
# btrfsctl -S fs1 /mnt
# ls /mnt
drwx------. 1 root root 0 2009-11-30 00:07 fs1
Mount command does not show this as a filesystem. The file command shows
it as a directory, "rmdir fs1" says it is not empty. Let's create a
snapshot:
# btrfsctl -s /mnt/fs1 at now /mnt/fs1
ls shows it as a directory:
# ls /mnt
drwx------. 1 root root 0 2009-11-30 00:07 fs1
drwx------. 1 root root 0 2009-11-30 00:07 fs1 at now
Currently there is no way to delete the snapshot. I wonder why they are
called snapshots anyway, as they are writeable. Basically clones. There
is also no command available to show all snapshots or to distinct them
from directories.
This was just a short introduction. A lot of bugs, a lot of features
missing. And a _lot_ to catch up. So, no killer yet... ;-)
Cheers
Mika