Whole disk ZFS or -a4k partition

Alexandr shuriku at shurik.kiev.ua
Wed Jul 3 10:09:14 UTC 2013


03.07.2013 12:46, Fleuriot Damien пишет:
> On Jul 3, 2013, at 11:22 AM, Alexandr <shuriku at shurik.kiev.ua> wrote:
>
>> Hello, community!
>>
>> I have a laptop with 2 disks - mSATA 32Gb SSD and 500Gb HDD. I plan to
>> use SSD as whole disk ZFS pool with root and /usr partitions and 500Gb
>> SATA as ZFS pool for /home and /var. My questions are:
>>
>> 1. Do I need to create a 4k aligned partition on HDD for zfs pool or
>> best to use a whole disk?
>> 2. Where the best place for swap - ssd or hdd? SSD is much faster, but
>> with limited write life cycle.
>>
>
> I advise against using the whole disk for the following reason:
>
> DISK1, manufacturer 1: 3tb (give or take)
> DISK2, manufacturer 2: 3tb (give or take MINUS 10 BYTES)
>
> Et voila, you can't use DISK1 with DISK2 because DISK2 is 10 bytes smaller and won't fit.
>
>
> When building RAID arrays, it's recommended to:
> - use disks from different manufacturers
> - use disks ordered at different times (for example half at T1, half at T2)
> - shave a few MBs off your disks, so that they all present the same size
>
>
> Here's an example from my nas at home:
>
> % gpart show /dev/ada6
> =>        34  5860533101  ada6  GPT  (2.7T)
>           34           6        - free -  (3.0k)
>           40      102400     1  freebsd-ufs  (50M)
>       102440  5860430688     2  freebsd-zfs  (2.7T)
>   5860533128           7        - free -  (3.5k)
>
>
> Notice how the disk presents 5860533101 sectors of 512 bytes.
> Also notice how I've shaved off 50mbytes in the first, unused partition.
>
> This way, if I replace a disk later on and the new disk only has, say 5860533095 512-byte sectors, I can still use it in my pool.
>
Thanks, but I haven't raid arrays in my setup. I have two different
zpools on ssd and hard disk.


More information about the freebsd-fs mailing list