[OpenIndiana-discuss] help needed: reinstall bootloader

tsc5yc tsc5yc at mst.edu
Thu Apr 19 22:00:43 UTC 2018


On Thu, Apr 19, 2018 at 1:18 AM, Nikola M <minikola at gmail.com> wrote:

> On 04/18/18 12:19 AM, Timothy Coalson wrote:
>
>> On Sat, Apr 14, 2018 at 1:43 AM, Nikola M <minikola at gmail.com> wrote:
>>
>> And also there is the question weather Hard disk cache is turned on if ZFS
>>> uses partition and not the whole drive. Previoiusly, Hard disk caching
>>> used
>>> to be turned OFF if ZFS is on partition and not on the whole drive, for
>>> UFS
>>> compatibility.
>>> Don't know how it is now nor how to explicitlycheck/turn ON Hard disk
>>> caching if ZFS pool uses partition on drive.
>>>
>>> previously discussed several times, long ago (though somewhat difficult
>>> to
>>>
>> search for):
>>
>> https://www.mail-archive.com/zfs-discuss@opensolaris.org/msg49099.html
>>
>> ZFS never disables caches, and I believe they are almost always already
>> enabled anyway, so you can forget this concern.  From what I understand
>> from reading the list, the only reason zfs has any code that touches disk
>> cache settings at all is that long ago, Sun shipped some drives with the
>> cache disabled by default in the firmware.  I think if you aren't using
>> old
>> drives shipped by Sun, this "whole disk" distinction doesn't matter to you
>> (as long as you don't also use UFS, anyway).
>>
>
> I think (got confirmation on this some years ago), that Opensolaris (and
> illumos) preventively disables disk cache on all drives where partitions
> are used for ZFS, to avoid possible problem with UFS partitions on same
> drive if cache is on, and that is why disk cache is turned off if using
> partitions instead of giving the whole disk to ZFS:
>

>From my link:

">> Please help us to stop propagating the misinformation that ZFS disables

>> write caches.
>>  -- richard"


The posts I remember from people who should know, all say that using ZFS,
regardless of partition or whole disk, never disables disk caches, period
(the code he linked (now line 530) to that issues an ioctl to ENABLE write
cache is specifically within a conditional on "whole disk" being true, with
no "else", which would seem the most obvious place to put such a disable
cache operation if ZFS was actually doing that).  If you start using UFS,
the settings required to make UFS stable should be part of setting up UFS.
It makes no sense for ZFS to disable something that helps performance, on
the off chance that you *might* be using some other fragile filesystem
also, and that the code for that fragile filesystem, or other setup,
somehow failed to configure things to support that fragility before you
started also using ZFS on that disk.  It shouldn't be ZFS's job to clean up
non-sane non-ZFS configurations, only to avoid getting in the way of
whatever configuration already exists (if ZFS doesn't own the entire disk,
leave the settings alone).

The only places that make sense for code that disables things to make UFS
happy are UFS code itself, or the OS when it detects that UFS is being
used.  ZFS shouldn't look for UFS specifically (there could be other
filesystems that are also fragile to cache settings), so it makes sense for
it to do nothing to the disk settings if it can't prove that ZFS is the
only thing using the disk.

However, I am speculating here, not speaking from experience.


> So question is for present-day illumos, until then I can presume it is the
> same as before for cache/partition thing, so needing more recent info on
> this.
> Unlike explanation about shipped drives, I got explanation about UFS
> getting garbled if disk cache is On and using partitions.


The only reason more recent information would be required is if the code in
question has changed since then, or its reason for having such code has
changed, but UFS hasn't changed in a while, as I understand it, and is
being used less frequently.  It would be nice to have an authoritative
source weigh in (again), but since nobody else brought up this old topic
and previous answer, I decided I should.

Tim


More information about the openindiana-discuss mailing list