AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  JFS to JFS2 filesystem conversion

    Posted Thu May 24, 2007 12:04 PM

    Originally posted by: SystemAdmin


    I need to convert some non rootvg filesystems from JFS to JFS2.

    The current plan involves assigning a new and temporary LUN to the server and then,
    Creating a VG, LV and filesystem on that LUN.
    Stopping all activity on the server.
    Backing up/copying the filesystems from the source to the temp LUN
    Deleting everything in the source VGs, keeping the VGs as is.
    Restoring everything from the backup.

    What would be the most efficient method of backing up this data, backup or something else?

    AIX 5.3 ML02

    Thanks in advance
    #AIX-Forum


  • 2.  Re: JFS to JFS2 filesystem conversion

    Posted Thu May 24, 2007 01:06 PM

    Originally posted by: orphy


    Since you don't have space problem, why do you need to actually do
    a backup/restore? You could if you really want to be careful and for
    that, try the backup command or tar though you might want the GNU tar.

    Here's one way to do it but you definitely should try it out first
    before doing the actual move.

    1. rename the changing jfs
    umount /orphy
    chlv -n tmporphylv orphylv
    chfs -m /tmporphy /orphy
    mount /tmporphy
    1. recreate in jfs2 and move from jfs to jfs2
    mklv -t jfs2 -y orphylv...
    crfs -v jfs2 -m /orphy -d orphylv...
    mount /orphy
    mv /tmporphy/* /orphy/ # or maybe use "cp -Rph" instead

    Test things out here to make sure things still work!

    1. clean up when things work
    umount /tmporphy
    rmfs /tmporphy
    rmdir /tmporphy
    reducevg/rmdev/etc/etc/etc
    Orphy
    #AIX-Forum


  • 3.  Re: JFS to JFS2 filesystem conversion

    Posted Thu May 24, 2007 07:47 PM

    Originally posted by: SystemAdmin


    When moving data around disks, I like to add a new disk, vg and filesystem, then rsync the data, then unmount the source and mount the copy...

    current data
    /data (vg1)- (jfs)

    create a new vg/lv/fs
    /new/data (vg01) -(jfs2)

    rsync the /data -> /new/data

    unmount /data
    unmount /new/data

    chfs -m /old/data /data
    chfs -m /data /new/data

    mount /data
    mount /old/data

    you should now have the data on the new fs with the /old/data as a reference/backup. This means that if anything is missing or incorrect (permissions/ownership) you can check the original data.

    After it's been confirmed to be ok, you can unmount the old fs and reclaim the disk.

    I have done this on several data moves with no problems.

    Cheers...Steve
    #AIX-Forum


  • 4.  What I would do.

    Posted Sat May 26, 2007 06:21 PM

    Originally posted by: nagger


    Add the new LUN, VG and JFS2 filesystem
    Mount the filesystem on /new and assuming the currently is called /old below
    Then cd /old
    tar cf - . | (cd /new; tar xf - )
    The umount both
    Change /etc/filesystems so the /new now mounts at /old
    Mount /old (actually the new one)
    Remove the old filesystem
    There seems to be no point in moving the data back to the original disk/LUN !!

    Of course you should have a backup too - for safety and just as a good practice.
    I
    Hope this helps, N
    #AIX-Forum


  • 5.  Re: What I would do.

    Posted Mon May 28, 2007 07:25 AM

    Originally posted by: SystemAdmin


    These steps are nice, only if you have a small system.
    What would happen if you have a system with over 5TB of JFS data, that needs to be converted to JFS2? Would the best way still be to get temporary disks? I don't think thats feasable.


    #AIX-Forum


  • 6.  Re: What I would do.

    Posted Tue May 29, 2007 11:28 AM

    Originally posted by: orphy


    Actually, to me, the "best way" really depends on the site and the resources
    available to get the job done. For some, it might be just to back things
    up to tape(s) and restore. Most people do back up their files to some kind
    of tape storage anyway. And if they do full backups weekly, for example,
    it might not be too bad to make this the "best way". The even gives a chance
    to test out the restore! Now, for another, it could be grabbing some new LUNs
    and moving things over. And for others, it might not even be a big deal just
    to leave everything at JFS. What's the reason to convert anyway? Did we hit
    a JFS limit? Is there something in JFS2 that we must have? Is this necessary
    because of corporate policy?

    I would say the site owner has to consider the pros/cons of each method before
    figuring out which way to go. I do agree that moving 5TB, for example, is not
    something you want to just "go for it" without really considering all the
    options. It sure would be nice to be able to run jfstojfs2 and it's all done
    for you but the last time I checked, IBM didn't have that available or at least
    I wasn't able to find it.
    Orphy
    #AIX-Forum


  • 7.  Re: What I would do.

    Posted Wed June 13, 2007 06:53 AM

    Originally posted by: SystemAdmin


    Thanks everyone - I'll be going with the extra lun method and making a note of timings. If I encounter anything useful I'll post.

    Thanks for taking the time to answer.
    #AIX-Forum


  • 8.  What I did.

    Posted Thu June 28, 2007 06:12 AM
      |   view attached

    Originally posted by: esv



    I made a copy of /etc/filesystems.

    modified /etc/filesystems to indicate rootvg's filesystems were actually jfs2 filesystems.

    created a /image.data file and modified the LV and JFS stanzas to indicate that they were JFS2 type and the JFSLOG related to the old JFS filesystems modified it to be a JFS2LOG LV.

    created a mksysb and restored the mksysb on an alternate disk/system, both using NIM alt_disk_install and standalone mksysb restore.

    So far, I've had success on more than 10 systems and have not had an issue ever, don't call IBM or me if you have problems, the method is not supported.

    The attached file contains how /usr would look like in /image.data file before and after.

    good luck.
    Enrique.
    #AIX-Forum

    Attachment(s)



  • 9.  Re: JFS to JFS2 filesystem conversion

    Posted Thu March 31, 2011 09:46 PM

    Originally posted by: iampattoiam


    I like the rsync method as you have both copies online at the same time so you can do any checks required. You can run it as 2 rsyncs. The initial rsync can be done online so no interruption. Then do a final rsync with the Application down to get any updates.
    If you have disk space limitiations you could do 1 filesystem at a time.
    If you want to move Oracle filesystems create your new jfs2 filesystem, then Oracle can move its tables/files online. When Oracle has moved all/most the Oracle files you can shrink the old filesystem (5.3 onwards) to make more room for the next jfs2 filesystem. Do this when I/O is low to prevent contention and impacting performance.

    Cheers...Anthony
    #AIX-Forum