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

How can I add a new disk on my HP-UX server

GauravS
Occasional Advisor

How can I add a new disk on my HP-UX server

Friends
Can you please guide me how can I add a new disk to my HP-UX server if it has not contained the root file system / if it contains the root file system.
12 REPLIES
Lijeesh N G_1
Respected Contributor

Re: How can I add a new disk on my HP-UX server

Hi Gaurav,

=>Connect the disk

=>Check it with ioscan command whether is is recognised(Claimed) and device file created,

#ioscan -funC disk

=>If device file is not created, create with following command,
#insf -H

Now Disk addidtion is over.

Provide some more infos like,

1) Why do you want to add disk ?
2) Are you using LVM or VxVM ?


Reagrds,
LIJEESH N G
GauravS
Occasional Advisor

Re: How can I add a new disk on my HP-UX server

Thanks Lijneesh for your quick reply.
I am using LVM and there is not enough space available for my root file system.
Lijeesh N G_1
Respected Contributor

Re: How can I add a new disk on my HP-UX server

Hi Gaurav,

So you need to extend the root file system

You cannot extend root file system like others,
Its required Contiguous PE's.

The recommended way is to extend root file system is,
Boot with ignite backup and modify the file system.

Regards,
LIJEESH N G
SoorajCleris
Honored Contributor

Re: How can I add a new disk on my HP-UX server

Hi GauravS,

As Lijeesh told, the better way is taking the latest Ignite and restore the same. There you will get an option to modify the VG configuration.

The other option is

Take the backup of /dev/vg00/lvol4 remove /dev/vg00/lvol4 and extend the root there. and recreate the lvol4 and restore the back up of the same.

Normally it will be /tmp.
The process is not easy as ignite, still if there is no way, we can do it.

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
SoorajCleris
Honored Contributor

Re: How can I add a new disk on my HP-UX server

Hi,
Forgot to ask you onething.
Why root is full?? You may check the usage if it is used by some other files you may create a mount point and mount those directories separately.

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
R.K. #
Honored Contributor

Re: How can I add a new disk on my HP-UX server

Hello GauravS,

Before extending the root file sys try finding files that are occupying huge space. Use below command to find 20 largest files in root:
# du -kx / | sort -rn -k1 | head -n 20

May be there are some files like core files that you do not need or can safely move them some where else, thus creating space.
If you do not find any such file, then obviously you have to extend it and as mentioned Ignite would be an easier choice.
Also you need to monitor if the size of root is continuously increasing.

Regds,
R.K.

Don't fix that what ain't broke
Roopesh Francis_1
Trusted Contributor

Re: How can I add a new disk on my HP-UX server

Gaurav,

check is thre any core or large log files in root file system
using
find / -xdev -name core -print
find / -xdev -name *.log -print
find / -xdev -size +1000000 -exec ls -l {} \;
and free up some space in / file system rather going to extend it.

boot from ignite is the easy way to resize root file system. As root dump and boot should be contiguous.

Thanks
GauravS
Occasional Advisor

Re: How can I add a new disk on my HP-UX server

Thanks friends for your responses. One more thing I want to know for my knowledge that if I want to add a disk that has not contained the root file system then how can I do it?
Lijeesh N G_1
Respected Contributor

Re: How can I add a new disk on my HP-UX server

Hi Gaurav,

Adding to HP-UX is the same as I mentioned above for a new disk or a used disk;
I mean disk with file system (earlier used one) or without file syetm.

Integrating to LVM,

If it used earlier we have to use -f switch with pvcreate command,
#pvcreate -f


Regards,
LIJEESH N G
R.K. #
Honored Contributor

Re: How can I add a new disk on my HP-UX server

Hello GauravS,

To add a new disk:

# ioscan -fnC disk <<== identify the new disk

# pvcreate -f /dev/rdsk/cxtydz <<== f option if disk is used in any VG before and cxtydz is a free disk (not used in any vg)

Finally,
# vgextend vgXX /dev/dsk/cxtvdz <<== to include the disk in vgXX

Here, vgXX can be vg00 or any other vg.


Don't fix that what ain't broke
Basheer_2
Trusted Contributor

Re: How can I add a new disk on my HP-UX server

Hello Gaurav,

Which file system in vg00 is getting full.

first check if you have any FREE space available.

use SAM -> Volume groups

or
vgdisplay -v vg00
look for FREE PEs
Avail Space = FREE PE * PE-SIZE = in MB.

if you have online-JFS (fsadm), you can extend them online.

is it /tmp, /var, /home. These are dynamic.

/opt grows when you add applications.


/etc /usr are static, they grow very little whenever you update patches. So these should be fine.

GauravS
Occasional Advisor

Re: How can I add a new disk on my HP-UX server

Thanks friends for your replies. My problem has been solved now.