2012-06-21 1:58, Richard Elling wrote:
On Jun 20, 2012, at 4:08 AM, Jim Klimov wrote:

Also by default if you don't give the whole drive to ZFS, its cache
may be disabled upon pool import and you may have to reenable it

The behaviour is to attempt to enable the disk's write cache if ZFS has the
whole disk. Relevant code:

Please help us to stop propagating the misinformation that ZFS disables
write caches.
  -- richard

I see, sorry. So, the possible states are:

1) Before pool import, disk cache was disabled; then pool is imported:
1a) If ZFS has whole disk (how is that defined BTW, since partitions
    and slices are really used? Is the presence of a slice#7 which
    is 16384 sector long the trigger?) - then cache is enabled;
1b) ZFS does not have whole disk - cache is neither enabled nor

2) Before import disk cache was enabled; after import: no change
   regardless of "whole-diskness".

Is this correct?

How does a disk become "cache disabled" then - only manually?
Or due to UFS usage? Or does it inherit HW setting? Or somehow else?
I think the cache is enabled in the OS by default...

//Jim Klimov
zfs-discuss mailing list

Reply via email to