zfsadm convert

Purpose

Converts a v4 directory that is contained in a read/write mounted version 1.5 aggregate to an extended (v5) directory. The aggregate is changed from a version 1.4 aggregate to a version 1.5 aggregate, if necessary. It can also be used to change a version 1.4 aggregate to a version 1.5 aggregate without converting any directories.

Format

zfsadm convert {-path name | -aggrversion name} [-level] [-help]

Options

-aggrversion name
Specifies the aggregate name that should be changed from a version 1.4 aggregate to a version 1.5 aggregate. No directories are converted. The aggregate name is not case-sensitive. It is translated to uppercase.
-help
Prints the online help for this command. All other valid options that are specified with this option are ignored.
-level
Prints the level of the zfsadm command. This option is useful when you are diagnosing a problem. Except for -help, all other valid options that are specified with -level are ignored.
-path name
Specifies the path name of a directory that should be converted to an extended (v5) directory. The aggregate is changed to a version 1.5 aggregate first, if necessary.

Usage

The zfsadm convert command can be used to explicitly convert a v4 directory to an extended (v5) directory that is contained in a read/write mounted version 1.5 aggregate. In this case, the -path option is used. If the containing aggregate is a version 1.4 aggregate, the command attempts to change the aggregate to a version 1.5 aggregate before converting the directory.

It can also be used to explicitly change a version 1.4 aggregate to a version 1.5 aggregate without converting any directories. In this case, the -aggrversion option is used.

The zfsadm convert command might cause the file system to grow if it needs more space for the extended (v5) directory.

The command must be issued from a z/OS® V2R1 Start of changeor laterEnd of change system and the zFS file system must be zFS-owned on a z/OS V2R1 Start of changeor laterEnd of change system. The aggregate must be mounted read/write.

Do not use this command before you have migrated all your systems to z/OS V2R1 Start of changeor laterEnd of change. If there are systems that are prior to z/OS V2R1 active in the shared file system environment, no conversion of a directory nor change of aggregate version takes place.

Start of changeIf you use a job to invoke zfsadm convert, to specify the -path option, you must specify a leading slash in the PARM string if the path argument contains a slash. Otherwise, Language Environment will treat the characters before the slash as Language Environment parameters. That is, you must use PARM=('/convert -path /home/myname/mydir').End of change

Privilege required

Start of changeIf you are using an IOEFSPRM file in your startup proc,End of change the issuer must have READ authority to the data set that contains the IOEFSPRM file. If you are using parmlib (IOEPRMxx), the issuer does not need special authorization.

The issuer must be the owner of the directory and must have write permission (w) to the directory. If the aggregate version is to be changed, the issuer must be logged in as root or must have READ authority to the SUPERUSER.FILESYS.PFSCTL resource in the z/OS UNIXPRIV class.

Examples

The following example contains the steps to convert an existing version 1.4 aggregate to a version 1.5 aggregate, and to convert a v4 directory to an extended (v5) directory.

  1. To display the version of the aggregate:
    # zfsadm aggrinfo PLEX.JMS.AGGR009.LDS0009 -long
    PLEX.JMS.AGGR009.LDS0009 (R/W COMP): 1271 K free out of total 1440
    version 1.4
    auditfid C3C6C3F0 F0F200A2 0000
    
               158 free 8k blocks;          7 free 1K fragments
               112 K log file;             16 K filesystem table
                 8 K bitmap file
  2. To change the version to 1.5:
    # zfsadm convert -aggrversion PLEX.JMS.AGGR009.LDS0009
    IOEZ00810I Successfully changed aggregate PLEX.JMS.AGGR009.LDS0009 to version 1.5.
  3. To verify the aggregate version change:
    # zfsadm aggrinfo PLEX.JMS.AGGR009.LDS0009 -long
    PLEX.JMS.AGGR009.LDS0009 (R/W COMP): 1271 K free out of total 1440
    version 1.5
    auditfid C3C6C3F0 F0F200A2 0000
    
               158 free 8k blocks;          7 free 1K fragments
               112 K log file;             16 K filesystem table
                 8 K bitmap file
  4. To display the version of a directory:
    # zfsadm fileinfo /service9                                                                                                       
       path: /service9
       ***   global data   ***
       fid                    1,1           anode                  69,516          
       length                 8192          format                 BLOCKED         
       1K blocks              8             permissions            755
       uid,gid                0,10          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         3             dir data version       1               
       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          25           
       indirect blocks        none         
       mtime       Jun 13 15:27:10 2012   atime        Jun 13 10:41:43 2012
       ctime       Jun 13 15:27:10 2012   create time  Jun 13 10:41:43 2012
       reftime     none 
  5. To convert the directory to an extended (v5) directory:
    # zfsadm convert -path /service
    IOEZ00791I Successfully converted directory /service9 to version 5 format.
  6. To display the version of the directory again:
    # zfsadm fileinfo /service9                                                                                                       
       path: /service9
       ***   global data   ***
       fid                    1,1           anode                  69,516          
       length                 8192          format                 BLOCKED         
       1K blocks              8             permissions            755
       uid,gid                0,10          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            5               
       dir name count         3             dir data version       1               
       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          25           
       indirect blocks        none         
       mtime       Jun 13 15:27:10 2012   atime        Jun 13 10:41:43 2012
       ctime       Jun 13 15:27:10 2012   create time  Jun 13 10:41:43 2012
       reftime     none 

Related information

Commands:
  • zfsadm config
  • Start of changezfsadm fsinfoEnd of change
Files:
  • IOEFSPRM