Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 3 hdd, with the next camcotrol identify.

root@cirmos:/root # camcontrol identify ada1
pass2: <WDC WD10EZEX-00RKKA0 80.00A80> ATA-8 SATA 3.x device
pass2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-8 SATA 3.x
device model          WDC WD10EZEX-00RKKA0
firmware revision     80.00A80
serial number         WD-WMC1S4587539
WWN                   50014ee003930f6e
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 4096, offset 0
LBA supported         268435455 sectors
LBA48 supported       1953525168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6 

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes  yes
write cache                    yes  yes
flush cache                    yes  yes
overlap                        no
Tagged Command Queuing (TCQ)   no   no
Native Command Queuing (NCQ)   yes      32 tags
SMART                          yes  yes
microcode download             yes  yes
security                       yes  no
power management               yes  yes
advanced power management      no   no
automatic acoustic management  no   no
media status notification      no   no
power-up in Standby            yes  no
write-read-verify              no   no
unload                         no   no
free-fall                      no   no
data set management (TRIM)     no
root@cirmos:/root # 

as can see above, the sector size is detected as:

sector size           logical 512, physical 4096, offset 0

Here is already some topics on 4k drive tuning. I want create ZFS (raidz) from above 3 drives, and have the next questions:

  1. Are these drives 4k drives? (asking because the physical sector size is 4k but logical is reported as 512b)
  2. what is the recommended gpart for the above divers to get correct alignment (Want create one freebsd-zfs partition)
  3. Is here zpool tuning what i should consider? (the root, system and swap should be not in the above drives - these drives are only for "pure" file storage (and home directories).
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Starting with point 2; in all best practices, ZFS should be "fed" whole drives to manage. No special partitioning required.

As to the rest of it:

This link has a lot of useful hints, of which I'll repeat some.

Each vdev (like a mirror or raidz) has a single ashift. ashift=9 is 512 byte sectors, ashift=12 is 4k sectors. (calculated as 2^ashift=sector-size)

To help ensure future-forward compatibility, without having to destroy and recreate the pool later, it is generally recommended to use ashift=12 regardless of actual drive capabilities (since it can't be changed after vdev creation).

From the link:

# gnop create -S 4096 ada0
# zpool create tank raidz ada0.nop ada1 ada2
# zdb | grep ashift
     ashift: 12

The gnop command creates a forced 4k-alignment passthrough device for ada0 as ada0.nop Then, the pool is created. ZFS will then use ashift=12 for the whole vdev. With the pool/vdev created, it is recommended to get rid of the ada0.nop passthrough device.

# zpool export tank
# gnop destroy ada0.nop
# zpool import tank

Now the pool will import with devices ada0, ada1, and ada2. And it will still have the locked-in ashift=12 that it was created with.

That's it. With ZFS managing the whole drives, you're set and ready to go.

share|improve this answer
    
By giving ZFS the entire drive, you're also accepting the risk that if in the future you'll need to replace the drive that failed and the replacement you'll buy has even one sector fewer than the old disk, you won't be able to use it. IMO, a better practice is to create a partition that's a slightly smaller than the entire disk. Such margin would allow you to use other disk models of the "same" capacity. –  Marcin Kaminski Mar 3 at 18:08
    
Meh. But to elaborate, how often do replacement drives (especially with time being an element of consideration) DECREASE in size? –  killermist Apr 17 at 0:03
    
I've had this happen to me twice in the past. I'd rather set it up the way that takes out the potential for guesswork out of the process in the future. –  Marcin Kaminski Apr 22 at 13:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.