zfsadm convert
Purpose
zfsadm convert 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][-trace file_name]
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 converted 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.
- -trace file_name
- Specifies the name of the file that will have the trace records written into it. The trace file
can be a z/OS UNIX file, an existing MVS sequential data set, or a member of either an existing
partitioned data set (PDS) or partitioned data set extended (PDSE). Use this option only at the
direction of IBM Support.
For information about preallocation instructions for debugging, see Step 5 (Optional) Preallocate data sets for debugging in zFS installation and configuration steps.
Because MVS data set names must be fully qualified, z/OS UNIX has special rules for specifying MVS data set names in the shell environment. For more information, see Specifying MVS data set names in the shell environment in z/OS UNIX System Services Command Reference.
Usage notes
- 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 or later system and the zFS file system must be zFS-owned on a z/OS V2R1 or later system. The aggregate must be mounted read/write.
- Do not use this command before you have migrated all your systems to z/OS V2R1 or later. 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.
- If 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')
.
Privilege required
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 the
root user (UID=0) or 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.
- 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
- 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.
- 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
- 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 0x00000025 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 not encrypted not compressed
- To convert the directory to an extended (v5) directory:
# zfsadm convert -path /service IOEZ00791I Successfully converted directory /service9 to version 5 format.
- 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 0x00000025 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 not encrypted not compressed
Related information
- zfsadm config
- zfsadm fsinfo
- IOEFSPRM