Q: Does alt_disk_copy convert JFS filesystems to JFS2?
A: Yes! Starting at 6100-04, a new flag was introduced that would convert JFS filesystems to JFS2. We now have the -T which does the conversion.

http://www-01.ibm.com/support/docview.wss?uid=isg3T1011055

Heres an example of converting rootvg file systems from JFS to JFS2 using alt_disk_copy.

My lab system was migrated from AIX 5.3 to 7.1 via nimadm. Unfortunately, nimadm does not convert JFS file systems to JFS2 during the migration. So, in this case, even though Ive migrated to AIX 7.1 (which is a good thing) Im still left with legacy JFS file systems in rootvg.

And because the AIX 5.3 version of the alt_disk_copy command does not have the T option, I cant convert my JFS file systems to JFS2 before I migrate to AIX 7.1. So my best option is to migrate to AIX 7.1 then convert rootvg to JFS2 file systems. A few hops in the process but its good enough.

aixlpar1 : / # lsvg -l rootvg

rootvg:

LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

hd5 boot 1 1 1 closed/syncd N/A

hd6 paging 32 32 1 open/syncd N/A

hd8 jfslog 1 1 1 open/syncd N/A

hd4 jfs 4 4 1 open/syncd /

hd2 jfs 29 29 1 open/syncd /usr

hd9var jfs 20 20 1 open/syncd /var

hd3 jfs 164 164 1 open/syncd /tmp

hd1 jfs 4 4 1 open/syncd /home

hd10opt jfs 4 4 1 open/syncd /opt

local jfs 4 4 1 open/syncd /usr/local

loglv jfs 4 4 1 open/syncd /var/log

hd7 sysdump 9 9 1 open/syncd N/A

hd71 sysdump 9 9 1 open/syncd N/A

hd11admin jfs 2 2 1 open/syncd /admin

aixlpar1 : / # oslevel -s

7100-01-01-1141

I clone rootvg to a spare disk using alt_disk_copy and the T flag (which will convert the file systems to JFS2). The process converts the file systems to JFS2, as shown in the section below (highlighted in green).

aixlpar1 : / # alt_disk_copy -d hdisk1 -T

Source boot disk is: hdisk2

jfs2j2: Current data file /image.data moved to /image.data.acct.save.3735802.

jfs2j2: Creating new data file (/image.data).

jfs2j2: Converting filesystems in data file (/image.data) from jfs to jfs2.

jfs2j2: Converted data file (/image.data) moved to /tmp/image.data.conv.3407932.

jfs2j2: Cleaning up.

jfs2j2: Moving previous data file /image.data.acct.save.3735802 to IDFILE.

jfs2j2: Successfully completed converting image.data to jfs2.

Checking disk sizes.

Creating cloned rootvg volume group and associated logical volumes.

Creating logical volume alt_hd5

Creating logical volume alt_hd6

Creating logical volume alt_hd8

Creating logical volume alt_hd4

Creating logical volume alt_hd2

Creating logical volume alt_hd9var

Creating logical volume alt_hd3

Creating logical volume alt_hd1

Creating logical volume alt_hd10opt

Creating logical volume alt_local

Creating logical volume alt_loglv

Creating logical volume alt_hd7

Creating logical volume alt_hd71

Creating logical volume alt_hd11admin

Creating /alt_inst/ file system.

/alt_inst filesystem not converted.

Small inode extents are already enabled.

Creating /alt_inst/admin file system.

/alt_inst/admin filesystem not converted.

Small inode extents are already enabled.

Creating /alt_inst/home file system.

/alt_inst/home filesystem not converted.

Small inode extents are already enabled.

Creating /alt_inst/opt file system.

/alt_inst/opt filesystem not converted.

Small inode extents are already enabled.

Creating /alt_inst/tmp file system.

/alt_inst/tmp filesystem not converted.

Small inode extents are already enabled.

Creating /alt_inst/usr file system.

/alt_inst/usr filesystem not converted.

Small inode extents are already enabled.

Creating /alt_inst/usr/local file system.

/alt_inst/usr/local filesystem not converted.

Small inode extents are already enabled.

Creating /alt_inst/var file system.

/alt_inst/var filesystem not converted.

Small inode extents are already enabled.

Creating /alt_inst/var/log file system.

/alt_inst/var/log filesystem not converted.

Small inode extents are already enabled.

Generating a list of files

for backup and restore into the alternate file system...

Backing-up the rootvg files and restoring them to the

alternate file system...

Running user specified customization script /tmp/cust.script.conv.3407932...

Modifying ODM on cloned disk.

Building boot image on cloned disk.

forced unmount of /alt_inst/var/log

forced unmount of /alt_inst/var

forced unmount of /alt_inst/var

forced unmount of /alt_inst/usr/local/chksys

forced unmount of /alt_inst/usr/local

forced unmount of /alt_inst/usr

forced unmount of /alt_inst/tmp

forced unmount of /alt_inst/opt

forced unmount of /alt_inst/home

forced unmount of /alt_inst/admin

forced unmount of /alt_inst

Changing logical volume names in volume group descriptor area.

Fixing LV control blocks...

Fixing file system superblocks...

Bootlist is set to the boot disk: hdisk1 blv=hd5

Before I reboot the system on the alternate rootvg I verify that the cloned volume group now contains JFS2 file systems only. I wake up the altinst_rootvg and run the lsvg command to confirm the file system is correct. I then put the altinst_rootvg to sleep, reboot the system and verify all rootvg file systems are mounted as jfs2.

aixlpar1 : / # alt_rootvg_op -W -d hdisk1

Waking up altinst_rootvg volume group ...

aixlpar1 : / # lsvg -l altinst_rootvg

altinst_rootvg:

LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

alt_hd5 boot 1 1 1 closed/syncd N/A

alt_hd6 paging 32 32 1 closed/syncd N/A

alt_hd8 jfs2log 1 1 1 open/syncd N/A

alt_hd4 jfs2 4 4 1 open/syncd /alt_inst

alt_hd2 jfs2 29 29 1 open/syncd /alt_inst/usr

alt_hd9var jfs2 20 20 1 open/syncd /alt_inst/var

alt_hd3 jfs2 164 164 1 open/syncd /alt_inst/tmp

alt_hd1 jfs2 4 4 1 open/syncd /alt_inst/home

alt_hd10opt jfs2 4 4 1 open/syncd /alt_inst/opt

alt_local jfs2 4 4 1 open/syncd /alt_inst/usr/local

alt_loglv jfs2 4 4 1 open/syncd /alt_inst/var/log

alt_hd7 sysdump 9 9 1 closed/syncd N/A

alt_hd71 sysdump 9 9 1 closed/syncd N/A

alt_hd11admin jfs2 2 2 1 open/syncd /alt_inst/admin

aixlpar1 : / # alt_rootvg_op -S altinst_rootvg

Putting volume group altinst_rootvg to sleep ...

forced unmount of /alt_inst/var/log

forced unmount of /alt_inst/var

forced unmount of /alt_inst/usr/local

forced unmount of /alt_inst/usr

forced unmount of /alt_inst/tmp

forced unmount of /alt_inst/opt

forced unmount of /alt_inst/home

forced unmount of /alt_inst/admin

forced unmount of /alt_inst

Fixing LV control blocks...

Fixing file system superblocks...

aixlpar1 : / #

; Reboot on the alternate rootvg hdisk

aixlpar1 : / # uptime

10:18AM up 1 min, 1 user, load average: 0.32, 0.09, 0.03

aixlpar1 : / # lspv

hdisk1 00c342c637f21a59 rootvg active

hdisk2 00c342c6161c6b47 old_rootvg

aixlpar1 : / # df

Filesystem 512-blocks Free %Used Iused %Iused Mounted on

/dev/hd4 524288 411568 22% 3040 7% /

/dev/hd2 3801088 537176 86% 34089 35% /usr

/dev/hd9var 2621440 2413520 8% 3554 2% /var

/dev/hd3 21495808 21476312 1% 110 1% /tmp

/dev/hd1 524288 522456 1% 90 1% /home

/proc - - - - - /proc

/dev/hd10opt 524288 266560 50% 5133 15% /opt

/dev/local 524288 495320 6% 249 1% /usr/local

/dev/loglv 524288 522040 1% 49 1% /var/log

/dev/hd11admin 262144 261384 1% 7 1% /admin

aixlpar1 : / # lsvg -l rootvg

rootvg:

LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

hd5 boot 1 1 1 closed/syncd N/A

hd6 paging 32 32 1 open/syncd N/A

hd8 jfs2log 1 1 1 open/syncd N/A

hd4 jfs2 4 4 1 open/syncd /

hd2 jfs2 29 29 1 open/syncd /usr

hd9var jfs2 20 20 1 open/syncd /var

hd3 jfs2 164 164 1 open/syncd /tmp

hd1 jfs2 4 4 1 open/syncd /home

hd10opt jfs2 4 4 1 open/syncd /opt

local jfs2 4 4 1 open/syncd /usr/local

loglv jfs2 4 4 1 open/syncd /var/log

hd7 sysdump 9 9 1 open/syncd N/A

hd71 sysdump 9 9 1 open/syncd N/A

hd11admin jfs2 2 2 1 open/syncd /admin

===

The message filesystem not converted (below) is not related to the JFS to JFS2 conversion. This messge refers to whether or not the file system needs to be changed to use Variable Inode Extents (VIX). This is the default setting for JFS2 file systems.

Creating /alt_inst/ file system.

/alt_inst filesystem not converted.

Small inode extents are already enabled.

aixlpar1 : / # lsfs -q /

Name Nodename Mount Pt VFS Size Options Auto Accounting

/dev/hd4 -- / jfs2 524288 -- yes no

(lv size: 524288, fs size: 524288, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: yes, EFS: no, ISNAPSHOT: no, MAXEXT: 0, MountGuard: no)

aixlpar1 : / #

Please refer to the following link for more information on VIX in AIX.

Use of Variable Inode Extents (VIX) in AIX

http://www-01.ibm.com/support/docview.wss?uid=isg3T1010368

===

Why would I want to convert rootvg to JFS2 anyway? Well for starters, its generally considered best practice to use JFS2 as it offers several performance & scalability enhancements over JFS. For example, you cannot create files greater than 2GB on JFS, unless the file system was created as large (big) file enabled; jfs file systems in rootvg were never created as large file enabled.

Another reason..eventually JFS will be retired.

Heres an example of a potential problem with JFS in rootvg. You try to create a file of a size greater than 2GB in /tmp (type jfs). Even though the ulimit settings are not restricting the creation of a file of this size, the JFS file system will not allow it. The file creation process fails. The bf attribute for the /tmp file system is set to false. This indicates the file system is not large file enabled.

aixlpar1 : /tmp # df -g .

Filesystem GB blocks Free %Used Iused %Iused Mounted on

/dev/hd3 10.25 6.94 33% 117 1% /tmp

aixlpar1 : /tmp # cat 1gbfile 1gbfile 1gbfile > 3gbfile

cat: 0652-054 Cannot write to output.

Error 0

aixlpar1 : /tmp # ulimit -a

time(seconds) unlimited

file(blocks) unlimited

data(kbytes) unlimited

stack(kbytes) unlimited

memory(kbytes) unlimited

coredump(blocks) 2097151

nofiles(descriptors) unlimited

threads(per process) unlimited

processes(per user) unlimited

aixlpar1 : /tmp # lsfs -q /tmp

Name Nodename Mount Pt VFS Size Options Auto Accounting

/dev/hd3 -- /tmp jfs 21495808 -- yes no

(lv size: 21495808, fs size: 21495808, frag size: 4096, nbpi: 4096, compress: no, bf: false, ag: 8)

OK, so creating files greater than 2GB in rootvg is probably not a big problem for most AIX shops. But why risk it! My advice is to always use JFS2 (even in rootvg).

Keep this in mind when migrating from AIX 5.3 to 6.1 or 7.1 via nimadm.

The following link provides an overview and comparison of both JFS and JFS2 file systems.

http://pic.dhe.ibm.com/infocenter/aix/v7r1/topic/com.ibm.aix.baseadmn/doc/baseadmndita/fs_jfs_jfs2.htm