Operating System - HP-UX
1837097 Members
2216 Online
110112 Solutions
New Discussion

Extending the home partition

 
Derek Rook
Occasional Advisor

Extending the home partition

I've recently become the main (read: only) admin of an HP UX B.11.23 server. we need quite a bit of room (about 10GB's) on our home directory, however it currently only has 1GB. So Here's the issue (and I want to preface this by saying I'm a Linux admin by day, so if something I say doesn't apply to the HP-UX world, I apologize):

df -k shows me about 14 gigs used. I tried running through SAM and access the partition manager, however for some reason it refuses to start the gui no matter how hard I try, so I finally gave up and used the web interface.

The web interface shows two 33.9 gig drives (most likely mirrored), as on the volume group tab it shows the rootdg VG and shows that it's only about half full. So from there I move over to the Logical Volume tab and see all of the LV's (homevol, optvol, rootvol, etc). I think "great, I can just create a bigger partition, move everything from home over, umount the current home volume, and mount the new one in it's place," however when I click "Add LV" I get taken to the creation screen, but I can't select a VG (there's no VG to choose from, says none exist).

So I need to either extend the homevol LV, or create a new, bigger, LV, move everything and replace the current homevol with it.

Can anyone help me out? I've been looking through forums and usegroups for the last several days with nothing in return but a headache.
13 REPLIES 13
Steven E. Protter
Exalted Contributor

Re: Extending the home partition

Shalom,

The LVM commands work almost exactly the same way as Linux LVM, slightly less flexible.

You would be better off using lvextend to do this.

Overall process.

ioscan -fnCdisk
To get the device names of all disks
pvdisplay
To find out which disk if any has any space on it.
bdf /home
To get the device name of /home
lvextend

If you have no free space on any disk then you will need to lvremove another logical volume to make room.

If you have a disk that is not a member of a volume group you will have to do this:

vgextend

Best not to use sam.

This system may be using vxvm in which case you can ignore everything I've just written and assign me zero points.

The web interface pretty much sucks in my opinion. You are better off with command line or sam.

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
siva0123
Trusted Contributor

Re: Extending the home partition

hi Derek,

1. bdf | grep -i home

Note the home lv's devpath , it should be something like /dev/vgxxx/lvolXXX

2. vgdisplay /dev/vgXXX

3. Look for the line Available PE's and PE Size

4. Free PE's * PE size is your space available in the vg

5. If you find enough space in the vg then

lvextend -L sizeinmb /dev/vgxx/lvolname

6.extendfs -F vxfs /dev/vgxx/rlvolname .

Note the r suffix in lvol


If there is no enough space in vg then

7. Add a new disk

8 pvcreate /dev/dsk/cxtxdx

9 vgextend /dev/vgxx /dev/dsk/cxtxdx

10 lvextend -L size in mb /dev/vgxx/lvolname

11 extendfs -F vxfs /dev/vgxx/rlvolname.


Hope this helps.

Thanks,
Siva

Derek Rook
Occasional Advisor

Re: Extending the home partition

SEP,

I appreciate your quick response. This system is in fact using VxVM. So what you wrote doesn't apply? That's a shame, however your reply did give me quite a bit of information that I can use for further research on other topics (i feel like a total newb on HP-UX, as if my years of Linux experience means little :P).

Siva,

since the system is using VxVM, is your advice null as well? Forgive me, but I'm a bit hesitant to just start hacking around on this machine.


Thanks,
Derek
siva0123
Trusted Contributor

Re: Extending the home partition

oops!!! I'm sorry Derek i'm not that much gud in vxvm ..

But i hope SAM doesnt provide a gud opportunity to extend vxvm filesystem ..

Lets wait for some experts suggestions.. There are a lot many experts here ...may be i may also learn something new.

Thanks,
Siva
Derek Rook
Occasional Advisor

Re: Extending the home partition

Siva,

started with some of the prep commands that you gave me, just to familiarize myself, and got the following after step 2.


# vgdisplay /dev/vgXXX
vgdisplay: /etc/lvmtab: No such file or directory
vgdisplay: No volume group name could be read from "/etc/lvmtab".

probably that VxVM thing messing things up, eh?
Patrick Wallek
Honored Contributor

Re: Extending the home partition

Yes, VxVM is effecting your ability to see things with LVM commands. It just won't work.

The GUI admin tool for VxVM is 'vea'.

Set your display and do:

# /opt/VRTS/bin/vea
siva0123
Trusted Contributor

Re: Extending the home partition

Derek ,

If you havent configured the filesystems using LVM then there is no use in checking my commands!!! :-(.

They are all lvm commands and not vxvm commands.

Thanks,
Siva
Derek Rook
Occasional Advisor

Re: Extending the home partition

Patrick,

That brings up another interesting point. I can't, for the life of me, execute GUI commands. ssh -X'd into the box, then set my display

#DISPLAY=:0.0

and I get nothing. well, actually I get this:

# export DISPLAY=:0.0
# /opt/VRTS/bin/vea
/opt/VRTS/bin/vea[37]: test: Specify a parameter with this command.
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using '172.18.10.57:0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:54)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:146)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:135)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:168)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.awt.motif.MToolkit.(MToolkit.java:100)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:168)
at java.awt.Toolkit$2.run(Toolkit.java:822)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:805)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1614)
at java.awt.EventQueue.isDispatchThread(EventQueue.java:666)
at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1270)
at javax.swing.text.StyleContext.reclaim(StyleContext.java:424)
at javax.swing.text.StyleContext.addAttribute(StyleContext.java:281)
at javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.java:1473)
at javax.swing.text.StyleContext$NamedStyle.setName(StyleContext.java:1283)
at javax.swing.text.StyleContext$NamedStyle.(StyleContext.java:1231)
at javax.swing.text.StyleContext.addStyle(StyleContext.java:90)
at javax.swing.text.StyleContext.(StyleContext.java:70)
at javax.swing.text.StyleContext.getDefaultStyleContext(StyleContext.java:58)
at javax.swing.text.AbstractDocument.(AbstractDocument.java:91)
at javax.swing.text.PlainDocument.(PlainDocument.java:74)
at javax.swing.text.PlainDocument.(PlainDocument.java:64)
at vrts.ob.gui.utils.Debug.(Debug.java:35)
at vrts.ob.gui.core.runtime.OBGUI_App.initDebug(OBGUI_App.java:133)
at vrts.ob.gui.core.runtime.OBGUI_App.main(OBGUI_App.java:100)
#

but other than that, effectively nothing.
Tor-Arne Nostdal
Trusted Contributor

Re: Extending the home partition

Hi Derek,
If you're using a Linux desktop with X and you run "ssh -X" to the HP-UX host, the X-display will have to be sent to the ssh program and tunneled to your client.
Therefore you should not try to set the DISPLAY variable manually, but let the sshd set it.

You will see that the display variable is a bit unusual and point back to "yourself".
It is as such pointing to the ssh tunnel.

Also make sure that you - on your client have allowed X-display from other hosts.

/Tor-Arne
I'm trying to become President of the state I'm in...
Derek Rook
Occasional Advisor

Re: Extending the home partition

Tor-Arne,

I usually start my ssh clients with the -X flag, however at this time everytime I try to start an X program remotely it spits out

X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X connection to 127.0.0.1:10.0 broken (explicit kill or server shutdown).

this is after I've done the

command/usr/bin/X11/xhost +

everything I know about remote X administration via terminal (which is pretty much just the X tunneling through SSH as you suggested) is not working. I figured maybe it was just an HP-UX thing and things had to be done differently, however from what you say it seems that it should be the same?

-Derek
Tor-Arne Nostdal
Trusted Contributor

Re: Extending the home partition

Hi again Derek
This might be a bit off related to the initial topic... and you could therefore miss some replies from others...
If this doesn't help it might be useful to register as separate question.

On your client you probably lookup a DNS entry, while on the server side it is defined in the hosts file. check that the hostname is resolved equally on both sides.

Check:
- what kind of authentication method is used by ssh. ensure you're using same on both sides.
- what ssh-version you run on HP-UX. I had some problems before on some older HP-UX's and had to upgrade my SSH software on those servers.

It's always a good starting point to look in the logs...
On Linux take a look in /var/log/messages to see if there's some more details
On HP-UX look in /var/adm/syslog/syslog.log

BR
/Tor-Arne
I'm trying to become President of the state I'm in...
Tor-Arne Nostdal
Trusted Contributor

Re: Extending the home partition

Related to you xhost command...

I don't think this is required when you tunnel the X through ssh.

If you do not tunnel the X, but try to send the X-display ordinarily towards your system, then it is required...

If you bypass ssh tunnel, you should also check that your X Window Manager actually listen for X-windows...
This is default on HP-UX's and workstations, but not on many Linux's.
They are often started with "nolisten"

Config is set in /etc/sysconfig/displaymanager

## Type: yesno
## Default: no
#
# TCP port 6000 of Xserver. When set to "no" (default) Xserver is
# started with "-nolisten tcp". Only set this to "yes" if you really
# need to. Remote X service should run only on trusted networks and
# you have to disable firewall for interfaces, where you want to
# provide this service. Use ssh X11 port forwarding whenever possible.
#
# Changed by Tor-Arne
DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN="yes"

Then restart your window manager.

Be aware of the security issues.

The more ports opened and services running on a machine... the more doors is available for someone to try to enter or penetrate.

/Tor-Arne
I'm trying to become President of the state I'm in...
Derek Rook
Occasional Advisor

Re: Extending the home partition

thanks to everyone for your replies and help. Our company got tired of messing with it and decided to just target the compilation output to a different partition. I'd love to find the answer to this, but we just don't have the time to further research and monkey around with it further.

Again, I really appreciate the responses, and have learned a bit about unix that I didn't know before :)