Operating System - HP-UX
1830676 Members
2690 Online
110015 Solutions
New Discussion

Re: san disk space calculation

 
SOLVED
Go to solution
Shivkumar
Super Advisor

san disk space calculation

Dear Sirs,

How to use "xpinfo -il" command to calculate the San Disk Space ?

Thanks,
Shiv
15 REPLIES 15
Granite
Frequent Advisor

Re: san disk space calculation

Hi Shiv,

"xpinfo -il" command can list you the number of LUNs assigned to the server.
You can redirect this o/p to a file.This itself will give you the device files for those LUNs.
--> xpinfo -il > /tmp/lun_check
Even you can furthur filter the device files like this:

-->cat /tmp/lun_check |awk '{print N$}'

If one/two luns you can doa diskinfo afterthat.Hope this can help.

Regds, Granite
HPmania - The World of HP
Shivkumar
Super Advisor

Re: san disk space calculation

/dev/rdsk/c3t0d0 da 07 00 CL1H 0f:d4 OPEN-E 00010333
/dev/rdsk/c4t0d0 c5 17 00 CL2H 0f:d4 OPEN-E 00010333

Someone said to count number of "OPEN-E"; divide by 2 and multiply by 14GB. This will give total San Disk Space.

I am not sure how this formula works ?

Thanks,
Shiv

Torsten.
Acclaimed Contributor

Re: san disk space calculation

I guess

xpinfo -m

or

xpinfo -p

should give enough information regarding the size. See "man xpinfo" for more information,.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Mel Burslan
Honored Contributor
Solution

Re: san disk space calculation

Shiv,

The person who told you this formula made an assumtion and an approximation.

each OPEN-E volume is roughly 13.5 GB big. And the assumption mad is that you have an alternate path. So, if you have two fiber optic interfaces going to the xp disk array, then run the command :

ioscan -fnC disk | grep "OPEN-E" | wc -l

divide the number into two. this will give you the number of LUNs connected to one of the interfaces, the other is the alternate path and redundant, count-wise.

multiply this number with 13.5 to get the SAN space in GBs.

As a matter of fact, run a diskinfo against the /dev/rdsk/cxtxdx devices of one of the OPEN-E devices and get the exact size and use that for exact calculation if you wish. There is no magic about it.


Hope this helps.
________________________________
UNIX because I majored in cryptology...
Devender Khatana
Honored Contributor

Re: san disk space calculation

Hi,

When OPEN-E emulation is selected than the default LUN Size you get will be exactly 13893MB. Allthough this can be altered as well and you can get the exact size of each LUN using "xpinfo -m" in the size column. Adding this space will give you the total space but there may be alternate paths for same LUNS. If you have one alternate path for each LUN than divide the total by two, if you have two alternate paths for each LUN then divide it by three and if you have three alternate paths then divide the total by four to get the effective space.

Also if you have LUNs used in VxVM then you can use the following formula to find out the no. of alternate paths.

#for i in `vxdisk list|awk '{print $1}'`
do
if [ $i != "DEVICE" ]
then
vxdmpadm getdmpnode nodename=$i
fi
done

HTH,
Devender
Impossible itself mentions "I m possible"
Shivkumar
Super Advisor

Re: san disk space calculation

I also saw some description in the output of "xpinfo -il" as below:

OPEN-E-CVS-CM

Should we also count them for disk space calculation ?

"OPEN-E-CVS-CM" stands for what ?

Devender Khatana
Honored Contributor

Re: san disk space calculation

Hi,

OPEN-E-CVS-CM represents "Custom Volume Size". It is some custom size LUN usually 100MB. These are configured if you do not want to have the LUNs of default sizes.

These LUNs shall be also counted as allocated disk space allthough are generally used for rootdg because if you use VxVM you should allocated atleast one device for rootdg. On systems running OS under LVM , the space allocated to rootdg is waste but is required. So we generally create a CVS volume to reduce the waste disk space. (Generally 100 MB is wasted as compared to 13893MB.)

HTH,
Devender

HTH,
Devender
Impossible itself mentions "I m possible"
Alzhy
Honored Contributor

Re: san disk space calculation

Shivkumar,

#!/bin/ksh

XPSERIAL=xpinfo -i >/tmp/xpinfo
for culdev in `grep $XPSERIAL /tmp/xpinfo |awk '{print $6}'|sort|uniq`;do
HPDEV=`grep $culdev /tmp/xpinfo|awk 'NR==1 {print $1}'`
SIZE=`diskinfo $HPDEV | grep -i size|awk '{print $2}'`
echo $HPDEV $culdev $SIZE
done


Just sum up the sizes (in KB)...
Hakuna Matata.
Alzhy
Honored Contributor

Re: san disk space calculation

Oh btw, above script accurately portrays to you capacity of the currently presented XP San storage to the server you're running on regardless of:

1.) emulation
2.) however many paths each LDEV/LUN is presented.

Hakuna Matata.
Shivkumar
Super Advisor

Re: san disk space calculation

Dear Sirs,

How to figure out used and free disk space in SAN enabled disks on the server ?

Whether SAN enabled and Direct attached disks co-exist ? If yes then how to differentiate them ?

Appreciate your help.

Thanks,
Shiv
Devender Khatana
Honored Contributor

Re: san disk space calculation

Hi,

For counting the allocated and unused SAN space in a system, you should find the used and unused SAN LUNs in that system. Total LUNs assigned to VG's / DG's shall be considered as used space and unallocated space shall be free space.

Yes, both can co exist in a system. SAN LUNs will show the enclosure name or emulation in ioscan whereas local disk and JBOD disks will show the disk model names in ioscan.

For ex.
dev1:/home/hp>>ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
==========================================================================
disk 0 0/0/1/1.2.0 sdisk CLAIMED DEVICE HP 36.4GST336753LC
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 1 0/0/2/0.2.0 sdisk CLAIMED DEVICE HP 36.4GST336753LC
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
disk 2 0/0/2/1.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 305
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 3 0/4/0/0.8.0.2.0.0.0 sdisk CLAIMED DEVICE HP OPEN-E
/dev/dsk/c4t0d0 /dev/rdsk/c4t0d0
disk 4 0/4/0/0.8.0.2.0.0.1 sdisk CLAIMED DEVICE HP OPEN-E
/dev/dsk/c4t0d1 /dev/rdsk/c4t0d1
disk 5 0/4/0/0.8.0.2.0.0.2 sdisk CLAIMED DEVICE HP OPEN-E
/dev/dsk/c4t0d2 /dev/rdsk/c4t0d2
disk 6 0/4/0/0.8.0.2.0.0.3 sdisk CLAIMED DEVICE HP OPEN-E
/dev/dsk/c4t0d3 /dev/rdsk/c4t0d3
disk 7 0/4/0/0.8.0.2.0.0.4 sdisk CLAIMED DEVICE HP OPEN-E
/dev/dsk/c4t0d4 /dev/rdsk/c4t0d4
disk 8 0/4/0/0.8.0.2.0.0.5 sdisk CLAIMED DEVICE HP OPEN-E
/dev/dsk/c4t0d5 /dev/rdsk/c4t0d5


Here first two disks are locally attached, third is a DVD-ROM and later ones are LUNs of a storage.

HTH,
Devender
Impossible itself mentions "I m possible"
Shivkumar
Super Advisor

Re: san disk space calculation

Thanks a lot Devender for helping me out!!

Shiv
Shivkumar
Super Advisor

Re: san disk space calculation

I used below command to find disk detail but got the error as shown below:-

# diskinfo -b /dev/dsk/c8t12d0
diskinfo: can't open /dev/dsk/c8t12d0: Invalid argument
#

and
# diskinfo -v /dev/dsk/c8t12d0
diskinfo: can't open /dev/dsk/c8t12d0: Invalid argument
#

Appreciate any suggestion.

Thanks,
Shiv

Devender Khatana
Honored Contributor

Re: san disk space calculation

Hi Shiv,

You shall be using charater device here
#diskinfo -b /dev/rdsk/cxtydz
or
diskinfo -v /dev/rdsk/cxtydz

Notice that rdsk instead of dsk.

Allthough the error still shall not be this. Try this and revert.

HTH,
Devender
Impossible itself mentions "I m possible"
Torsten.
Acclaimed Contributor

Re: san disk space calculation

You need to use the "r" device file

diskinfo -v /dev/rdsk/c8t12d0

In case ioscan is showing DISK-SUBSYSTEM for this device, you won't get a size information.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!