wessels
2011-Mar-08 14:58 UTC
[zfs-discuss] Slices and reservations Was: Re: How long should an empty destroy take? snv_134
Hi, instead of slicing and/or partitioning a drive one can also limit the capacity the drive reports the controller and OS. This is what oem''s do to ensure that drives from different manufacturers and revisions all have the same capacity. Different routes need to be followed for (S)ATA and SCSI/SAS drives, because of different command sets. I''ve no experience with setting the capacity on FCAL drives. I just bought the drives from the oem when using FCAL drives. First S(ATA), the feature to use is the Device Configuration Overlay (DCO). Various tools exist to set and reset/recover the capacity of the drive. Some drive manufacturers have a (diagnostic) tool which can set the DCO. Another well known utility is hdat2, this is a generic utility. Please note that almost never these utilities work when the drives are connected to a RAID or HBA card. I use a obsolete desktop for this purpose. Next SCSI and SAS. Perhaps more procedures and utilities exists but I''m only familiar with the following. The linux sg_format utility from the sg3_utils tool bag. Easiest way to use the tool is by booting a Linux live cd and run it from there. Perhaps for large scale deployments this is a time consuming process but you get what you pay for. Still I find this more reliable and less time consuming than slicing and checking if the caches are enabled in format. I know a group that runs custom kernels which throws an error if a drive doesn''t report one of their standard size. Just to ensure they never run into problems related to different sizes. As a side note, limiting the capacity of a SSD can prevent the performance degradation when the SSD is completely written. Personally I''ve good experience with this strategy on the Intel SSD''s. The controller on the SSD can use the unused area to shuffle data around. I''m using between the 25% and 10% reservations. Please note that TRIM is not needed now because the controller has enough free space to reorganize the data. Still sending TRIM commands are very beneficial to the performance of the SSD and lessen the amount of reserved space significantly. So ZFS capable of sending TRIM command would be a nice to have.