Find hdisk# based on LV name


 
Thread Tools Search this Thread
Operating Systems AIX Find hdisk# based on LV name
# 1  
Old 02-02-2013
Find hdisk# based on LV name

I know the lv name (i.e. dprod_0000017).
Code:
#lslv dprod_0000017
LOGICAL VOLUME:     dprod_0000017          VOLUME GROUP:   prod01vg
LV IDENTIFIER:      00cb337d00004c0000000111d8566a5a.69 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               raw                    WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                240                    PPs:            240
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO

To find the hdisk name, run a lsvg query

Code:
#lsvg -p prod01vg
prod01vg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk19           active            574         0           00..00..00..00..00
hdisk30           active            575         0           00..00..00..00..00
hdisk24           active            574         0           00..00..00..00..00
hdisk31           active            575         0           00..00..00..00..00
hdisk4            active            575         0           00..00..00..00..00
hdisk5            active            575         0           00..00..00..00..00
hdisk6            active            575         0           00..00..00..00..00
hdisk7            active            575         0           00..00..00..00..00
hdisk37           active            575         0           00..00..00..00..00
hdisk9            active            575         0           00..00..00..00..00
hdisk35           active            575         0           00..00..00..00..00
hdisk38           active            575         0           00..00..00..00..00
...
...

and then find the right PV and run a query again to see which hdisk has the LV I am looking for.

Code:
#lspv -l hdisk19
hdisk19:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
iprod_0000075         1       1       01..00..00..00..00    N/A
iprod_0000032         1       1       01..00..00..00..00    N/A
iprod_0000087         1       1       00..00..01..00..00    N/A
iprod_0000039         1       1       01..00..00..00..00    N/A
iprod_0000074         1       1       01..00..00..00..00    N/A
iprod_0000067         1       1       00..00..01..00..00    N/A
iprod_0000052         1       1       00..00..01..00..00    N/A
dprod_0000078         1       1       01..00..00..00..00    N/A
iprod_0000051         2       2       00..00..01..01..00    N/A
iprod_0000089         1       1       00..00..01..00..00    N/A
dprod_0000097         4       4       00..00..00..04..00    N/A
iprod_0000050         1       1       00..00..01..00..00    N/A
dprod_0000017         1       1       00..01..00..00..00    N/A
dprod_0000037         1       1       01..00..00..00..00    N/A
iprod_0000088         1       1       01..00..00..00..00    N/A
dprod_0000096         16      16      00..00..00..16..00    N/A
iprod_0000031         1       1       00..00..01..00..00    N/A
.....
.....

The outputs are too long to check manually and cumbersome.

Is there an easier way to find the hdisk?

Thank you

Last edited by zaxxon; 02-02-2013 at 02:39 PM.. Reason: changed icode vs code, easier to read. hope thats ok
# 2  
Old 02-02-2013
Try:
Code:
lslv -pv dprod_0000017

Untested - no AIX at hand at the moment.

EDIT:
Forget it (you did already Smilie) - that was somehow a command for the VIO CLI. A simple lslv -l dprod_0000017 would have done it too. Or as Michael wrote Smilie

Last edited by zaxxon; 02-04-2013 at 03:47 AM.. Reason: update to let my wrong info not be uncommented
# 3  
Old 02-03-2013
Code:
lslv -m lvname | head

might give a nice starting point.

hope this helps

Last edited by zaxxon; 02-03-2013 at 12:23 PM.. Reason: code tags
This User Gave Thanks to MichaelFelt For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

How can I map hdisk# to rhdisk#?

Some storage/disks have been added to an existing AIX 6.1 server. The admin sent me the list of hdisk#'s for the new disks, but I need the corresponding rhdisk# for the same hdisk. (I know from past experience that the rhdisk that maps to an hdisk is not always the same number. For instance,... (5 Replies)
Discussion started by: sbrower
5 Replies

2. Shell Programming and Scripting

Fetching hdisk sequence

Hi, Planning to implement script to fetch whether the hdisks are in proper sequence. Need output for incorrect sequence Correct #lspv hdisk0 hdisk1 hdisk2 :::::::::::: hdisk5 Incorrect sequence #lspv hdisk0 hdisk6 hdisk7 hdisk10 Any idea pls share (2 Replies)
Discussion started by: ksgnathan
2 Replies

3. AIX

Quorum and hdisk issue

Hi. I found an issue with my appvg present in my server.my server is a single node and not part of hacmp. pmut3# lspv hdisk0 00c5c9cf92ebb96a rootvg active hdisk1 00c5c9cfcf30eee9 appvg hdisk2 00c5c9cfcf30ef98 ... (5 Replies)
Discussion started by: newtoaixos
5 Replies

4. AIX

Flashcopy, ghost hdisk ??

Hi all, I'm getting some errors on AIX regarding Flashcopy and volume group hard disks. The script that activates flashcopy showed this errors: Recreating Flashcopy for lun01_A1 Performing syntax check... Syntax check complete. Executing script... Script execution complete. SMcli... (1 Reply)
Discussion started by: enux
1 Replies

5. AIX

Dummy hdisk in AIX 6.1

How do you create a dummy hdisk with AIX 6.1? In previous versions, I've used this and works, but now I get this error. hostname:/:# mkdev -l hdisk57 -c disk -t osdisk -s scsi -p fscsi0 -w 0,10 -d Method error (/etc/methods/define): 0514-022 The specified connection is not valid. Any... (2 Replies)
Discussion started by: kah00na
2 Replies

6. AIX

load_balance or round_robin on hdisk

Hi, in an environment with svc's and ds8xxx wat disk algorithm should be used and what is the difference here: I can set the algorithm to Load_balance and to Round_robin (see output below). some info: hdisk3 ******** MPIO FC 2145 devices.sddpcm.53.rte 2.2.0.0 COMMITTED ... (1 Reply)
Discussion started by: raba
1 Replies

7. AIX

VPATHS and HDisk/not able to add to NR-VG

When I list the PV's using lspv i see both vpath and hdisk names being listed. I got the info that each vpath is configured for 4 hdisks. Problem is I am not able to add either the hard disks in vpath to the existing non-rootvg. ? need to know the basics of vpath .. (4 Replies)
Discussion started by: nivaspIND
4 Replies

8. AIX

vpath to an hdisk

Is there a simply way for me to map a vpath to an hdisk on AIX 5.2? (5 Replies)
Discussion started by: 2dumb
5 Replies

9. UNIX for Advanced & Expert Users

Find out which process is utilising a particular hdisk

Hi, Can anyone suggest how I can find out which process is keeping one of my hdisk constantly busy (100%) utilisation, when I ran topas . Thanks for your feedback Regards (2 Replies)
Discussion started by: tansha
2 Replies

10. UNIX for Advanced & Expert Users

AIX hdisk error

Does anyone have an idea what this means? hdisk10 is part of vg1. (vg1 has 11 hdisks) I get this msg every morning @ 5:04 CST This is the orignal message: A PROBLEM WAS DETECTED ON Fri Aug 17 03:02:09 PDT 2001 801014 The Service Request Number(s)/Probable Cause or... (2 Replies)
Discussion started by: Optimus_P
2 Replies
Login or Register to Ask a Question