Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk size from lsattr 1

Status
Not open for further replies.

gatetec

MIS
Mar 22, 2007
420
0
0
US
I have EMC disks presented i.e. as shown below. Unlike other disks, lsattr doesn't show the size of disks.
What the command to view the size of disks? There are a bunch of EMC disks. I like to have a script that can return the names of disks with their sizes.

# lsattr -El hdiskpower15
cgname Consistency Group Name True
clr_q yes Clear Queue (RS/6000) True
location Location True
lun_id 0x47000000000000 LUN ID False
lun_reset_spt yes FC Forced Open LUN True
max_coalesce 0x20000 Maximum coalesce size True
max_transfer 0x40000 Maximum transfer size True
pvid none Physical volume identifier False
pvid_takeover yes Takeover PVIDs from hdisks True
q_err no Use QERR bit True
q_type simple Queue TYPE False
queue_depth 16 Queue DEPTH True
reassign_to 120 REASSIGN time out value True
reserve_lock yes Reserve device on open True
rw_timeout 40 READ/WRITE time out True
scsi_id 0xe60018 SCSI ID False
start_timeout 180 START unit time out True
ww_name 0x5006048ad52e3f69 World Wide Name False

# lsattr -El hdisk10
clr_q yes Device CLEARS its Queue on error True
location Location Label True
lun_id 0x3e000000000000 Logical Unit Number ID False
lun_reset_spt yes FC Forced Open LUN True
max_transfer 0x40000 Maximum TRANSFER Size True
node_name 0x5006048ad52e3f66 FC Node Name False
pvid none Physical volume identifier False
q_err no Use QERR bit True
q_type simple Queue TYPE True
queue_depth 16 Queue DEPTH True
reserve_lock yes Reserve Device on open True
rw_timeout 40 READ/WRITE time out value True
scsi_id 0xd40018 SCSI ID False
start_timeout 180 START UNIT time out value True
ww_name 0x5006048ad52e3f66 FC World Wide Name False

thx so much
 
You may use navicli with getlun option to get the size of the corresponding lun of the lun id got in lsattr command
 
off hand:

[tt]for emcdisk in $(lsdev -C -cdisk -Fname|grep hdiskpower)
do
emcsize=$(bootinfo -s $emcdisk)
echo ${emcdisk} ${emcsize}
done[/tt]

figures are in MB


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top