Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.unix.aix Frequently Asked Questions (Part 3 of 5)
Section - 1.701: How do I shrink /usr?

( Part1 - Part2 - Part3 - Part4 - Part5 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Business Photos and Profiles ]


Top Document: comp.unix.aix Frequently Asked Questions (Part 3 of 5)
Previous Document: 1.700: Free LVM lecture slides.
Next Document: 1.702: How do I make a filesystem larger than 2Gb?
See reader questions & answers on this topic! - Help others by sharing your knowledge

FOR AIX 3.1
-----------

 1) Make a backup of /usr

        find /usr -print | backup -ivf /dev/rmt0 (or appropriate device)

 2) shutdown to maintenance mode

        shutdown -Fm
 
 3) export LANG=C
 
 4) remove the filesystem and the logical volume
    ignore an error about the "dspmsg" command not found

        umount /usr
        rmfs /usr

 5) make a new logical volume hd2 and place it on rootvg with desired size

        mklv -yhd2 -a'e' rootvg NNN 

   where NNN is the number of 4 meg partitions

 6) create a filesystem on /dev/hd2

        crfs -vjfs -dhd2 -m'/usr' -Ayes -p'rw'

 7) mount the new /usr filesystem and check it

        /etc/mount /usr
        df -v

 8) restore from the tape; system won't reboot otherwise

        restore -xvf/dev/rmt0

 9) Sync and reboot the system; you now have a smaller /usr filesystem

FOR AIX 3.2
-----------

 0)  Experiences posted to comp.unix.aix lead me to suggest that
     many administrators find the following piece of information 
     useful after completing this procedure.  I thought some of you
     might like to read it BEFORE getting yourself into this
     predicament.  

     Call 1-800-IBM-4FAX and request document 2503 dated 1/26/94.  
     Title is "How to recover if all files are owned by root after
     restoration from a mksysb tape".

 1) Remove any unneeded files from /usr.

 2) Make sure all filesystems in the root volume group are mounted. If
    not, they will not be included in the re-installed system.

 3) Type mkszfile. This will create /.fs.size that contains a list of
    the active filesystems in the root volume group that will be
    included in the installation procedure.

 4) Edit .fs.size. Change the size of /usr to what you want.

    Example: This .fs.size file shows /usr to be 40MB.

	rootvg 4 hd2 /usr 10 40 jfs

    The 10 is the number of physical partitions for the filesystem and
    the 40 is 40 MB. Most systems have a physical partition size of 4 MB.
    Therefore, the second number (40) will always be 4 times the
    previous number (10). Note, however, that a model 320 with a 120 MB
    drive will have a physical partition size of only 2 MB, and the
    total MB is twice the number of physical partitions. The first
    number (4) in the .fs.size file represents the PP size.

    If you want to reduce the size of /usr from 40 MB to 32 MB, edit the
    /usr entry to:

        rootvg 4 hd2 /usr 8 32 jfs

    IMPORTANT: Make sure that you DO NOT enter a value which is less
    than the size of the filesystem required to contain the current
    data. Doing so will cause the re-installation procedure to fail.

 5) chdev -l rmt0 -a block=512 -T

 6) Unmount all filesystems that are NOT in the root volume group.
 
 7) Varyoff all user-defined volume groups, if any

        varyoffvg VGname

 8) Export the user-defined volume groups, if any

        exportvg VGname

 9) With a tape in the tape drive, type

        mksysb /dev/rmt0

     This will do a complete system backup, which will include
     information (in the .fs.size file) for the installation procedure
     on how large the filesystems are to be created.

 10) Follow the instructions in the Installation Kit under "How to
     Install and perform maintenance from Diskettes" (reportedly now 
     called "BOS Installation from a System Backup") using the
     diskettes and tape that you created in the previous steps.

     [ pre AIX 325: DO NOT select the option "Reinstall AIX with
     Current System Settings". Instead use "Install AIX with Current
     System Settings" for the logical volume size changes to take affect. ]

     [ w/ AIX 325: Select "Install from a mksysb image" ]

 11) When the installation is complete, you may then import any
     user-defined volume groups.

         importvg -y VGname PVname

     where "VGname" is the name of the volume group, and "PVname" is
     the name of any one of the physical volumes in the volume group.

 12) Varyon your user-defined volume groups

         varyonvg VGname

 The reduction of the filesystems is now complete.

COMMERCIAL OPTION
-----------------
There are also commercial tools availible to help you do this more
conviently.  I know of one vendor that can be reached at info@compunix.com

User Contributions:

Comment about this article, ask questions, or add new information about this topic:

CAPTCHA




Top Document: comp.unix.aix Frequently Asked Questions (Part 3 of 5)
Previous Document: 1.700: Free LVM lecture slides.
Next Document: 1.702: How do I make a filesystem larger than 2Gb?

Part1 - Part2 - Part3 - Part4 - Part5 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
bofh@mail.teleweb.pt (Jose Pina Coelho)





Last Update March 27 2014 @ 02:11 PM