Whole disk ZFS or -a4k partition

Xin Li delphij at delphij.net
Wed Jul 3 21:37:24 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 07/03/13 02:22, Alexandr 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:

Why not using that 32GB SSD as L2ARC (and/or) ZIL device?  (It's
generally a good idea to have a dedicated boot zpool which means you
may not be able to take advantage of the SSD, though).  We do not
currently support persistent L2ARC (the original author's patch is
still pending Illumos developers' review) but I believe we will have
it in the near future so no "pre-warming" would be needed after reboot.

This also gives you more flexibility -- it's more likely to run out of
space on a 32Gb device if it's configured as a separate pool, and the
system decides whether to use the SSD device.

> 1. Do I need to create a 4k aligned partition on HDD for zfs pool
> or best to use a whole disk?

Not if you don't boot from the pool.  I generally create GPT partition
to make it easier to manage.

> 2. Where the best place for swap - ssd or hdd? SSD is much faster,
> but with limited write life cycle.

I'd put swap on hdd.  You do not want your system to swap a lot, and
generally it's a good idea to max out memory for a laptop if you run
ZFS, in the case, the swap size could be reasonably large (the
recommended swap size is no less than physical memory) but rarely
used.  It would be wasteful to use SSD for swap in this case.

Cheers,
- -- 
Xin LI <delphij at delphij.net>    https://www.delphij.net/
FreeBSD - The Power to Serve!           Live free or die
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCgAGBQJR1JmTAAoJEG80Jeu8UPuzLjAH/2V1CSGnnwXC8wK6My9Xnw+i
bLCaoZvJuDEJKuOZuNaEmZ5YxkbLyvMpdvyoZ56lJpe87N+eH+syH6R7NpfSojut
hvIg9fNkTy/fGo4hOTu0zdjvBUyLZ0Cst3lF/AQvQg6YRXV4CncWYqu1HpYvAD2v
4++qRnYNWZwO7oSZKl6FQ2O6l0Jciuw8mlRKjWHdJI+hic5Dli4u39XUqOUStRW6
1L57uzlv3wNh/oJYiF0x3wQJELMYaiteawpZklWTXek6zFKGoLN10NBhTASlhVUS
tBL2KAdvITZf7NrvPX2HVkaWYaFkd7DT66z/sKl5Komt6h+siY0ZdGxgQmwbQm4=
=EIZ7
-----END PGP SIGNATURE-----


More information about the freebsd-fs mailing list