1829657 Members
9303 Online
109992 Solutions
New Discussion

Re: add more disk space

 
SOLVED
Go to solution
Chang_6
Regular Advisor

add more disk space

Hi,
I am using HP 11.00. Could someone tell how to add more disk space to a filesystem? Please suggest a link otherwise. bdf should show it.
18 REPLIES 18
Alzhy
Honored Contributor
Solution

Re: add more disk space

Launch the SysAmdin Tool: /usr/sbin/sam (better if you're on an X-Windows for easier navigation).
Assuming your using the Text User Interface (not Graphical):

Go to "Disks and Filesystems". Pick "Logical Volumes" - select the logical volume upon which your mount point or filesystem is mounted (space bar). Press TAB which will get you to the menu bar and arrow right to "Actions", hit enter and pick "Increase Size" -- the rest is self explanatory.

This is you have available disk space... Spend sometime in SAM and you'll learn a lot of things.
Hakuna Matata.
Steven E. Protter
Exalted Contributor

Re: add more disk space

First,

run a pvdisplay on each disk listed in /dev/dsk

This will allow you to choose where to extend the filesystem. To do so, you need a disk.

pvdisplay /dev/dsk/c5t8d0

If it showes FREE-PE and its enough, you are in business.

Note, that you can not extend root / and swap because they must be contiguous. You can add a secondary swap file.

Lets say we have enough free pe on /dev/dsk/c5t8d0 to handle the job.

The filesystem name will be /data and its in vg01

/dev/dsk/vg01

So:

umount /data
# all processes need to be closed on the filesystem.
lvextend -L /dev/vg01/data /dev/dsk/c5t8d0

size in MB is new size after expansion. If it was 1000 MB and you are expanding to 1500 MB you do the command like this.


lvextend -L 1500 /dev/vg01/data /dev/dsk/c5t8d0

extenfs -F vxfs /dev/vg01/rdata

The filesystem is now extended and will show up on bdf after this command:

mount /data

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
A. Clay Stephenson
Acclaimed Contributor

Re: add more disk space

The easist way is to use SAM -> Disk & Filesystems -> Logical Volumes ->Actions

You first grow the logical volume and then extend the filesystem; SAM will do all of this for you automatically. If you have OnlineJFS there is no need to unmount the filesystem.

If it ain't broke, I can fix that.
Chang_6
Regular Advisor

Re: add more disk space

Hi,

Can I increase the size online .. system running? Any thing else to watch for?
Alzhy
Honored Contributor

Re: add more disk space

Yes you can on line as long as you have Online JFS Product:

root@hpuxserver # swlist|grep -i online
B3929CA B.11.11 HP OnLineJFS

and you've available disk space.

Hakuna Matata.
Chang_6
Regular Advisor

Re: add more disk space

Hi,

I have this. Is this the same?

OnlineDiag B.11.00.23.10 HPUX 11.0 Support Tools Bundle, Dec 2002
Alzhy
Honored Contributor

Re: add more disk space

Chang.

I see you're on an 11.0 system.. It appears that you may not have Online JFS. You should see something like:

root@fhprod22 # swlist|grep -i online
B3929BA B.11.00 HP OnLineJFS (Advanced VxFS)


It is likely you do not have this capability to increase online...

Hakuna Matata.
Chang_6
Regular Advisor

Re: add more disk space

Hi,

What is the best approach to increase size if online JFS is not there?
Robert-Jan Goossens
Honored Contributor

Re: add more disk space

Hi,

Stop the application wich uses the filesystem.

# fstyp -v /dev/vg00/lvolX
check if you use hfs or vxfs filesystem
# umount filesystem
if you get an error (busy), check if there are processes stil using the filesystem.
# fuser -c /filesystem
# lvextend -L new_size_mb /dev/vgxx/lvolx
# extendfs -F vxfs /dev/vgxx/rlvolx
# mount -a
# bdf

Regards,
Robert-Jan
Chang_6
Regular Advisor

Re: add more disk space

Hi Robert

Thank you. About "fuser -c":

"Display the use of a mount point and any file beneath that mount point. Each file must be a file system mount point."


If I see something there, after the application using filesystem is stopped, what should I do?

I don't see any processes currently. I just see this:

fuser -c /det/opt/det11
/det/opt/det11: 25719co 5126c 22070c
Steven E. Protter
Exalted Contributor

Re: add more disk space

Couple ideas on the latest issue.

Make sure no users sessions are mounted on the logical volume in question. If its /var forget about it you either need OnlineJFS or need to go into single user mode to fix it.

If you are forced to go to single user mode, here is the outline:

boot box at console # choose your type.

interupt at the 10 second prompt

bo

Y Interact

hpux -is

or

hpux -lm

Doesn't really matter.

Nothing is going to be mounted anywhere.

You have no path there, but all your lvm commands are available in the /sbin directory

Take good notes before you start. Make sure you know exactly what logical volume you want to expand onto what disk.

When done

shutdown -ry now

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
Sridhar Bhaskarla
Honored Contributor

Re: add more disk space

Hi Chang,

Yes. There are processes associated with that filesystem. For ex., do 'ps -ef |grep 25719|grep -v grep' and you will see the process corresponding to the pid 25719.

You will have to completely stop all the application process and let your users logoff or come out of the directories underneath /det/opt/det11.

(Just as a side note, you cannot unmount some of the system directories like /opt,/tmp,/var,/usr. You will have to do them in single user mode. ANd it's not easy to extend /stand, / and primary swap even in single user mode.)

If you are sure that the application is stopped and if you still see processes, then you can kill them using 'fuser itself'. For ex., find the LV corresponding to /det/opt/det11

bdf /det/opt/det11 (note the first column). Say it /dev/vgxx/lvolx. do

#fuser -u /dev/vgxx/lvolx.

For all the PIDs printed (remove the letters from the pids for ex., for 25719co, 25719 is the pid) do a 'ps -ef|grep |grep -v grep' and see what that process is. Once it is verified, then you can kill them using the command

#fuser -k /dev/vgxx/lvolx

Then following the above 'lvextend,extendfs,mount' process to extend it.

If you have OnlineJFS or not can be found using the command 'swlist -l product |grep -i onlinejfs'.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Chang_6
Regular Advisor

Re: add more disk space


Hi,

I did umount /dev/vg00/lvol1

It gave "umount: cannot unmount /det/opt/det11 : Device busy"

Then I fuser -c /det/opt/det11

It shows nothing. There are no processes
Pete Randall
Outstanding Contributor

Re: add more disk space

Chang,

That would be because someone is cd'd into the file system - it's their `pwd`. Unless you can find this person or app, you will need to reboot in single user mode.


Pete

Pete
Chang_6
Regular Advisor

Re: add more disk space

Hi, is there a way to check who is using that? I did ps -ef . It doesn't show anything using this filesystem
Chang_6
Regular Advisor

Re: add more disk space

Hi,

I believe it is not an nfs filesystem. /etc/fstab shows it as vxfs

showmount won't run here. Is reboot and single user mode the only alternative?
Pete Randall
Outstanding Contributor

Re: add more disk space

This looks to me like one of those times where reboot and single user mode is the only way.

Sorry!


Pete

Pete
Chang_6
Regular Advisor

Re: add more disk space

Hi,

One of our filesystems is currently like this

Filesystem kbytes used avail %used Mounted on

/dev/vg03/lvol1 17776640 16556136 1201440 93% /u03

The system administrator says that this filesystem is set to max and cannot grow anymore (even using single-user mode). He says there is no more space left on disk that this vol group uses.

How could he tell that? How to check that?