Showing results for 
Search instead for 
Did you mean: 

Re: LUN's

Go to solution
Tunji Olatubosun
New Member


How do I mount a LUN on a HP-UX server?
John Dvorchak
Honored Contributor

Re: LUN's

A LUN is just some disk space. If you are using LVM then you first must determine the ctd number of the LUN. You can use ioscan -fnCdisk and look for the new LUN. If there is no /dev/dsk/cxtxdx number then you will have to run insf -e to get it reconized by the OS.

Once you have the /dev/dsk/ctd number then you will use pvcreate to prepare the LUN for use in a volume group:

pvcreate /dev/rdsk/cxtxdx

Where the x's are the number like c0t1d0.

Then use vgextend to get the LUN into an existing volume group like vg01 for example:

lvextend vg01 /dev/dsk/c0t1d0

Then use either part or all of the LUN by createing a logical volume on the LUN like lvol1 for example.

lvcreate -n lvol1 vg00 /dev/dsk/c0t1d0

then you will have to make a file system on the lvol with newfs and lets say makeing it a vxfs type file system:

newfs -F vxfs /dev/vg01/lvol1

When that completes you can then mount it after you create the mount point, /app for example:

mkdir /app
mount /dev/vg01/lvol1 /app

Then you have it mounted. If you want to make the mount perminant the add a line to /etc/fstab like this:

/dev/vg01/lvol1 /app vxfs 0 2

There are plenty of other options but that will get it done as a basic mount.
If it has wheels or a skirt, you can't afford it.
A. Clay Stephenson
Acclaimed Contributor

Re: LUN's

At one level, your question has no meaning because a filesystem is mounted not a LUN or a disk.

Your first task is to do an ioscan -fn to see if the new device is visible and is marked "CLAIMED". Next do an "insf" to create the device node (e.g. /dev/dsk/c6t3d13).

At this point you can proceed with adding the LUN to a volume or disk group. Create logical volumes, and finally run newfs to create a filesystem. You then run mkdir to create a mountpoint; and finally, you can mount it.

The good news is that you can do all of this with SAM.

All of the above assumes that this is a newly created LUN; if you are trying to import a LUN that houses an existing volume group, LVOL's, and filesystems then that is a horse of a different color.
If it ain't broke, I can fix that.
Respected Contributor

Re: LUN's

Your HPUX Server will see the LUNS as disks, they will need to have the same kind of files like a regular disk... For future reference just take a look at this site that some useful cookbooks about LVM:

And as Mr. Stephenson said you can do this with SAM.

Tunji Olatubosun
New Member

Re: LUN's

Thanks guys.