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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JFS to JFS2 Conversion 3

Status
Not open for further replies.

mastikool

MIS
Aug 10, 2006
14
0
0
US
Hi Folks,

I need to convert non-rootvg vg filesystem from JFS to JFS2. Can you please tell me the detail instructions how to do it.

Thanks,

Ali
 
The simplest breakdown is to backup your data, blow the filesystems away, recreate them as JFS2 and then restore your data. There is no way (that I know of) to dynamically change this.

You could also use sysback which allows you to backup your entire system (root and non-root vg's) and during the restore, it will have several options, one being if you want to convert JFS to JFS2 during the restore. I have tried this method and seemed to work just fine... however, you are still left with backing up and restoring your data to make the change.

Regards,
Chuck
 
If your system is mirrored - I would recommend breaking the mirror - creating the jfs2 - then copying the data to the new jfs2 file system - blowing away the old jfs and then remirroring. Backing up to tape can be a source of failure for a number of reasons. I always want to work from the disks if possible.
 
Another option that you can do is to tar up all the data into another filesystem from the filesystem that you are going to convert. Then remove the filesystem and recreate it as JFS2 then untar your data back into the new JFS2 filesystem.

Jason
 
Is there way you can post the step by step instructions? I am new to this.

Thanks,
Ali
 
If you are short in space for example then the best way is first to backup your data to tape, remove the jfs, recreate your filesystem with jfs2 and finally restore your data back to the new jfs2 filesystem. Here is how it should be done through commands:

Code:
cd /oldjfs
find . -print | backup -iqf /dev/rmt0

Code:
cd /
umount /oldjfs
rmfs -r '' /oldjfs
[code]

[code]
mklv -y'newjfs2' -t'jfs2' youdatavg 20  # the 20 in here indicates the number of partitions you want to allocate to your logical volume which is adjustable to your needs

crfs -v jfs2 -d'newjfs2' -m'/newjfs2' -A''`locale yesstr | awk -F: '{print $1}'`'' -p'rw' -a agblksize='4096'

#note that i've taken the previous command from smitty!

Code:
mount /newjfs2
cd /newjfs2
restore -xqvpf /dev/rmt0

There you go. Good luck Ali.

Regards,
Khalid
 
A long winded but working method.

To convert JFS rootvg to JFS2:

Firstly create a mksysb & savevg.

1 Create a mksysb of the existing rootvg using the following
command:

mksysb -i /dev/rmtØ

2 Create a savevg for each non-rootvg volume group. An
lsvg will list the current volume groups.

/usr/bin/savevg -f /dev/rmtØ -i appvg

Repeat for each vg.

3 Copy the current bosinst.data file:

cp /bosinst.data /bosinst.data.orig

Note: if the bosinst.data file does not exist in the root
directory, it can be copied from /var/adm/ras/bosinst.data
to the / filesystem.

4 Edit the bosinst.data file:

vi /bosinst.data
Add the following two lines to the bottom of the control_flow

stanza:
ENABLE_64BIT_KERNEL = yes
CREATE_JFS2_FS = yes

Save the edit with wq!

5 Create a new jfs2log file using the following command:

mklv -y jfs2log -t jfs2log rootvg 2

6 Format the new jfs2log with the following command:

logform -v jfs2log jfs2log

7 Copy the image.data file using the following command:

cp /image.data /image.data.orig

8 Edit the image.data file:

vi /image.data
Change all occurrences of jfs to jfs2 under the lv_data stanza(s) for each filesystem.
Remove the following lines under the fs_data stanza(s) for
each filesystem:

FS_FS=512
FS-NBPI=4Ø96
FS_COMPRESS=no
FS_BF=false
FS_AGSIZE=8

Insert the following lines in place of the above lines (ie below the FS_LV= line) for each filesystem stanza:

FS_JFS2_BS= 4Ø96
FS_JFS2_SPARSE= yes
FS_JFS2_INLINELOG= no
FS_JFS2_SIZEINLINELOG= Ø

Save the edit with wq!

Note: it will be useful for the next step to write down all the filesystems found while editing image.data.

9 Copy the /etc/filesystems file:

cp /etc/filesystems /etc/filesystems.orig

10 Edit the /etc/filesystems:

vi /etc/filesystems
Change jfs to jfs2 for each filesystem in image.data.

Change:
log = /dev/.... (Usually hd8)
to:
log = /dev/jfs2log

for each filesystem in image.data.

Save the edit with wq!

11 Create a second mksysb with the following command:
mksysb /dev/rmtØ

Note: there is no -i option this time because that would
overwrite the changes made in image.data.

12 Once mksysb has finished, insert the AIX CD and mksysb
media into the server, then type the following command:

Shutdown -Fr

(Make sure no applications are running before running the
above.)

13 When the server console displays the keyboard icon or
the word keyboard followed by a beep, press either F5 on
a graphical console or 5 on an ASCII console. After a short
delay you will be prompted to select a language. For
English press F1.

Next select a console and press 1.

The Installation and Maintenance Menu is displayed.
Select option 3 – Start Maintenance Mode for System
Recovery.

From the Maintenance Menu select option 4 – Install from
a System Backup.

Choose a tape drive.

You will return to the Installation and Maintenance Menu.
Now select (2):

1) Start Installation Now with Default Settings
2) Change/Show Installation Settings and Install
3) Start Maintenance Mode for System Recovery

From the System Backup Installation and Settings, select 1 if you need to change installation disks (see next section) or select 0 if the selections are OK:

Setting: Current Choice(s):
1. Disk(s) where you want to install......... hdiskØ
Use Maps.................................. No
2. Shrink File Systems....................... No
Ø. Install with the settings listed above.

Change Disk(s) Where You Want to Install (give # of disks).

Then select (Ø).

Type one or more numbers for the disks to be used for the
installation and press Enter. The current choice is indicated
by >>>. To deselect a choice, type the corresponding
number and press Enter. At least one bootable disk must
be selected. Choose the location by its SCSI ID:

Name Location Code Size (MB) VG Status Bootable
1. hdiskØ ØØ-Ø1-ØØ-Ø,Ø 3Ø5 rootvg yes
2. hdisk1 ØØ-Ø1-ØØ-1,Ø 4ØØ rootvg yes
Ø. Continue with the choices indicated above

To shrink the filesystems or to reclaim free space allocated
to the filesystems, select option 2 so the setting is set to
Yes. For the filesystems to be restored with the same
allocated space as the original system, make sure option

2 is set to No:

System Backup Installation and Settings, select (Ø to continue)
Setting: Current Choice(s):
1. Disk(s) where you want to install......... hdiskØ
2. Use Maps.................................. No
3. Shrink File Systems....................... No
Ø. Install with the settings listed above.

The following message will appear:

WARNING: All data on the selected disks will be destroyed. Do
you wish to continue? "Y/N"

Select Y.

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
@mrn:

I'l like to try out your way on our systems because we have the same problem, but I'm not sure about one step.

You're saying, that a new jfs2log is to be created.
After that one shall change all jfs occurences in the image.data to jfs2 ...

What about the jfslog entry in the image.data ?
Do we have to change this to jfs2log as well or do we leave it like it is because we already created a jfs2log during an earlier step ?

Regards
Thomas
 
Just leave as is...

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top