Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow higher ashift values as command line parameter #4205

Closed
kaazoo opened this issue Jan 11, 2016 · 0 comments · Fixed by #5763
Closed

Allow higher ashift values as command line parameter #4205

kaazoo opened this issue Jan 11, 2016 · 0 comments · Fixed by #5763
Labels
Type: Feature Feature request or new feature

Comments

@kaazoo
Copy link

kaazoo commented Jan 11, 2016

I have a iSCSI (multipathed) device which has a physical blocksize of 16 KB:

scsi host17: iSCSI Initiator over TCP/IP
scsi 17:0:0:0: Direct-Access     LIO-ORG  IBLOCK           4.0  PQ: 0 ANSI: 5
sd 17:0:0:0: Attached scsi generic sg3 type 0
sd 17:0:0:0: [sdd] 194884141056 512-byte logical blocks: (99.7 TB/90.7 TiB)
sd 17:0:0:0: [sdd] 16384-byte physical blocks
sd 17:0:0:0: [sdd] Write Protect is off
sd 17:0:0:0: [sdd] Mode Sense: 43 00 10 08
sd 17:0:0:0: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUA
sd 17:0:0:0: [sdd] Attached SCSI disk

When I try to specifiy 'ashift=14' for 16 KB blocksize, I get the following error:

# zpool create -o ashift=14 pool1 /dev/mapper/mpath98
cannot create 'pool1': property 'ashift' number 14 is invalid.

However if I don't specifiy the ashift parameter, I everthing is fine and ZFS even seems to use 'ashift=14':

# zpool create live_neu /dev/mapper/mpath98

# zdb
pool1:
    version: 5000
    name: 'pool1'
    state: 0
    txg: 4
    pool_guid: 11624135545234252745
    errata: 0
    hostid: 8323329
    hostname: 'server123'
    vdev_children: 1
    vdev_tree:
        type: 'root'
        id: 0
        guid: 11624135545234252745
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 8692662930490887573
            path: '/dev/mapper/mpath98'
            whole_disk: 0
            metaslab_array: 34
            metaslab_shift: 39
            ashift: 14
            asize: 99780675502080
            is_log: 0
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
@kaazoo kaazoo changed the title Allow higher ashift values Allow higher ashift values as command line parameter Jan 13, 2016
@behlendorf behlendorf added the Type: Feature Feature request or new feature label Nov 8, 2016
behlendorf pushed a commit that referenced this issue May 3, 2017
This commit allow higher ashift values (up to 16) in 'zpool create'

The ashift value was previously limited to 13 (8K block) in b41c990
because the limited number of uberblocks we could fit in the
statically sized (128K) vdev label ring buffer could prevent the
ability the safely roll back a pool to recover it.

Since b02fe35 the largest uberblock size we support is 8K: this
allow us to store a minimum number of 16 uberblocks in the vdev
label, even with higher ashift values.

Additionally change 'ashift' pool property behaviour: if set it will
be used as the default hint value in subsequent vdev operations
('zpool add', 'attach' and 'replace'). A custom ashift value can still
be specified from the command line, if desired.

Finally, fix a bug in add-o_ashift.ksh caused by a missing variable.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #2024 
Closes #4205 
Closes #4740 
Closes #5763
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants