Zfs
zfs notes.
We're considering a low-performance and even lower cost ZFS storage service using FreeBSD9 and 5900rpm disks, targeting people who want nearline backups. As time goes on we may release a more advanced or higher performance service, but this sort of thing seems like a good way to get experience and to give prgmr.com space for internal backups.
Anyhow, first I've gotta learn ZFS. here are my notes:
First, I've gotta create zvols (each user will have one) and increase the quota (I want to have a cronjob increase the quota at regular intervals for everyone approaching the quota; the idea being that if we have one runaway customer, we can cap them off and they will get 'disk full' errors a few hundred gigabytes before they would have otherwise, and everyone else won't notice while we move the heavy user to another server, rather than having the heavy user run through the last gigabytes and having the server return disk full errors for everyone)
# zfs create -o quota=4g tank/lsc # df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad4s1a 1012974 279122 652816 30% / devfs 1 1 0 100% /dev /dev/ad4s1e 1012974 12 931926 0% /tmp /dev/ad4s1f 450698304 1467166 413175274 0% /usr /dev/ad4s1d 16217710 42048 14878246 0% /var tank 3827754902 28 3827754874 0% /tank tank/lsc 4194304 28 4194276 0% /tank/lsc # zfs ? zfs: No match. # zfs quota=5g tank/lsc # df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad4s1a 1012974 279122 652816 30% / devfs 1 1 0 100% /dev /dev/ad4s1e 1012974 12 931926 0% /tmp /dev/ad4s1f 450698304 1467166 413175274 0% /usr /dev/ad4s1d 16217710 42048 14878246 0% /var tank 3827754902 29 3827754872 0% /tank tank/lsc 5242880 28 5242852 0% /tank/lsc
so next, I've gotta list existing zvols:
# zfs list NAME USED AVAIL REFER MOUNTPOINT tank 135K 3.56T 29.3K /tank tank/lsc 28.0K 5.00G 28.0K /tank/lsc
next, I've gotta figure out