Playing around with ZFS part 2
Fixing up a few issues from the previous post
Written on 12/22/2012 by Patrick Bregman
About a week ago I posted about toying around with ZFS on a bunch of USB sticks. First thing I noticed after restarting the machine a few times, I discovered that my pool was degraded. After destroying and restoring my pool for a few times, I discovered that the device names of my sticks changed every time!
This should be no problem when you're using them in a RAID-Z configuration, because they would still belong to the same set in that case. But I was using a striped mirrored setup (RAID10). The downside of this was that the disks of the two mirrored sets kept changing names. Not good. After creating a partition on every disk I recreated the ZFS pool, but this time I used the GUID (unique identifier) of the partitions I created. The pool has been running correctly ever since.
Also, I discovered the reason why a 512MByte file consisting of nothing but zeroes results in a 512 byte file and a compression ratio of 1.00x. The whole issue was that ZFS writes files consisting of nothing but zeroes sparsely. So it only records how big the file is, but doesn't save all the zeroes to disk. This also explains the write speed of more than 5GByte/s I saw while writing the files.
blog comments powered by Disqus