System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to increase(EXTEND) Filesystem ONLINE ?

redhat7012
Advisor

How to increase(EXTEND) Filesystem ONLINE ?

Hi,

 

How to increase the file system if it has got full 100% ?

 

I want to increase root filesystem, as their is no option of house keeping on it and the filesystem has to be increased .

 

Can it be done ONLINE ?

 

How to check the vgs ?

 

Please can anybody let me know the steps to increase the filesystem on HP-UX server ?

 

I need steps along with the commands....Please...........

 

 

In AIX we use       : chfs command

In Linux we suse :  lvextend command

In HP-UX   :   ?

 

 

Regards,

Aparna.

 

 

6 REPLIES
Steven E. Protter
Exalted Contributor

Re: How to increase(EXTEND) Filesystem ONLINE ?

Here are the steps.

1) have storage present the new LUN
2) run ioscan to see the new disk perhaps use insf -C disk
3) use vgextend to extend the volume group to include the new disk.
4) use lvextend just like linux to extend the logical volume.
5) If you have a license for onlineJFS use fsadm -b command to extend the filesystem hot with no umount. extendfs after umount if you don't have onlineJFS.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: How to increase(EXTEND) Filesystem ONLINE ?

The root filesystem (/) cannot be extended in HP-UX as it must be contiguous. There are three ways to handle a full root filesystem:

 

  1. Cleanup the junk in the root filesystem. Thre are a lot of mistakes that cause / to fill up. The first task to is to locate the bad directories (note: not big files, big directories). Use this command:

    du -kx / | sort -rn | head -20

    /etc and /sbin are the largest directories. If you see anything else, that directory is incorrect and must be fixed. If /dev is visible in the top 20, someone has misspelled the name of a tape drive or other device. If a bad install package uses / rather than /opt or /usr/contrib, you'll need to move that directory to the correct location. You may find a directory (including /) that has a large core file.

    In HP-UX, the / directory is virtually static with only config files in /etc growing slightly.

  2. Make an Ignite backup of your system, then restore from the tape or network server and change the size of the root directory.

  3. Go into single user mode and move the lvol following the root filesystem. Then grow the size of root. There are many steps required and a mistake can destroy the filesystems.


The first choice is the least risky and the correct step since something needs fixing. Managing the root filesystem (and /var, etc) is a mandatory sysadmin function. Increasing root may be needed for an OS upgrade or a massive increase in the number of LUNs, but otherwise, keeping / clean is the best choice.

 



Bill Hassell, sysadmin
pradeep m
Respected Contributor

Re: How to increase(EXTEND) Filesystem ONLINE ?

As Bill stated, the root file system needs to be contiguous.. HP supported and recommended way to increase root (/) filesystem is to extend the root filesystem using Ignite-UX network or tape recovery.. 

 

Regards,
Pradeep

I am an HP Employee
A quick resolution to technical issues for your HP Enterprise products is just a click away HP Support Center Knowledge-base
See Self Help Post for more details


Todd McDaniel_1
Honored Contributor

Re: How to increase(EXTEND) Filesystem ONLINE ?

also before you do anything like that, please search for accidental cp of large output to the / mount point.

find / -type f -size +10000000

double check the syntax
Unix, the other white meat.
Dennis Handly
Acclaimed Contributor

Re: How to increase(EXTEND) Filesystem ONLINE ?

>double check the syntax

 

You probably want:

find / -xdev -type f -size +10000000c

Bill Hassell
Honored Contributor

Re: How to increase(EXTEND) Filesystem ONLINE ?

>> find / -xdev -type f -size +10000000c

 

Very important to use -xdev.  Otherwise you will find large files like /stand/vmunix -- a file you definitely do NOT want to remove.

 

But looking for big files is the wrong approach. You first find the big directories. If you have a bad directory with 5000 files that are 100KB each, you'll never see the problem.

 

When you find a big directory, then use:

 

      ls -al | sort -rnk5 | head -20

 

Now you can see the largest file in the large directory.



Bill Hassell, sysadmin