Operating System - HP-UX
1832645 Members
3192 Online
110043 Solutions
New Discussion

Re: Creating some space on /opt and /usr

 
Nisar Ahmad
Regular Advisor

Creating some space on /opt and /usr

Hi there

I need to install patches from HP Support CD (a big collection) therefore require a quite ammount of disk space on /opt and /usr which is not enough according to the analysis. Looking at the list of the filesystems in the attachment which are the files/directories I can get rid of ???

What about the Ignite dir ? Can I more to some where else ? Remember I need to make a recovery tape too .

Thanks in advance.

Nisar
21 REPLIES 21
Hartmut Lang
Trusted Contributor

Re: Creating some space on /opt and /usr

If you want you can start with removing superseded patches, might give you some more disk-space.
Use the "cleanup" command for this.

Hardy
S.K. Chan
Honored Contributor

Re: Creating some space on /opt and /usr

Nope, I don't think you want to really "get-rid" of anything in /opt and /usr. Programs and executables are stored here and removing any of those would mess-up your system. Question ...
1- Are you able to extend those file system instead ?
S.K. Chan
Honored Contributor

Re: Creating some space on /opt and /usr

Nope, I don't think you want to really "get-rid" of anything in /opt and /usr. Programs and executables are stored here and removing any of those would mess-up your system. Question ...
1- Are you able to extend those file system instead ?

Re: Creating some space on /opt and /usr

Hi Nishar,
I agree with S.K. Donot delete/move any files from /opt or /usr.

Instead, find out if you can extend these file systems. If you can extend these file systems and donot know how to do that, please let us know.

If you cannot extend them, you need to find out unnecessary files in these directories and delete/truncate the files to make more space. for ex log files generated by applications.

Also, you need keep any eye even on /var because during the installation of patch bundles, a backup of ancestor patches is made in /var/adm/save and this might occupy some space. So make sure you have enough of space in /var also.

Hope this helps.
Raghu.
Unix is not for those who donot love Unix!
Animesh Chakraborty
Honored Contributor

Re: Creating some space on /opt and /usr

Hi Nasir,
Please read the following link
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc9840559ff7cd4118fef0090279cd0f9,00.html
Did you take a backup?
K.Vijayaragavan.
Respected Contributor

Re: Creating some space on /opt and /usr

Nisar,

Do you have enough space in your hardisk to extend these file systems /opt & /usr.

You can use the command

1) "bdf" to determine the logical voulme and volumegroup in which your /opt and /usr file systems are mounted.

2) vgdisplay /dev/vg##

to find the free space in vg##

(i.e. Free PE * PE size = Free space)

3)"ioscan -kfnC disk"
to determine the devicename associated with your hardisk(c#t#d#).

4)"pvdisplay /dev/dsk/c#t#d#"

to find the Free space in your physical volume.

(i.e. Free PE * PE size = Free space)

5)lvextend nad extendfs commands to allocate more space to logical voulems and extending the file system upto the size of logical voulme.

Are you able to find any core files in /opt and /usr file systems which just occupies more space. you can delete this files.

commands,
find /opt -name core -print
find /usr -name core -print

Sorry for the lengthy draft.

-K.Vijay
"Let us fine tune our knowledge together"
Sandip Ghosh
Honored Contributor

Re: Creating some space on /opt and /usr

You can run cleanup -F it will remove the old Patch which has been superceeded or you can run cleanup -c2 . But before running these commands remember to keep a backup.

The best hting is if you can increase your /opt and /usr filesystem. If you are having Advanced vxfs you can do it very easily. Just extend the lvol by lvextend and then do fsadm -b .
If you do not have Advanced vxfs you have to go to single user mode and extend the filesystem by lvextend and extendfs.

Sandip
Good Luck!!!
balu_1
New Member

Re: Creating some space on /opt and /usr

Hi Nishar,

You don't delete any files/dires under /opt or /usr. Even superseded patches are reside in /var/adm/sw directory.

I feel only option would be extending these filesystems. Use lvextend and extendfs that needs umount of filesystems.

You may not be able to extend these filesystems at multi user level because system may use files from these dir. So, it is advised to bring the system to "Single user mode" and try to extend it.

a) Reboot the server
b) Interrupt at auto boot and
interact with IPL and
issue "hpux -is" at IPL
prompt.
c) After system boots up in
single user mode. You will
see only "/" filesystem
is mounted.
d) You can now extend these
filesystems.

Let us know if you need more help on this.

Balu


Deshpande Prashant
Honored Contributor

Re: Creating some space on /opt and /usr

Hi
You might want to move the /opr/perf dir and /opt/softbench to some other file system and create link in /opt

Check for the disk space usage by directories in /opt.

Thanks.
Prashant.
Take it as it comes.
pap
Respected Contributor

Re: Creating some space on /opt and /usr

Hi Nishar,

What is the directory Sir?
dr-xr-xr-x 5 bin bin 1024 Mar 10 01:02 sir

Try to remove the directory if nothing is important in it.

You have following options :

1. You need to extend file systems using online JFS if you have installed on your server. Using it you can easily extend your file systems without any problems or pain. If you need input for that let us know.

2. If you do not have JFSonline , you have to boot the system in to single user mode , unmount required file systems .
give following command for single user booting at ISL prompt.
ISL>hpux -is
Then extend the corresponding logical volume using lvextend and hence filesystem using extendfs.Let us know if you need detailed procedure for this operation.

3. you can move some directories from /opt to other directory/filesystem and create a link in /opt for those directories.

Thanks,

-Piyush.

"Winners don't do different things , they do things differently"
pap
Respected Contributor

Re: Creating some space on /opt and /usr

Hi Nishar,

Can you please post the output of
bdf
vgdisplay -v /dev/vg00

One more thing, you can uninstall Ignite-UX for time being and later when your task completes, you can install it again.

Check the disk space for /opt after uninstalling Ignite.

Thanks,

-Piyush.
"Winners don't do different things , they do things differently"
Nisar Ahmad
Regular Advisor

Re: Creating some space on /opt and /usr

Thanks every body for the help.

I am going to extend the file systems.

One thing I am not sure:

If I have down time ie no user is there, should I be able to do lvextend/extendfs on mulitiuser level ?

Thanks

Nisar

Re: Creating some space on /opt and /usr

Hi Nishar,

If you have Online JFS installed on your system, you need not unmount the filesystems to extend their sizes.
Otherwise you need to umount the fs and then extend its size.

Check if OnlineJFS is installed on the system.
Then follow steps below :
1. bdf (find out the logical volume on which /usr and /opt are mounted ex : /dev/vg00/lvol7)
2. lvextend -L /dev/vg00/
lvextend -L /dev/vg00/
3. /usr/lbin/fs/vxfs/fsadm -F vxfs -b

In the above,
size_mb=current_size+new_size
size_in_kb=size_mb*1024

Hope this helps.

Thanks,
Raghu.
PS: Once again, you need to have Online JFS installed to do the above. If it is not, let me know, I will tell you the procedure to extend them.
Unix is not for those who donot love Unix!
Nisar Ahmad
Regular Advisor

Re: Creating some space on /opt and /usr

Hi Raghu

Thanks a lot for the assistance.

I am sure we running JxFS. What is best way to confirm that it is running ?

Regards

Nisar
Nisar Ahmad
Regular Advisor

Re: Creating some space on /opt and /usr

Hi Raghu

What is difference between OnlineJFS and Advance JFS ?

Thanks

Nisar
Michael Tully
Honored Contributor

Re: Creating some space on /opt and /usr

Darrell Allen
Honored Contributor

Re: Creating some space on /opt and /usr

Hi Nisar,

Actually the names are used interchangably. Consider the following command and output:
# swlist -l bundle | grep -i jfs
B3929BA B.11.00 HP OnLineJFS (Advanced VxFS)

This above output is for OnLineJFS version 3.1 on HPUX 11.0.

You could also do "swlist -l product | grep -i jfs" to see if you are running OnlineJFS or not.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Nisar Ahmad
Regular Advisor

Re: Creating some space on /opt and /usr

Hi there

The output of the "swlist -l bundle/product |
grep -i jfs " is empty but fstab file show all fs are Jxfs except /stand. What that mean I bit unsure.

Regards

Nisar
Michael Tully
Honored Contributor

Re: Creating some space on /opt and /usr

Hi,

You don't need either of the products that were mentioned to have journal filesystems. This is part of the standard LVM (Logical Volume Manager) Core OS filesets.

/stand needs to be HFS in order to boot the
kernel. It is better to use JFS (vxfs) filesystems for any of the other filesystems. You can use HFS if you wish, but this is older technology. You most likely find that in future releases of HP-UX, this problem of having to boot off a HFS filesystem will be solved.

Here is a sample from one of my servers.

# System /etc/fstab file. Static information about the file systems
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /home vxfs delaylog 0 2
/dev/vg00/lvol5 /opt vxfs delaylog 0 2
/dev/vg00/lvol6 /tmp vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2
# Secondary swap
/dev/vgswap/swap2 ... swap pri=1 0 0

HTH
-Michael
Anyone for a Mutiny ?
Nisar Ahmad
Regular Advisor

Re: Creating some space on /opt and /usr

Hi

So can I believe that OnlineJFS is running ?

If not how can I make sure ?

Regards

Nisar
Michael Tully
Honored Contributor

Re: Creating some space on /opt and /usr

Hi,

No you don't have OnLine JFS, otherwise it
would have been shown in the swlist output that
Darrell asked for. This doesn't mean you can't
use JFS filesystems. What is does mean is that
you can't extend a filesystem on the fly without unmounting it first. As I stated in my reponse before JFS filesystem capability comes as part of the Core OS.

-Michael
Anyone for a Mutiny ?