Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2013 11:46:29 +0200
From:      Fleuriot Damien <ml@my.gd>
To:        Alexandr <shuriku@shurik.kiev.ua>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Whole disk ZFS or -a4k partition
Message-ID:  <F05806B1-944D-4982-81F5-0893D9F6E0C4@my.gd>
In-Reply-To: <51D3ED4F.5030102@shurik.kiev.ua>
References:  <51D3ED4F.5030102@shurik.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jul 3, 2013, at 11:22 AM, Alexandr <shuriku@shurik.kiev.ua> wrote:

> Hello, community!
>=20
> 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:
>=20
> 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.
>=20


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
=3D>        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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F05806B1-944D-4982-81F5-0893D9F6E0C4>