Wednesday, October 15, 2008

How to convert a rootvg from jfs to jfs2

1. Create an /image.data file
# mkszfile


2. Edit the /image.data file to create JFS2 filesystems


I edited each of the fsdata stanzas converting


fs_data:
FS_NAME= /opt
FS_SIZE= 131072
FS_MIN_SIZE= 12320
FS_LV= /dev/hd10opt
FS_FS= 512
FS_NBPI= 4096
FS_COMPRESS= no
FS_BF= false
FS_AGSIZE= 8


to


fs_data:
FS_NAME= /opt
FS_SIZE= 131072
FS_MIN_SIZE= 12320
FS_LV= /dev/hd10opt
FS_JFS2_BS= 4096
FS_JFS2_SPARSE= yes
FS_JFS2_INLINELOG= no
FS_JFS2_SIZEINLINELOG= 0


I edited each jfs lv, changing "TYPE = jfs" to "TYPE = jfs2".
I also edited the jfslog to be TYPE = jfs2log.


3. Edit /etc/filesystems and for each jfs filesystem in rootvg, change
"jfs" to "jfs2" in the vfs line. Check that each filesystem has
options = rw.


Here's an excerpt from my edited /etc/filesystems file.


/:
dev = /dev/hd4
vfs = jfs2
log = /dev/hd8
mount = automatic
check = false
type = bootfs
vol = root
free = true
account = true
options = rw


/home:
dev = /dev/hd1
vfs = jfs2
log = /dev/hd8
mount = true
check = true
free = false
account = true
options = rw


/usr:
dev = /dev/hd2
vfs = jfs2
log = /dev/hd8
mount = automatic
check = false
type = bootfs
free = false
account = true
options = rw


4. Take the mksysb, but without the -i flag (since that will create a
new /image.data file, overwriting your amended one).


5. Restore the mksysb as normal.

No comments: