ZFS - whole disk or partition or BSD slice?

Volodymyr Kostyrko c.kworr at gmail.com
Mon Jan 28 09:41:02 UTC 2013


28.01.2013 09:03, Steve O'Hara-Smith:
> On Sun, 27 Jan 2013 22:05:05 -0800
> Michael Sierchio <kudzu at tenebras.com> wrote:
>
>> On Sun, Jan 27, 2013 at 5:36 PM, Shane Ambler <FreeBSD at shaneware.biz>
>> wrote:
>>
>>> I recall reading that using partitions for zfs on FreeBSD was as good as
>>> full disks.
>>
>> No, it isn't - ZFS can fully utilize disk caches when presented with
>> whole devices. There are possible reasons to create partitions - one
>> being that if an unfriendly OS sees the device, it won't try to
>> initialize it if it sees a partition map.  Another is using a cheap
>> RAID controller that can't be fully disabled - in which case you
>> generally need to create a partition that doesn't include the last few
>> sectors of the disk, where such controllers keep magic data.
>
> 	There's one other good reason to use partitions when mirroring.
> When the time comes to replace a drive in a mirror it is necessary that the
> new drive be the same size (or larger) than the one it replaces. Given that
> drives of nominally the same capacity (and even of the same type and brand
> bought at different times) tend not to be exactly the same size using a
> partition a little smaller than the whole drive makes it certain that a
> replacement drive will be big enough to use in the mirror when it arrives.

There's no need for that as ZFS can use same or bigger partition to 
mirror existing one. If the second one would be smaller - do some math 
and cut out some swap space.

-- 
Sphinx of black quartz, judge my vow.


More information about the freebsd-questions mailing list