Whole disk ZFS or -a4k partition

Alexandr shuriku at shurik.kiev.ua
Wed Jul 3 13:16:14 UTC 2013


03.07.2013 14:56, Ivailo Tanusheff пишет:
> 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
>
>
Thank you for your explain. I'll try it soon and post my results. One
thing - I can't use gpt-disks because off my laptop's bios (Lenovo
Thinkpad E530) cannot boot it, only mbr-style.


More information about the freebsd-fs mailing list