Whole disk ZFS or -a4k partition

Jeremy Chadwick jdc at koitsu.org
Wed Jul 3 20:09:40 UTC 2013


On Wed, Jul 03, 2013 at 04:16:06PM +0300, Alexandr wrote:
> 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.

You can use GPT with a BIOS that only supports MBR (in other words, you
do not need UEFI to boot from GPT).  FreeBSD's boot blocks are
intelligent in this regard.

I know because 1) I use this on my own systems that do not have UEFI, 2)
tons of other people here do as well, and 3) because even Wikipedia
states so.  :-)

-- 
| Jeremy Chadwick                                   jdc at koitsu.org |
| UNIX Systems Administrator                http://jdc.koitsu.org/ |
| Making life hard for others since 1977.             PGP 4BD6C0CB |



More information about the freebsd-fs mailing list