|
|
Getting StartedEverything you hate about managing file systems and volumes is gone: you don't have to format, newfs, mount, edit /etc/vfstab, fsck, growfs, metadb, metainit, etc. Meet your new best friends: zpool(1M) and zfs(1M). ZFS is easy, so let's get on with it! It's time to create your first pool:
You now have a single-disk storage pool named tank, with a single file system mounted at /tank. There is nothing else to do. If you want mirrored storage for mail and home directories, that's easy too: Create the pool:
Create the /var/mail file system:
Create home directories, and mount them all in /export/home/<username>:
ZFS file systems are hierarchical: each one inherits properties from above. In this example, the mountpoint property is inherited as a pathname prefix. That is, tank/home/ahrens is automatically mounted at /export/home/ahrens because tank/home is mounted at /export/home. You don't have to specify the mountpoint for each individual user — you just tell ZFS the pattern. This is how we actually set up home directory and mail service on zion.eng, which has been running ZFS for over a year and a half. But wait, there's more! ZFS provides built-in compression. To compress all home directories:
To give ahrens a 10G quota:
To give bonwick a 100G reservation (membership has its privileges):
To automatically NFS-export all home directories read/write:
To scrub all disks and verify the integrity of all data in the pool:
To replace a flaky disk:
To add more space:
To move your pool from SPARC machine 'sparky' to AMD machine 'amdy':
Physically move your disks from sparky to amdy.
Everything will just work — ZFS has 'adaptive endianness' to cope with different byte order on different platforms. You get the idea: it's simple. Any common ZFS operation can be done with a single short command. For more informationYou can find more information at the documentation section. You can also join the ZFS discussion at zfs-discuss AT opensolaris DOT org. Give it a spin and let us know what you think! |