Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I reduce the size of /home ???

SOLVED
Go to solution
Juan Manuel López
Valued Contributor

How can I reduce the size of /home ???

Hi,
I think the right way to do this is:
init 1
mount /usr and /home
make a tar file with /home
Delete /home lv and fs
Create it again and tar -xvf of /home tar file.
Am I on the right way ???
Thanks
Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
5 REPLIES
T G Manikandan
Honored Contributor

Re: How can I reduce the size of /home ???

Create a new file system with less space.
cp the files from home to /new.
umount /home
edit the fstab file
comment the /home file system line
change the line containg the "/new"to "home"

Thanks
G Manikandan
T G Manikandan
Honored Contributor

Re: How can I reduce the size of /home ???

After changing
/new to /home
use mount -a to mount the file system

Thanks
steven Burgess_2
Honored Contributor

Re: How can I reduce the size of /home ???

1) Backup all user data
2) Umount the filesystem
umount /home
3) Reduce the size
lvreduce -L 60 /dev/vg01/lvhome
Note: the new total size will be 60M.
4) Re-create the filesystem
newfs -F vxfs /dev/vg01/rlvhome
Note: to create an hfs filesystem change vxfs by
hfs in the previous command.
5) Mount the Logical Volume:
mount /dev/vg01/lvhome /home
6) Restore the user data

Regards

Steve
take your time and think things through
Duncan Edmonstone
Honored Contributor

Re: How can I reduce the size of /home ???

Yes thats pretty much it, unless you have Online JFS installed (check using swlist).

Couple of points though:

The only truly *safe* way of getting to single user mode is to reboot, interrupt the boot sequence, and choose to interact with the ISL, and then boot using 'hpux -is'

There's no need to delete the LV, just use lvreduce to change its size, and then newfs to re-create the file system - you still need to backup/restore /home.

HTH

Duncan

HTH

Duncan
steven Burgess_2
Honored Contributor
Solution

Re: How can I reduce the size of /home ???

Juan

Have a look at the attached also

Steve
take your time and think things through