Bug #122

ZVOL's created via GUI/NMC commands do not match ZVOL made from zfs commands

Added by Ryan W over 2 years ago. Updated over 2 years ago.

Status:New Start:November 27, 2010
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:-
Target version:-

Description

Creating ZVOL's with different blocksizes than default end up using more space on the filesystem than a same sized ZVOL created by the 'zfs' native tools.

See this thread for intimate details: http://nexentastor.org/boards/1/topics/1440

create zvol tank/cmd512 -s 50GB -b 512     
create zvol tank/cmd8k -s 50GB -b 8k     
create zvol tank/cmd64k -s 50GB -b 64k     

show zvol
tank/cmd512        50G       75.2G     tank        -     -       -
tank/cmd64k        50G       50.2G     tank        -     -       -
tank/cmd8k         50G       51.6G     tank        -     -       -

vs

root@calculon:~# zfs create -V 50GB -o volblocksize=512 tank/vol512
root@calculon:~# zfs create -V 50GB -o volblocksize=8K tank/vol8k 
root@calculon:~# zfs create -V 50GB -o volblocksize=64K tank/vol64k
root@calculon:~# zfs list
NAME                     USED  AVAIL  REFER  MOUNTPOINT

tank/vol512             51.6G   780G  23.9K  -
tank/vol64k             51.6G   780G  23.9K  -
tank/vol8k              51.6G   780G  23.9K  -

You can see from this that the 512 byte block size volumes are 25 GB LARGER than they should be. The 8k block size ZVOL is larger than the 64k blocksize ZVOL, which in itself is kind of weird.

But the real standout is the 512 byte blocksize ZVOL.

As you can see below the NMC command creation, the expert_mode (zfs command line tools) yield more consistent results.

History

Updated by Ryan W over 2 years ago

Top: GUI made ZVOL, Bottom: zfs (expert_mode) made ZVOL.

show zvol tank/vol512gui -v                                                                                       
PROPERTY                      VALUE                                       
name                          tank/vol512gui                              
size                          50G                                         
volume                        tank                                        
usedbyrefreservation          74.8G                                       
reservation                   none                                        
volsize                       50G                                         
referenced                    367M                                        
zvol_name                     vol512gui                                   
checksum                      on                                          
dedup                         off                                         
readonly                      off                                         
logbias                       latency                                     
primarycache                  all                                         
nms:swap                      no                                          
scsidisk_guid                 600144F0485B3908E2B34CF183A00005            
nms:description                                                           
used                          75.2G                                       
volume_name                   tank                                        
copies                        1                                           
size_bytes                    53687091200                                 
usedbydataset                 367M                                        
scsidisk_writeback_cache      Enabled                                     
size                          51200                                       
usedbysnapshots               0                                           
compression                   off                                         
volblocksize                  512                                         
compressratio                 1.00x                                       
available                     626G                                        
mlslabel                      none                                        
sync                          standard                                    
usedbychildren                0                                           
refreservation                75.2G                                       
scsidisk_state                Online                                      
secondarycache                all                                         
creation                      Sat Nov 27 16:17 2010     
show zvol tank/vol512 -v                                                                                          
PROPERTY                      VALUE                                       
name                          tank/vol512                                 
size                          50G                                         
volume                        tank                                        
usedbyrefreservation          51.0G                                       
reservation                   none                                        
volsize                       50G                                         
referenced                    617M                                        
zvol_name                     vol512                                      
checksum                      on                                          
dedup                         off                                         
readonly                      off                                         
logbias                       latency                                     
primarycache                  all                                         
nms:swap                      no                                          
scsidisk_guid                 600144F0485B3908E2B34CF181390002            
nms:description                                                           
used                          51.6G                                       
volume_name                   tank                                        
copies                        1                                           
size_bytes                    53687091200                                 
usedbydataset                 617M                                        
scsidisk_writeback_cache      Enabled                                     
size                          51200                                       
usedbysnapshots               0                                           
compression                   off                                         
volblocksize                  512                                         
compressratio                 1.00x                                       
available                     602G                                        
mlslabel                      none                                        
sync                          standard                                    
usedbychildren                0                                           
refreservation                51.6G                                       
scsidisk_state                Online                                      
secondarycache                all                                         
creation                      Sat Nov 27 16:03 2010                       

Updated by Ryan W over 2 years ago

This seems to be the difference between the way NMC makes the ZVOL:

root@calculon:/volumes# zfs create -b 512 -V 50GB tank/test512 This is how Nexenta NMC makes the volume.

root@calculon:/volumes# zfs create -V 50GB -o volblocksize=512 tank/test512blocksize This is how Sun recommends.

zfs list
NAME USED AVAIL REFER MOUNTPOINT tank/test512 75.2G 499G 23.9K - tank/test512blocksize 51.6G 476G 23.9K -

Updated by Ryan W over 2 years ago

  • Priority changed from Urgent to Normal

changing this to 'normal' priority. Not sure how I set it to urgent from the start.

Also available in: Atom PDF