Whole disk ZFS or -a4k partition

Ivailo Tanusheff Ivailo.Tanusheff at skrill.com
Wed Jul 3 11:56:21 UTC 2013


Hi,

I can give you my point of view:

Which zpool do you refer to? Still I would align both pools - on SSD because you will have a boot code anyway. 
What I would do on SSD is to use:
gpart add -b 34 -s 94 -t freebsd-boot <ssd drive>

The second thing I would get in mind Is the swap - I would not use a ZFS for that, had a lot of issues with similar setup and taking into account that ZFS uses a lot of RAM you may become to situation when you want to swap data to use RAM for ZFS functionality, related to the swap volume on the ZFS subsystem, which is a deadlock scenario.
So I would advise you to create swap partition on the SSD and use this partition in the system.
gpart add -t freebsd-swap -s 4G  -l ssd-swap <ssd drive>
gpart add -t freebsd-zfs -l ssd-zfs <ssd drive>

This will solve you the alignment, swap issues and etc.

About the second drive - there are two issues: may you need to replace the disk and will you need additional swap in some case.
Just because future is unsure I would recommend to again use 4K align, to create a similar SWAP partition and DO NOT use it on the system and use gnop for the 4K sizing:
gnop create -S 4096 /dev/gpt/disk0
zpool create zroot /dev/gpt/disk0.nop
zpool export zroot
gnop destroy /dev/gpt/disk0.nop
zpool import zroot

This way you will solve:
-  the 4K issues, if you have any;
- the replacement issues, if you get a disk with smaller sector count;
- in case you have some swap issues/needs, you will be able to issue swapon /dev/gpt/... and temporary increasethe swap, but not using this all time you will not decrease performance of the system in normal days.

Best regards,
Ivailo Tanusheff


-----Original Message-----
From: owner-freebsd-fs at freebsd.org [mailto:owner-freebsd-fs at freebsd.org] On Behalf Of Alexandr
Sent: Wednesday, July 03, 2013 12:22 PM
To: freebsd-fs at freebsd.org
Subject: Whole disk ZFS or -a4k partition

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.
_______________________________________________
freebsd-fs at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"




More information about the freebsd-fs mailing list