zPET - IBM Z and z/OS Platform Evaluation and Test - Group home

zFS Version 1.5 Aggregate and Extended (v5) Directory Experience Part3

  

Convert a zFS Version 1.5 Aggregate to a Version 1.4 Aggregate

You can convert a version 1.5 aggregate to a version 1.4 aggregate by using the IOEFSUTL utility. Since, the aggregate will be a version 1.4 and can not contain extended (v5) directories, all extended (v5) directories will be converted to v4 directories. The file system needs to be unmounted and the convert needs to be executed on a z/OS V2R1 system.

 

Note: The zFS IOEFSUTL utility with the converttov4 parameter can be used to convert a version 1.5 aggregate to a version 1.4 aggregate as long as it is no larger than 4 TB and does not have any extended (v5) directories with more than 64K-1 subdirectories. This includes converting extended (v5) directories into old format (v4) directories.

 

For example, we had mounted a version 1.5 aggregate (OMVSSPN.VER14.TO.VER15.ZFS) that was earlier converted from a version 1.4 to a version 1.5, and all the directories were converted to extended (v5) directories. We then used the IOEFSUTL utility to convert the aggregate to a version 1.4 aggregate.

 

Unmount the file system.

$ unmount /zfspetmounts/ver14tover15

 

Here are JCL excerpts we used to convert a version 1.5 aggregate offline to a version 1.4 aggregate.

//CONVERT EXEC PGM=IOEFSUTL,REGION=0M,                                

// PARM=('converttov4 -aggregate OMVSSPN.VER14.TO.VER15.ZFS')

 

This is an example of the conversion to version 1.4 results.

 

IOEZ00559I zFS IOEFSUTL: Initializing z/OS   zFS                              

Version 02.01.00 Service Level OA42544 - HZFS410.                              

Created on Mon Jul 22 11:34:59 EDT 2013.                                       

Address space asid x3B                                                         

IOEZ00760I No IOEZPRM DD specified. Parmlib search being used.                 

IOEZ00800I Conversion has processed 7 of 7 objects in the anode table.         

IOEZ00803I 3 directories were found, 3 converted, 3 directory pages converted to 3 directory pages.

IOEZ00810I Successfully changed aggregate OMVSSPN.VER14.TO.VER15.ZFS to version 1.4.

IOEZ00808I Successfully converted all directories in aggregate OMVSSPN.VER14.TO.VER15.ZFS to version 4.

 

After mounting without any parameters we see that it is now a version 1.4 aggregate and the directories are back to v4.

 

MOUNT FILESYSTEM('OMVSSPN.VER14.TO.VER15.ZFS') TYPE(ZFS)

 MODE(RDWR) MOUNTPOINT('/zfspetmounts/ver14tover15')

 

Using zfsadm fileinfo we see that the aggregate is back to version 1.4.

$ zfsadm aggrinfo -aggregate OMVSSPN.VER14.TO.VER15.ZFS -long

OMVSSPN.VER14.TO.VER15.ZFS (R/W COMP): 1263 K free out of total 1440       

version 1.4                                                                

auditfid E2E2F0F0 F1F41A4E 0000                                            

sysplex-aware                                                              

          157 free 8k blocks;         7 free 1K fragments                

          112 K log file;            16 K filesystem table               

            8 K bitmap file

 

Using zfsadm fileinfo, we see that all directories are back to v4.

 

$ zfsadm fileinfo -path /zfspetmounts/ver14tover15

$ zfsadm fileinfo -path /zfspetmounts/ver14tover15/origv14dir1

$ zfsadm fileinfo -path /zfspetmounts/ver14tover15/origv14dir2

 

All show within the fileinfo display:

...

object genvalue       0x00000000   dir version           4

Convert v4 Directory to Extended (v5) Directory

Once an aggregate is a version 1.5 aggregate, new directories created in it will be extended (v5) directories. On our all z/OS V2R1 sysplex, we converted directories to extended (v5) directories by using one or all of the following (Note: only allowed on a z/OS V2R1 or later system):

 

  • Explicitly, one at a time, for a mounted aggregate using the zfsadm convert -path command.
  • Automatically, as they are accessed, for a mounted aggregate when the aggregate has the converttov5 attribute.
  • Offline, converting all directories using the IOEFSUTL converttov5 batch utility.

 

A v4 directory can be converted to an extended (v5) directory by using copy (cp) if the target is a version 1.5 aggregate. A v4 directory can be converted to an extended (v5) directory using the move (mv) command if the target is in a different version 1.5 aggregate and the directory is created as a result of the move.

Convert a v4 Directory Using zfsadm convert -path

We converted an existing v4 directory in a version 1.5 aggregate to an extended (v5) directory using the zfsadm convert –path command.

 

An aggregate (OMVSSPN.PET3.ZFS.FS mounted on /pet3) was converted earlier to a version 1.5 aggregate from a version 1.4 aggregate without converting the existing directories to extended (v5) directories.

 

We now want to convert the root directory of /pet3 to an extended (v5) directory.

 

Check that the aggregate is a version 1.5 aggregate with the zfsadm aggrinfo command, using the –long option.

 

$ zfsadm aggrinfo -aggregate OMVSSPN.PET3.ZFS.FS -long

OMVSSPN.PET3.ZFS.FS (R/W COMP): 1960807 K free out of total 1961280 

version 1.5                                                         

auditfid E2E2F0F0 F7F909ED 0000                                     

sysplex-aware                                                       

       245100 free 8k blocks;         7 free 1K fragments         

          112 K log file;            56 K filesystem table        

          280 K bitmap file

 

We used zfsadm fileinfo to display that the directories are v4 directories.

 

$ zfsadm fileinfo -path /pet3/

  path: /pet3/                                                       

  ***  global data  ***                                            

  fid                   1,1          anode                 79,516 

  length                8192         format                BLOCKED

  1K blocks             8            permissions           777    

  uid,gid               0,0          access acl            0,0    

  dir model acl         0,0          file model acl        0,0    

  user audit            F,F,F        auditor audit         N,N,N  

  set sticky,uid,gid    0,0,0        seclabel              none   

  object type           DIR          object linkcount      4      

  object genvalue       0x00000000   dir version           4      

  dir name count        na           dir data version      2838   

  dir tree status       na           dir conversion        na     

  file format bits      na,na,na     file charset id       na     

  file cver             na           charspec major,minor  na     

  direct blocks         0x00000044                                  

  indirect blocks       none                                        

  mtime      Jul 26 14:07:24 2013  atime       Jul 26 14:19:23 2013

  ctime      Jul 26 14:07:24 2013  create time Jul 12 14:34:46 2002

  reftime    none                                                  

 

$ zfsadm fileinfo -path /pet3/origdirAv4/

  path: /pet3/origdirAv4/                                           

  ***  global data  ***                                           

  fid                   2,1435       anode                 79,768

  length                8192         format                BLOCKED

  1K blocks             8            permissions           775   

  uid,gid               0,0          access acl            0,0   

  dir model acl         0,0          file model acl        0,0   

  user audit            F,F,F        auditor audit         N,N,N 

  set sticky,uid,gid    0,0,0        seclabel              none  

  object type           DIR          object linkcount      3     

  object genvalue       0x00000000   dir version           4     

  dir name count        na           dir data version      2     

  dir tree status       na           dir conversion        na    

  file format bits      na,na,na     file charset id       na    

  file cver             na           charspec major,minor  na    

  direct blocks         0x00009A2E                                 

  indirect blocks       none                                       

  mtime      Jul 26 14:22:14 2013  atime       Jul 26 13:19:52 2013

  ctime      Jul 26 14:22:14 2013  create time Jul 26 13:19:52 2013

  reftime    none

 

Convert the root directory of the file system to an extended (v5) directory using the zfsadm convert –path command.

 

$ zfsadm convert -path /pet3

IOEZ00791I Successfully converted directory /pet3 to version 5 format.

 

After the root directory, /pet3, was converted to extended (v5) directory, the directory is now an extended (v5) directory, and the existing v4 directories under it are still at the v4 version.

 

$ zfsadm fileinfo -path /pet3

  path: /pet3                                                         

  ***  global data  ***                                             

  fid                   1,1          anode                 79,516  

  length                8192         format                BLOCKED 

  1K blocks             8            permissions           777     

  uid,gid               0,0          access acl            0,0     

  dir model acl         0,0          file model acl        0,0     

  user audit            F,F,F        auditor audit         N,N,N   

  set sticky,uid,gid    0,0,0        seclabel              none    

  object type           DIR          object linkcount      4       

  object genvalue       0x00000000   dir version           5       

  dir name count        6            dir data version      4       

  dir tree status       VALID        dir conversion        na      

  file format bits      na,na,na     file charset id       na      

  file cver             na           charspec major,minor  na      

  direct blocks         0x00005D80                                   

  indirect blocks       none                                         

  mtime      Jul 26 14:07:24 2013  atime       Jul 26 14:50:48 2013

  ctime      Jul 26 14:07:24 2013  create time Jul 12 14:34:46 2002

  reftime    none

 

$ zfsadm fileinfo -path /pet3/origdirAv4/

  path: /pet3/origdirAv4/                                            

  ***  global data  ***                                            

  fid                   2,1435       anode                 79,768 

  length                8192         format                BLOCKED

  1K blocks             8            permissions           775    

  uid,gid               0,0          access acl            0,0    

  dir model acl         0,0          file model acl        0,0    

  user audit            F,F,F        auditor audit         N,N,N  

  set sticky,uid,gid    0,0,0        seclabel              none   

  object type           DIR          object linkcount      3      

  object genvalue       0x00000000   dir version           4      

  dir name count        na           dir data version      2      

  dir tree status       na           dir conversion        na     

  file format bits      na,na,na     file charset id       na     

  file cver             na           charspec major,minor  na     

  direct blocks         0x00009A2E                                  

  indirect blocks       none                                        

  mtime      Jul 26 14:22:14 2013  atime       Jul 26 13:19:52 2013

  ctime      Jul 26 14:22:14 2013  create time Jul 26 13:19:52 2013

  reftime    none

 

Now lets convert the other v4 directory to an extended (v5) directory.

 

$ zfsadm convert -path /pet3/origdirAv4/

IOEZ00791I Successfully converted directory /pet3/origdirAv4/ to version 5 format.

Author: Alfred Lease