Reducing filesystem size

Reducing filesystem size

Post by Maddo » Fri, 21 Aug 1992 05:36:58



How, exactly, do you reducing the size of /usr?  The normal method of
shrinking a filesystem is to copy it to tape, remove it, re-create it at
the new size and move the files back.  But /usr has libc.a and if you
remove that, the machine staggers around a little and then dies.  Anybody
have any ideas?  (THAT'S the last time I do a full installation of Info
Explorer...)
--
 ------------------------------------------------------------------------------
 Greg "Maddog" Knauss                      My boss doesn't know I'm doing this,

 ------------------------------------------------------------------------------
 
 
 

Reducing filesystem size

Post by L. Scott Emmo » Sat, 22 Aug 1992 08:24:32



Quote:>How, exactly, do you reducing the size of /usr?  The normal method of
>shrinking a filesystem is to copy it to tape, remove it, recreate it at
>the new size and move the files back.  But /usr has libc.a and if you
>remove that, the machine staggers around a little and then dies.  Anybody
>have any ideas?  (THAT'S the last time I do a full installation of Info
>Explorer...)

We have done this on our machines. What we do is create an "mksysb"
tape with an altered ".fs.size" file, and then boot off the tape and
restore the system.

The procedure for doing this: (as root)

o run 'mkszfile' to generate the .fs.size file.

o (generally a good idea to do an 'mksysb' here just in case an error
   occurs and the system is unrecoverable from the altered tape.)

o edit "/.fs.size". The format of this file is:

  volume_group megs_per_part dev_name mnt_point num_parts lv_megs fs_type

 for example, on one of our systems:

  rootvg 4 hd2 /usr / 40 160 jfs

 The fields you are interested in are the num_parts and lv_megs
 fields. Change these to the appropriate values:

        lv_megs   is the logical volume size in Megabytes

        num_parts is the number of partitions for the LV. Just use
                  lv_megs / megs_per_part to get this value.

o run 'mksysb' to back the system up to tape.

o Now, follow the instructions in the installation guide for restoring
  from a "mksysb" backup. If you have logical volumes outside the
  'rootvg' volume group, you will have to import them back into the
  system. This can be done from "smit lvm"...

It's neither an easy nor a pleasant task, but it's the only way I know
of to free up that valuable disk space...

                           L. Scott Emmons
                     csusac.csus.edu!cdsac!scotte

 
 
 

Reducing filesystem size

Post by Tim Bro » Sun, 23 Aug 1992 04:53:27




>>How, exactly, do you reducing the size of /usr?  The normal method of
>>shrinking a filesystem is to copy it to tape, remove it, recreate it at
>>the new size and move the files back.  But /usr has libc.a and if you
>>remove that, the machine staggers around a little and then dies.  Anybody
>>have any ideas?  (THAT'S the last time I do a full installation of Info
>>Explorer...)
>We have done this on our machines. What we do is create an "mksysb"
>tape with an altered ".fs.size" file, and then boot off the tape and
>restore the system.

[stuff deleted]
If you have some extra disk...
Here is how I do it:
1. make a new filesystem called /temp
2. copy everything from /usr into it.
(cd /usr;tar cf - . )|(cd /temp;tar xf -) will do it, there
are other ways as well.
3. edit /etc/filesystems, switching the mount points for the lv's
pointing to /usr and /temp
4. reboot. This is needed to free /usr up to be deleted and resized.

You could be done at this point but I go one furhter...
5. remove the old /usr (now /temp).
6. make one the right size with the same lv name (hd1*) in the rootvg
7. copy /usr to /temp (the new one).
8. edit /etc/filesystems and switch the lv's back to normal.
9. reboot.
10. Get rid of /temp.

Done

--
Tim Brown
The SABUS Group
2091 Cliffside Dr.              Anchorage, Alaska 99501

 
 
 

Reducing filesystem size

Post by Jeff Mark » Fri, 28 Aug 1992 21:34:57



>How, exactly, do you reducing the size of /usr?  The normal method of
>shrinking a filesystem is to copy it to tape, remove it, re-create it at
>the new size and move the files back.  But /usr has libc.a and if you
>remove that, the machine staggers around a little and then dies.  Anybody
>have any ideas?  (THAT'S the last time I do a full installation of Info
>Explorer...)
>--
> ------------------------------------------------------------------------------
> Greg "Maddog" Knauss                      My boss doesn't know I'm doing this,

> ------------------------------------------------------------------------------

One way you could do it is to run mkszfile, reduce the size of /usr in .fs.size,
then do a mksysb backup, and re-install the system from the backup.  
Of course you'd then have to re-configure some odm stuff that doesn't carry
across a system image install, but it doesn't amount to that much...

                        Jeff Markel

Jeffrey Markel | uucp:     jpradley!argos!markel   | Argos Computer Systems Inc


===============================================================================
        The New World Order is ... "Shoot to kill!"
===============================================================================

 
 
 

1. How to reduce filesystem size.

Hi Folks,

   I recently used the chfs command to expand the filesystems on my disk.
   Unfortunately  I made  /usr  unnecessarily large.  Now  chfs will not
   allow me to reduce the size of /usr.  Does anyone know how to do this
   (other than reformatting the disk ;-) ?

Thanks

Freddy
-------------
Freddy Jensen
Display Postscript Group
Adobe Systems Incorporated
1585 Charleston Road, P.O. Box 7900
Mountain View, CA 94039-7900



uucp:     ...!{decwrl,sun,uunet,apple}!adobe!jensen
phone:    (415) 962-3869 / 961-4400

2. Removing Volume Group

3. reduce filesystem size within rootvg

4. Compaq PC

5. how can reduce the size of the /, /usr and /tmp filesystems ?

6. How to enable SNMP in Solaris 2.5.1

7. how do I reduce the size of a filesystem?

8. dosemu 0.60.1, xdos vs keyboard

9. Reducing the size of /usr filesystem

10. reducing filesystem minfree on big filesystems

11. Limits on filesystem size/physical volume size under Sol 8?

12. Partition size - ext2 filesystem size.

13. Reducing an AIX filesystem /tmp