Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rootvg jfs to jfs2 conversion

Status
Not open for further replies.

mrn

MIS
Apr 27, 2001
3,993
GB
I'm about to try the following and thought some of you guys may be interested in the results.

Ok a little background: we have a build server running 4.3.3 which I've upgraded to 5.2ML5 & changed the kernel from 32-bit to 64-bit as part of a new project. My problem is the client also wants all filesystems to be jfs2 (Not a problem for none rootvg, I can just backup & restore each filesystem).

I also can't just savevg on the data vg do a fresh install and restvg because they have apps installed in the rootvg.

So here what I'm going to try.

1. create a mksysb of what I've got now.
2. edit /image.data and chage the following

each type changed from jfs to jfs2 under lv_data

change the following stanzas in fs_data

remove
FS_FS=512
FS_NBPI=4096
FS_COMPRESS=no
FS_BF=false
FS_AGSIZE=8

add
FS_JFS2_BS= 4096
FS_JFS2_SPARSE= yes
FS_JFS2_INLINELOG= no
FS_JFS2_SIZEINLINELOG= 0
FS_JFS2_DMAPI= no

edit /etc/filesystems

change vfs= jfs to vfs=jfs2 and make sure

make a new mksysb (without the -i option)

mksysb /dev/rmt0

then try restoring.

Wish me luck & if anyone has any experience / ideas you input is most welcome.



Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
if you do so, be sure to create your jfs2log as well !

good luck !

rgds,

R.
 
R.

Thanks didn't think of that......

I'll have to have a think about this, Could I reuse /dev/hd8 (my current) or create a new log before the mksysb using

mklv -y jfs2log -t jfs2log rootvg 2

and remove the original.

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Decided not to reuse hd8, created a new jfs2log and changed the log in /etc/filesystems to point to the new one.

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
You have to add the following action to the above procedure.

add to below item at the /bosinst.data

ENABLE_64BIT_KERNEL = yes
CREATE_JFS2_FS = yes
 
Well my first attempt failed...

Thanks samjoo I'll give it a go.

Is it ENABLE_64BIT_KERNEL or INSTALL_64BIT_KERNEL ?



Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Thanks,

It looks to have a few flaws;

The guy is reusing the jfslog, I read you can't have jfs & jfs2 logs in the same area. He must also have already been running a 64 bit kernel & I don't know how he got round the point mentioned by samjoo regarding CREATE_JFS2_FS in bosinst.data. About to retry.

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
well on an install of your "pimped" mksysb, the install script would recreate hd8 on the first (jfs2) filesystem creation, and format it as a jfs2log I would assume?

Then of course your /etc/filesystems which gets restored in the install process, would need to refer to the jfs2 LVs and the jfs2 log. Hence the need to adapt both the /image.data and /etc/filesystems.

As for 32bit and 64bit kernel, both should be valid for jfs2 filesystems, though jfs2 is better tuned to 64bit kernel. But you can go from 32bit to 64bit kernel later on when you have your jfs2 rootvg system running I would say?



HTH,

p5wizard
 
Makes sense. For some reason I'd got it into my head that my other vg on the system would use the same log on the rootvg which of course it doesn't.

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Ok the system is backup and is reporting all rootvg filesystems as being jfs2 using lsfs and lsvg -o|lsvg -i -l

I'll document the procedure and create a faq.

Thanks for all the comments / help

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
The filesystems may be reporting jfs2, but are you certain they are jfs2? Checking the data structure is the only way you will know for certain.
 
I did wonder how I'd prove this as just altering the /etc/filesystems make the system report the filesystems are jfs2.

The output of lsvg -o | lsvg -i -l shows that the jfslog is closed/syncd and the jfs2log is open/syncd.

The file & directory structure look fine . Anyone aware of any other method to check if the jfs2 filesystems are actually jfs2?

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
I guess you could try to create a file larger than 64GB which is the max for jfs and/or create a filesystem larger than 16TB (although you probably don't have the space - who would?) since that is the max filesystem size for jfs. You could also try to create inodes that are beyond what the defaults would be for jfs, since jfs indoes are fixed and jfs2 inodes are dynamically limited by disk space.
 
I'd be lucking to create a 64MB file......

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Well,

If mount reports the FS as jfs2, you can be dang sure it is a jfs2 FS, because IMHO mount uses a different VFS control structure for jfs and jfs2...

Also, if you can, unmount one of the jfs2 filesystems and do an fsck - that would also give you an id. If it talks about a primary superblock it's jfs2 if it talks about phase 0 - check log it's jfs. Unmount isn't even necessary.

Code:
# crfs -v jfs2 -g rootvg -m /tmp/jfs2fs -asize=1000
File system created successfully.
65328 kilobytes total disk space.

# fsck /tmp/jfs2fs

The current volume is: /dev/fslv00
Primary superblock is valid.
*** Phase 1 - Initial inode scan
*** Phase 2 - Process remaining directories
*** Phase 3 - Process remaining files
*** Phase 4 - Check and repair inode allocation map
*** Phase 5 - Check and repair block allocation map
File system is clean.

# crfs -v jfs -g rootvg -m /tmp/jfsfs -asize=1000  
Based on the parameters chosen, the new /tmp/jfsfs JFS file system
is limited to a maximum size of 134217728 (512 byte blocks)

New File System size is 131072

# fsck /tmp/jfsfs                                

** Checking /dev/rlv02 (/tmp/j) 
** Phase 0 - Check Log
log redo processing for /dev/rlv02                       
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Inode Map
** Phase 6 - Check Block Map
8 files 4200 blocks 126872 free

# mount /tmp/jfs2fs

# fsck /tmp/jfs2fs                               

The current volume is: /dev/fslv00
File system is currently mounted.
Primary superblock is valid.
fsck: Performing read-only processing does not produce dependable results.
*** Phase 1 - Initial inode scan
*** Phase 2 - Process remaining directories
*** Phase 3 - Process remaining files
*** Phase 4 - Check inode allocation map
*** Phase 5 - Check block allocation map
File system is currently mounted.
fsck: Performing read-only processing does not produce dependable results.

HTH,

p5wizard
 
Thanks p5 helpful as ever. I however get a slightly different result (AIX 5.2 ML5)

fsck /jfsfs

** Checking /dev/jfsfs (/jfsfs)
** Phase 1 - Check......
.........
.........
8 files ......

fsck /jfs2fs

************
The current volume is : /dev/......
File system is currently mounted
fsck: Performing read-only processing does..........
** Phase 1 - ........
.....
.....
.....

unmounted

***********
The current volume is: /dev/......
Log device is currently used by mounted devices
J2_LOGREDO:Error occured when open/read device
logredo failed (rc=-1. fsck continuing.
** Phase 1 - .........
.........
.........
File system is clean




Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
I guess I need to format the jfs2log with logform

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Well, I tested on 5.3

in any case, you identified /jfs2fs as a JFS2 right?

J2_LOGREDO:Error occurred...

J2 -> JFS2



This is on a 5200-05 box:

# crfs -v jfs2 -g rootvg -m /tmp/jfs2fs -asize=1000
File system created successfully.
32560 kilobytes total disk space.
New File System size is 65536

# crfs -v jfs -g rootvg -m /tmp/jfsfs -asize=1000
Based on the parameters chosen, the new /tmp/jfsfs JFS file system
is limited to a maximum size of 134217728 (512 byte blocks)

New File System size is 65536

# fsck /tmp/jfsfs



** Checking /dev/rlv01 (/tmp/j)
** Phase 0 - Check Log
log redo processing for /dev/rlv01
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Inode Map
** Phase 6 - Check Block Map
8 files 2136 blocks 63400 free

# fsck /tmp/jfs2fs



****************
The current volume is: /dev/fslv01
**Phase 1 - Check Blocks, Files/Directories, and Directory Entries
**Phase 2 - Count links
**Phase 3 - Duplicate Block Rescan and Directory Connectedness
**Phase 4 - Report Problems
**Phase 5 - Check Connectivity
**Phase 7 - Verify File/Directory Allocation Maps
**Phase 8 - Verify Disk Allocation Maps
32768 kilobytes total disk space.
1 kilobytes in 2 directories.
0 kilobytes in 0 user files.
32432 kilobytes are available for use.
File system is clean.

# mount /tmp/jfs2fs

# mount /tmp/jfsfs

# fsck /tmp/jfsfs



** Checking /dev/lv01 (/tmp/j) MOUNTED FILE SYSTEM; WRITING SUPPRESSED;
Checking a mounted filesystem does not produce dependable results.
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Inode Map
** Phase 6 - Check Block Map
8 files 2136 blocks 63400 free
# fsck /tmp/jfs2fs



****************
The current volume is: /dev/fslv01
File system is currently mounted.
fsck: Performing read-only processing does not produce dependable results.
**Phase 1 - Check Blocks, Files/Directories, and Directory Entries
**Phase 2 - Count links
**Phase 3 - Duplicate Block Rescan and Directory Connectedness
**Phase 4 - Report Problems
**Phase 7 - Verify File/Directory Allocation Maps
**Phase 8 - Verify Disk Allocation Maps
32768 kilobytes total disk space.
1 kilobytes in 2 directories.
0 kilobytes in 0 user files.
32432 kilobytes are available for use.
fsck: Performing read-only processing does not produce dependable results.


HTH,

p5wizard
 
I release now I forgot to format the jfs2log. I'll try and create a new log / format it and crfs the filesystems to use that, then delete the original. If that doesn't work I start again....

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top