Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to increase/move diskspace from / to /opt

Status
Not open for further replies.

pho01

Programmer
Mar 17, 2003
218
US
/opt is running out of diskspace, I need to allocate some diskspace from / to /opt. I need to move 2MB from / and add it to /opt. How would I do that?

Thanks,
 
Not easily - if poss. clear out anything unused from /opt

Best way to re-org the root disk is to make a make_recovery tape, and then recover the system onto itself, but specify a new layout for the root disk. I am presuming you have HP-UX 11.00 or 11i.

root filesystems should not (good practice) be above 75% max (unless they are static perhaps). My company standard for vg00 is nothing above 50% for a new sys., unless static, or v. large when a specified amount must remain free. This allows for system growth and saves us a lot of work as root filesystems don't keep running out of space.

Martin
 
From a previous post :


1. Back up the entire system
2. Create ignite make_recovery tape, use the -i option
3. Boot off the tape select advanced install
4. Edit filesystem sizes as required
5. Let machine rebuild off tape
6. re-mirror

Beware that this will only backup (by default anyway) vg00, so do not touch anything on other disk. (Hence the reason for a full backup, just in case).

Martin
 



make a new directory called

/optnew

of the correct size

copy everything from /opt to /optnew

mv /opt /optold ; mv /optnew /opt

reboot.

Now this assumes that at the time you do the copy that everything is accessible and not currently in use and that you us a COPY mechanism that will maintain SOFTLINKS and HARDLINKS properly.



 
OK, this will kinda work, by creating a new /opt area - /opt should be a separate filesystem though so there may be an amount of umounting and remounting to do.

Create new filesystem
Mount as /optnew
Copy data from /opt to /optnew


then need to get /optnew to mount as /opt - not tried it but I suspect you my need to do this in single user mode, without /opt mounted.

Martin
 
as far as I know under 11x or 11i you can use fsadm to increase your /opt - provided you have free space (vgdisplay vg00) - I don't recommend using lvreduce for root ( / ).
 
You can indeed extend /opt - you would need Online-JFS to do this online.

I presumed that there was no available free space, hence the requirement to move space from /.

 
If you have free space in vg00, you can extend /opt.
For the os filesystems, you need to have Online-JFS to increase /opt on fly (os file sytems cannot umount unless in single/maintenace mode).

If you do not have enough space in vg00, than you should run the make_recovery method.

Rashid Hamid


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top