Unix Technical Forum

Shrink /home to make space for /usr

This is a discussion on Shrink /home to make space for /usr within the AIX Operating System forums, part of the Unix Operating Systems category; --> I've successfully upgraded to AIX 5.1 today, but as a result, /usr is now quickly approaching its size limits. ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-04-2008, 10:37 PM
Ulrich Plate
 
Posts: n/a
Default Shrink /home to make space for /usr

I've successfully upgraded to AIX 5.1 today, but as a result, /usr is now
quickly approaching its size limits. The former sysadmins have left me
with a rather unfortunate rootvg layout, on the only disk available, so
I can't extendvg to other disks. I'd like to chip a gigabyte off my much
too luxurious /home and let /usr grow into that, but how do I shrink /home
first? Backup to tape --> boot from CD --> shrink filesystem --> restore
backup would probably work, but the last backup I restored from tape took
something like six hours to finish, and I'd much rather do this a little
quicker. Please?

Ulrich Plate
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-04-2008, 10:37 PM
Stephane Gassies
 
Posts: n/a
Default Re: Shrink /home to make space for /usr

You only need to backup /home (e.g., with tar), then umount
and remove /home, re-create it smaller, and restore.

If you have enough disk space on another filesystem, you can
do your backup on a file.

E.g: (if you have space in /opt)
umount /home
OBS: If it does not work, try
df /home
fuser /dev/hd? (replace ? by the displayed value)
=> control/kill the using processes
umount /home (should success then)
mount -r /home (mount it as read-only)
tar cf /opt/home.tar /home
umount /home
rmfs -r /home
smit
=> To re-create the lv with the same name, and add the jfs
mount /home
tar xpf /opt/home.tar

This will be MUCH quicker than using tapes.
Regards,
Stephane

Ulrich Plate a écrit:
>
> I've successfully upgraded to AIX 5.1 today, but as a result, /usr is now
> quickly approaching its size limits. The former sysadmins have left me
> with a rather unfortunate rootvg layout, on the only disk available, so
> I can't extendvg to other disks. I'd like to chip a gigabyte off my much
> too luxurious /home and let /usr grow into that, but how do I shrink /home
> first? Backup to tape --> boot from CD --> shrink filesystem --> restore
> backup would probably work, but the last backup I restored from tape took
> something like six hours to finish, and I'd much rather do this a little
> quicker. Please?
>
> Ulrich Plate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-04-2008, 10:37 PM
Steve Nottingham
 
Posts: n/a
Default Re: Shrink /home to make space for /usr

Ulrich Plate <plate@gSPAM_ME_NEVERol.com> wrote in message news:<pan.2004.05.22.14.32.36.963450@gSPAM_ME_NEVE Rol.com>...
> I've successfully upgraded to AIX 5.1 today, but as a result, /usr is now
> quickly approaching its size limits. The former sysadmins have left me
> with a rather unfortunate rootvg layout, on the only disk available, so
> I can't extendvg to other disks. I'd like to chip a gigabyte off my much
> too luxurious /home and let /usr grow into that, but how do I shrink /home
> first? Backup to tape --> boot from CD --> shrink filesystem --> restore
> backup would probably work, but the last backup I restored from tape took
> something like six hours to finish, and I'd much rather do this a little
> quicker. Please?
>
> Ulrich Plate


mksysb to tape and restore from that mksysb with the shrink
filesystems option. How big is rootvg ? 6 hours is a very long time,
longest I've seen it take is about an hour.

Steve
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-04-2008, 10:37 PM
Ulrich Plate
 
Posts: n/a
Default Re: Shrink /home to make space for /usr

Stephane Gassies wrote:

> You only need to backup /home (e.g., with tar), then umount and remove
> /home, re-create it smaller, and restore.


Splendid! And thanks a lot for your step-by-step explanation, you made it
almost too easy... Took me a minute to figure out how to create a
filesystem, a mount point and a logical volume all in one swift move, but
it was indeed a little quicker than tapes.

Thanks again
Ulrich Plate
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-04-2008, 10:38 PM
Bill
 
Posts: n/a
Default Re: Shrink /home to make space for /usr

Ulrich Plate <plate@gSPAM_ME_NEVERol.com> wrote in message news:<pan.2004.05.22.22.32.31.870490@gSPAM_ME_NEVE Rol.com>...
> Stephane Gassies wrote:
>
> > You only need to backup /home (e.g., with tar), then umount and remove
> > /home, re-create it smaller, and restore.

>
> Splendid! And thanks a lot for your step-by-step explanation, you made it
> almost too easy... Took me a minute to figure out how to create a
> filesystem, a mount point and a logical volume all in one swift move, but
> it was indeed a little quicker than tapes.
>
> Thanks again
> Ulrich Plate


Be very careful when doing this - the rootvg filesystems are created
with some special options. NBPI, AGsize, etc.

Also - FWIW - AIX 5.3 will support a 'chfs -a size=-' option to
decrease filesystem sizes.

BV
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-04-2008, 10:38 PM
Ulrich Plate
 
Posts: n/a
Default Re: Shrink /home to make space for /usr

Bill wrote:

> Also - FWIW - AIX 5.3 will support a 'chfs -a size=-' option to
> decrease filesystem sizes.


Well, not on my senile 7043-140, I'm afraid. 5.1 is the last AIX version
supported on that hardware. I'll be cleaning out some things next, one of
the former admins seems to have installed a whole suite of GNU tools in
some rather obscure /home/local/opt/whatnot and /usr/don't/ask
directories, some of the tools even more than once. Looks like I can get
rid of almost a gigabyte worth of cruft...

Ulrich Plate
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:46 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com