Sponsored LinksКатегорииLinksUnix Tutorial
Personal Development Ruslan Valiev Solaris Performance Team Damien Farnham Fintan Ryan Nicky Veitch Niall Mullen Sean McGrath DTrace Bryan Cantrill Brendan Gregg ZFS Tim Foster General Ben Rockwood Learning Solaris 10 Privacy policy |
Tuesday, January 24. 2006ZFS: filesystem properties
There is quite a number of ZFS filesystems properties, and I will cover most useful ones today.
I'll begin with refreshing your knowledge a bit. As I've told before, I'm going to create a number of ZFS filesystems on my server for the next few blog entires on ZFS. So, right now I have the following: CODE: bash-3.00# zfs list NAME USED AVAIL REFER MOUNTPOINT stock 2.40G 31.1G 8.50K /stock stock/oracle 2.32G 693M 2.32G /stock/oracle stock/try 8K 512M 8K /try To get a value of some ZFS property, we normally use a command like this: CODE: bash-3.00# zfs get used stock/try NAME PROPERTY VALUE SOURCE stock/try used 8K - But such output isn't always convenient for us - it's formatted this way to make the data more human readable. But if we're going to use zfs get to obtain some ZFS parameters from our scripts, we really don't need anything fancy. So we're probably better off using a special -H command line option: CODE: bash-3.00# zfs get -H used stock/try stock/try used 8K - One more thing - a useful, yet very obvious feature which allows you specifying few properties names in one command line: CODE: bash-3.00# zfs get -H used,available,mounted stock/try stock/try used 8K - stock/try available 512M - stock/try mounted yes - Okay, now let's move on and look at some useful ZFS filesystems properties. For instance, the mountpoint property name speaks for itself. By default, the filesystem which you change the mountpoint for, will be automatically remounted at a new location: CODE: bash-3.00# zfs set mountpoint=/younameit stock/try bash-3.00# zfs list NAME USED AVAIL REFER MOUNTPOINT stock 2.40G 31.1G 8.50K /stock stock/oracle 2.32G 693M 2.32G /stock/oracle stock/try 8K 512M 8K /younameit bash-3.00# df -k | grep stock stock 35112960 8 32597477 1% /stock stock/oracle 3145728 2436188 709540 78% /stock/oracle stock/try 524288 8 524280 1% /younameit One more potentially useful option is an on-disk compression. It happens on the fly, and it is planned to eventually have a number of compression methods available to a ZFS administrator, but at the moment you can use only one method - lzjb. Still, results are impressive: CODE: bash-3.00# ls -l /younameit/access_log total 3082 drwxr-xr-x 2 root sys 3 Jan 23 21:59 . drwxr-xr-x 44 root root 1024 Jan 23 21:45 .. dr-xr-xr-x 3 root root 3 Jan 23 22:04 .zfs -rw-r--r-- 1 root root 8904090 Jan 23 21:59 access_log bash-3.00# zfs list NAME USED AVAIL REFER MOUNTPOINT stock 2.41G 31.1G 8.51M /stock stock/oracle 2.32G 693M 2.32G /stock/oracle stock/try 1.51M 510M 1.51M /younameit No wonder the compression ratio is so good for this filesystem: CODE: bash-3.00# zfs get compressratio stock/try NAME PROPERTY VALUE SOURCE stock/try compressratio 5.63x - Unfortunately, only few types of files can be so wonderfully compressed, and text files (for instance, my Apache2 logs) belong to them too. Executable files, of course, will compress with a much lower ratio. I think that should do for today's entry. Let me tell you right now: I have a whole series of ZFS blog entries planned ahead, and that's the reason I haven't covered some of the simpler ZFS filesystem options yet. I promise to write more in the nearest few days. Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
"Now wonder the compress ration" -- you mean the compression ratio; and I think it should be 'no wonder' instead.
Thanks for the corrections, Alex!
Yes, you're right on both counts - no idea how I could have written something like this ;) Will fix right away! |





