4k drives and ashift=12?

Moderators: jhartley, MSR734, nola

4k drives and ashift=12?

Post by robert » Mon Sep 17, 2012 6:25 am

How do I create a pool with ashift=12 using CE?
robert Offline


 
Posts: 7
Joined: Mon Sep 17, 2012 4:50 am

Re: 4k drives and ashift=12?

Post by wonkywonky » Mon Sep 17, 2012 10:19 am

robert wrote:How do I create a pool with ashift=12 using CE?


From page 10 of the Quickstart guide:

Code: Select all
sudo zpool create -o ashift=12 tank mirror /dev/disk2 /dev/disk4
wonkywonky Offline


 
Posts: 25
Joined: Fri Sep 14, 2012 11:33 pm

Re: 4k drives and ashift=12?

Post by 51t » Mon Sep 17, 2012 3:30 pm

Or if you have to force the create add the -f

Code: Select all
sudo zpool create -f -o ashift=12 tank mirror /dev/disk2 /dev/disk4
51t Offline


 
Posts: 5
Joined: Sat Sep 15, 2012 12:05 am

Re: 4k drives and ashift=12?

Post by shuman » Tue Sep 18, 2012 7:31 pm

I just bought some 4k drives. Is this something I should
do when creating my pools?
What are the benefits/drawback?

-Shuman
- Mac Mini (Late 2012), 10.8.5, 16GB memory, pool - 2 Mirrored 3TB USB 3.0 External Drives
shuman Offline

User avatar
 
Posts: 96
Joined: Mon Sep 17, 2012 8:15 am

Re: 4k drives and ashift=12?

Post by flight16 » Tue Sep 18, 2012 10:46 pm

Does this work for drives such as the WD Green drives that report 512 sector size but are actually 4k?

Does Zevo take care of alignment (assuming I'm using the whole disk) and everything? I've read so many posts about FreeBSD and tricks you have to play with geom and aligning partitions on 4k boundaries.
flight16 Offline


 
Posts: 4
Joined: Sat Sep 15, 2012 12:52 am

Re: 4k drives and ashift=12?

Post by dbrady » Wed Sep 19, 2012 1:14 pm

flight16 wrote:Does this work for drives such as the WD Green drives that report 512 sector size but are actually 4k?

Does Zevo take care of alignment (assuming I'm using the whole disk) and everything? I've read so many posts about FreeBSD and tricks you have to play with geom and aligning partitions on 4k boundaries.


Yes, the purpose for the zpool create ashift override is exactly for these 512e drives (that hide their true size).

When you pass in a whole disk (like /dev/diskN), ZEVO will correctly align the GPT partitions on 4K offsets.
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: 4k drives and ashift=12?

Post by si-ghan-bi » Wed Sep 19, 2012 1:22 pm

dbrady wrote:When you pass in a whole disk (like /dev/diskN), ZEVO will correctly align the GPT partitions on 4K offsets.


Only if the option is given, right? The sentence is not clear.
si-ghan-bi Offline


 
Posts: 145
Joined: Sat Sep 15, 2012 5:55 am

Re: 4k drives and ashift=12?

Post by dbrady » Thu Sep 20, 2012 9:47 pm

In all cases where a whole disk, like /dev/diskN, is passed into zpool create, ZFS will end up on a 4K aligned partition boundary. If you use an existing slice, like /dev/disk4s3", that slice is probably already 4K aligned but there's nothing ZFS can do to fix it if it's not.
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: 4k drives and ashift=12?

Post by si-ghan-bi » Fri Sep 21, 2012 12:56 am

And the option for aligning has to be used in both cases you mentioned?
I mean, is it always needed with such drives, or is it only a way to ensure initial alignment?
si-ghan-bi Offline


 
Posts: 145
Joined: Sat Sep 15, 2012 5:55 am

Re: 4k drives and ashift=12?

Post by robert » Tue Oct 02, 2012 8:01 am

Ok, so I created the pool with:
Code: Select all
sudo zpool create -f -o ashift=12 -O casesensitivity=insensitive -O normalization=formD atlantic mirror /dev/disk2 /dev/disk3


And ended up with:
zfs get all:
Code: Select all
NAME      PROPERTY              VALUE                  SOURCE
atlantic  type                  filesystem             -
atlantic  creation              Tis Okt  2 14:55 2012  -
atlantic  used                  940Ki                  -
atlantic  available             2,69Ti                 -
atlantic  referenced            580Ki                  -
atlantic  compressratio         1.00x                  -
atlantic  mounted               yes                    -
atlantic  quota                 none                   default
atlantic  reservation           none                   default
atlantic  recordsize            128Ki                  default
atlantic  mountpoint            /Volumes/atlantic      default
atlantic  checksum              on                     default
atlantic  compression           off                    default
atlantic  atime                 on                     default
atlantic  devices               on                     default
atlantic  exec                  on                     default
atlantic  setuid                on                     default
atlantic  readonly              off                    default
atlantic  snapdir               hidden                 default
atlantic  canmount              on                     default
atlantic  copies                1                      default
atlantic  version               5                      -
atlantic  utf8only              on                     -
atlantic  normalization         formD                  -
atlantic  casesensitivity       insensitive            -
atlantic  refquota              none                   default
atlantic  refreservation        none                   default
atlantic  primarycache          all                    default
atlantic  secondarycache        all                    default
atlantic  usedbysnapshots       0                      -
atlantic  usedbydataset         580Ki                  -
atlantic  usedbychildren        360Ki                  -
atlantic  usedbyrefreservation  0                      -
atlantic  logbias               latency                default
atlantic  sync                  standard               default


AND
zpool get all:
Code: Select all
NAME      PROPERTY       VALUE      SOURCE
atlantic  size           2,73Ti     -
atlantic  capacity       0%         -
atlantic  altroot        -          default
atlantic  health         ONLINE     -
atlantic  guid           11506481187200442667  default
atlantic  version        28         default
atlantic  failmode       continue   default
atlantic  listsnapshots  off        default
atlantic  autoexpand     off        default
atlantic  free           2,73Ti     -
atlantic  allocated      1,04Mi     -
atlantic  readonly       off        -
atlantic  ashift         12         local


Looking good so far.
Any input or concerns?
robert Offline


 
Posts: 7
Joined: Mon Sep 17, 2012 4:50 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron