View Single Post
Old 26th December 2012
silex silex is offline
Port Guard
 
Join Date: Mar 2012
Posts: 18
Default

Vermaden, something extra we forgot to mention on ZFS and disk alignment: I've seen a noticeable improvement when the ZIL on the SSD is properly aligned, in that case i've used Gnop to 4K-align a mounted memory drive then instructed ZFS to mirror log on the SSD with the properly aligned memory drive, I then deleted the MD and the Gnop device yet ZFS keeps a 12 ashift on the log disk and it's what we want. [strike]I'll add the instructions later.[/strike]

ZIL / Log Device /dev/ada5
for proper alignement calculate dd seek with this formula: device media size / 1024000 -1
Code:
# diskinfo -v ada5 #### media size: 128035676160 
# echo "128035676160 / 1024000 - 1" | bc #### seek: 125033 
# dd if=/dev/zero of=tmpdsk0 bs=1024000 count=1 seek=125033
# mdconfig -a -t vnode -f tmpdsk0
# gnop create -S 4096 md0
# gpart create -s gpt ada5
# gpart add -t freebsd-zfs -l zlog -b 2048 -a 4k ada5
# zpool add znas log mirror md0.nop gpt/zlog
# zpool detach znas md0.nop
# gnop destroy md0.nop
# mdconfig -d -u md0
# zdb znas | grep ashift
to remove ZIL use
Code:
# zpool remove znas zlog



ps. I'm posting here because this thread is probably one of the most complete ZFS installation instructions found online and it's good to keep it alive.

Last edited by silex; 28th December 2012 at 09:26 PM. Reason: ZFS ZIL Correct Alignment Instructions
Reply With Quote