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

fix: handling vfiler for qtree 7mode #797

Merged
merged 1 commit into from
Jan 24, 2022
Merged

fix: handling vfiler for qtree 7mode #797

merged 1 commit into from
Jan 24, 2022

Conversation

Hardikl
Copy link
Contributor

@Hardikl Hardikl commented Jan 24, 2022

7mode testing:

  1. volume uniqueness: same name volume can't be created in cluster. volume is unique within cluster irrespective of vfiler.

a. created volab in aggr tobago_2_aggr0

tobago-2> vol create volab tobago_2_aggr0  20m 
Creation of volume 'volab' with size 20m on containing aggregate
'tobago_2_aggr0' has completed.
tobago-2> vol status                          
         Volume State           Status                Options
   vol_4kb_neuM online          raid_dp, flex         snapmirrored=on, create_ucode=on, 
                                snapmirrored          convert_ucode=on, fs_size_fixed=on
                                read-only             
                                64-bit                
           vol0 online          raid4, flex           root, create_ucode=on, convert_ucode=on
                                64-bit                
              D online          raid4, flex           snapmirrored=on, create_ucode=on, 
                                snapmirrored          convert_ucode=on, fs_size_fixed=on
                                read-only             
                                64-bit                
          volab online          raid4, flex           create_ucode=on, convert_ucode=on
                                64-bit                

b. trying to create the same volume in same aggr, it got failed

tobago-2> vol create volab tobago_2_aggr0  20m
vol create: Volume 'volab' already exists
tobago-2> 

c. trying to create same volume in another aggr, it got failed

tobago-2> vol create volab tobago_2_aggr1_SAS  20m
vol create: Volume 'volab' already exists
tobago-2> 
  1. qtree uniqueness: same name qtree can't be created in one volume. qtree is unique within volume irrespective of vfiler.

a. created qtree qt1 in volume volab

tobago-2> qtree create /vol/volab/qt1
tobago-2> qtree status               
Volume   Tree     Style Oplocks  Status   
-------- -------- ----- -------- ---------
vol_4kb_neuM          unix  enabled  normal   
vol0              unix  enabled  normal   
vol0     help     unix  enabled  normal   
vol0     qtreea   unix  enabled  normal   
D                 unix  enabled  normal   
volab             unix  enabled  normal   
volab    qt1      unix  enabled  normal   

b. created qt2 qtree in same volume volab

tobago-2> qtree create /vol/volab/qt2
tobago-2> qtree status               
Volume   Tree     Style Oplocks  Status   
-------- -------- ----- -------- ---------
vol_4kb_neuM          unix  enabled  normal   
vol0              unix  enabled  normal   
vol0     help     unix  enabled  normal   
vol0     qtreea   unix  enabled  normal   
D                 unix  enabled  normal   
volab             unix  enabled  normal   
volab    qt1      unix  enabled  normal   
volab    qt2      unix  enabled  normal   

c. trying to create qtree qt1 in same volume, it got failed

tobago-2> qtree create /vol/volab/qt1
qtree create: Can't create qtree (qtree exists).
tobago-2> 

d. trying to create qtree qt1 in another volume vol0, it's get created.

tobago-2> qtree create qt1           
tobago-2> qtree status    
Volume   Tree     Style Oplocks  Status   
-------- -------- ----- -------- ---------
vol_4kb_neuM          unix  enabled  normal   
vol0              unix  enabled  normal   
vol0     help     unix  enabled  normal   
vol0     qt1      unix  enabled  normal   
vol0     qtreea   unix  enabled  normal   
D                 unix  enabled  normal   
volab             unix  enabled  normal   
volab    qt1      unix  enabled  normal   
volab    qt2      unix  enabled  normal   
tobago-2> 

So, for 7 mode, irrespective of vfiler, volume-qtree combination is unique key for qtree and quota. If vfiler name can be available in response, still uniqueness of the records won't be impacted.

Copy link
Collaborator

@cgrinds cgrinds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job root causing this and fixing it @Hardikl

@cgrinds cgrinds merged commit 0502f34 into main Jan 24, 2022
@cgrinds cgrinds deleted the qtree_7mode branch January 24, 2022 12:57
@Hardikl Hardikl linked an issue Jan 25, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Qtree 7mode Template is not available in this repository
3 participants