Operating System - HP-UX
1828990 Members
2784 Online
109986 Solutions
New Discussion

How to create a disk in HPUX ?

 
Lee Herrin
Occasional Contributor

How to create a disk in HPUX ?

I am new to Unix and to HPUX...

I have to create a new disk in HPUX and need to place this disk under LVM control.

then convert into "Physical volume" using the command
pvcreate .
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: How to create a disk in HPUX ?

Shalom,

insf -C disk

Then pvcreate

Sometimes its easier to reboot the system, but that is only necessary for picky SAN disks.

vgextend vgroup

lvcreate -n lvolname

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
Peter Godron
Honored Contributor

Re: How to create a disk in HPUX ?

Hi,
if you are a complete newbie I would recommand the graphical System Admin Interface (SAM). For help use the command "man sam" from command line.

Review the commands generated afterwards in the samlog, that way you learn what commands were used.

You will find the System Admin Guides, accessible for free through, http://docs.hp.com/en/hpux11i.html

Other docs at:
http://docs.hp.com/
Basheer_2
Trusted Contributor

Re: How to create a disk in HPUX ?

Lee,

If you have already connected the disk, then as root use sam. go to the disk devices.
Jollyjet
Valued Contributor

Re: How to create a disk in HPUX ?

Hi,

First run ioscan -fnC disk to confirm disk is detecting and take the hardware path


and run pvcreate -f /dev/rdsk/c#t#d#

and run vgextend and add the above disk

and create LV or you can extend LV.
Sandy_hp
Occasional Advisor

Re: How to create a disk in HPUX ?

Hi Lee,

What do u mean by creating a new disk?..
Are u trying to create a disk(lun) from a storage?Do give details of the storage ..etc..

I f u want to (replace)initialize a new hdd ..you need to follow the process as told below.

First do ioscan and get the c#t#d# (device file for the specific drive)
2. Make sure which is ur drive before doing a pvcreate .
3. pvcreate /dev/rdsk/c#t#d# .
4.Once pvcreate is successful.you need to add the hdd to a volume group or create a new volume group.
please go throug the docs in hpdocs ..so as to be confident before doing the activity.

5.if pvcreate fails ..try the mediainit command.
It initializes the hdd and does a low level format.

Enjoy.. Creating..

Sandy_hp.
Rasheed Tamton
Honored Contributor

Re: How to create a disk in HPUX ?

Hi Lee,

If you are really new to HP-UX, then the IMPORTANT thing is to identify and MAKE SURE that you use the CORRECT DISK with the pvcreate command.

The steps to use LVM are already told by others.

Regards,
Rasheed Tamton.
Peter Godron
Honored Contributor

Re: How to create a disk in HPUX ?

Lee,
how are you getting on with this problem ?

If the answers helped resolve the problem, could you please complete the thread by awarding points to helpful answers and summarising the solution for you.

This will help resolution of similar problems in the future.

http://forums1.itrc.hp.com/service/forums/helptips.do?#33 shows how to reward any useful answers given to your questions.


Sp4admin
Trusted Contributor

Re: How to create a disk in HPUX ?

Hi Lee,

I would want to learn the command line. However 'SAM" can achive the same results.

command line:
pvcreate
vgextend
lvcreate

and then mirror the disk if needed.

sp,
jmckinzie
Super Advisor

Re: How to create a disk in HPUX ?

#####################
pvcreate /dev/rdsk/c?t?d?
#####################
mkdir /dev/vg????
#####################
mknod /dev/vg????/group c 64 0x0?????
#####################
vgcreate /dev/vg??? /dev/dsk/c?t?d? /dev/dsk/c?t?d? (alternate link)
#####################
vgextend /dev/vg?? /dev/dsk/c?t?d? /dev/dsk/c?t?d?
#####################
lvcreate -L 18000 /dev/vg??
lvcreate -L 16000 /dev/vg??
#####################
mkdir /aqua/v1/CREDIT_SCORE
mkdir /aqua/tpwk
#####################
newfs -F vxfs -o largefiles /dev/vg??/lvol1
newfs -F vxfs -o largefiles /dev/vg??/lvol2

If newfs doesn't work, substitutute will mkfs
#####################
mount -F vxfs /dev/vg??/lvol1 /aqua/v1/CREDIT_SCORE
mount -F vxfs /dev/vg??/lvol2 /aqua/tpwk