Convert rootvg file systems to JFS2 using alt_disk_copyQ: Does
alt_disk_copy convert JFS filesystems to JFS2? http
Here’s 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 I’ve migrated to AIX 7.1 (which is a good thing) I’m 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 can’t 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 it’s 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 /ima 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
jfs2j2: Cleaning up. jfs2j2: Moving previous data file
/ima 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 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 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 00c3 hdisk2 00c3
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 /pro /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 -- / (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 ===
Why would I want to convert rootvg to JFS2 anyway? Well for starters, it’s 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.
Here’s 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 file data stac memory(kbytes) unlimited core nofi threads(per process) unlimited processes(per user) unlimited
aixlpar1 : /tmp # lsfs -q /tmp Name Nodename Mount Pt VFS Size Options Auto Accounting /dev/hd3 -- /tm (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.
|
Hi Mr Gibson, thanks for these notes. One thing I want to ask if there is a way to force the block size to change when the alt_disk_copy -T command recreates the filesystems. I ran the command and found three filesystems which kept its block size as 512 instead of converting to 4096. I had to manually recreate these filesystems so I could restore the mksysb onto a Power8 server.
Yes, use a custom image.data file and specify with -i. Similar to what I did here, http://www.ibmsystemsmag.com/aix/tipstechniques/Migration/nimadm_mksysb/, with nimadm.
Hi Chris,
I
have servers with JFS file systems with 6.1.9.4, Can i convert JFS to
JFS2 and also perform upgrade at the same time. I mean can i include -T
in the same command which i use for SP upgrade.
Or
Can i upgrade
current rootvg then take altinst_rootvg by converting JFS to JFS2 then
boot from altinst_rootvg. Will this have any issue.
I'm basically trying to avoid taking down time twice or two boot process.
Thanks in Advance.
Hi Mike, You are correct. AIX 5.3 doesn't have the tools to convert to JFS2. The approach you mention is exactly what this chap did: http://aixblogs.blogspot.com.au/2009/03/jfs-to-jfs2-conversion-for-rootvg.html Seemed to work for him. However, I'm not endorsing it. As far as I know that method is not supported by IBM. I recommend the steps I included in this recent article: http://www.ibm.com/developerworks/aix/library/au-aix-nimadm/index.html Under this section "Considerations when migrating to AIX 7.1 (or 6.1)" - Do you have JFS file systems in rootvg?. It's a longer process but one that employs known & supported methods. Cheers. Chris
Hi Chris, As you state that the -T switch for the alt_disk_copy was only introduced in AIX 6100-04, would I be correct that this method cannot be used to convert an AIX 5.3 jfs rootvg filesystem to an AIX 5.3 jfs2 filesystem? Presumably my best option to convert an AIX 5.3 rootvg will be to modify the files bosinst.data, image.data and /etc/filesystems manually to reflect JFS2 filesystems with the modified and additional JFS2 stanza's and then perform a mksysb with the -i option (to suppress the mkszfile) which could then be restored and SHOULD create the required JFS2 version of the rootvg? Thanks in anticipation Mike
Hi, are sure it's still running. Do you see disk I/O activity on the system and/or processes associated with alt_disk_copy still running? Just out curiosity, what are your disk queue depths set to? Can you please send me a screen shot from topas/nmon while the process is running. Anything in the AIX error report. Can you send me an email with the output from the command please? You can reach me at cg@gibsonnet.net. Cheers. Chris
Dear Chris, Sorry for the delay.... That day i have cancelled the task...I am doing the same today....Its still running more than a hour. Please find the below output. # alt_disk_copy -d "hdisk2 hdisk3" -T ; date Source boot disk is: hdisk0 jfs2j2: Current data file /image.data moved to /image.data.jfs2j2.save.7471610. 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.8716468. jfs2j2: Cleaning up. jfs2j2: Moving previous data file /image.data.jfs2j2.save.7471610 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_locallv Creating logical volume alt_hd7 Creating logical volume alt_hd10opt Creating logical volume alt_lv00 Creating logical volume alt_hd11admin Creating logical volume alt_livedump 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/local file system. /alt_inst/local 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/var file system. /alt_inst/var filesystem not converted. Small inode extents are already enabled. Creating /alt_inst/var/adm/ras/livedump file system. /alt_inst/var/adm/ras/livedump filesystem not converted. Small inode extents are already enabled. Generating a list of files for backup and restore into the alternate file system...
Hi Gobinath, 3 hours! Something is wrong. It should not take that long. A few minutes at most (based on my experience). Can you send me an email with the output from the command please? You can reach me at cg@gibsonnet.net. Cheers. Chris
Dear chris_gibson, The notes is very useful. But One doubt. How long it will take for jfs to jfs2 conversion? I tested in one of my test machine. Its running more than 3 hrs. Please let me know. FYI: I have migrated from 5.3 TL11 to 6.1 TL07 using media. then trying to convert jfs to jfs2. which is running more than 3 hrs. Thanks in Advance.