Fetching hdisk sequence


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Fetching hdisk sequence
# 1  
Old 09-05-2013
Fetching hdisk sequence

Hi,

Planning to implement script to fetch whether the hdisks are in proper sequence. Need output for incorrect sequence

Correct
Code:
#lspv
hdisk0
hdisk1
hdisk2
::::::::::::
hdisk5

Incorrect sequence
Code:
#lspv
hdisk0
hdisk6
hdisk7
hdisk10

Any idea pls share
# 2  
Old 09-05-2013
So, they should start at zero, then go up one by one?

Code:
lspv | awk '{ sub(/[^0-9]*/, "") } (NR-1) != $1 { print "ERR" ; exit 1 }'

This User Gave Thanks to Corona688 For This Post:
# 3  
Old 09-05-2013
Beautiful ...
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. 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

3. AIX

Find hdisk# based on LV name

I know the lv name (i.e. dprod_0000017). #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: ... (2 Replies)
Discussion started by: Daniel Gate
2 Replies

4. Shell Programming and Scripting

find common entries and match the number with long sequence and cut that sequence in output

Hi all, I have a file like this ID 3BP5L_HUMAN Reviewed; 393 AA. AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3; DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot. DT 05-JUL-2004, sequence version 1. DT 05-SEP-2012, entry version 71. FT COILED 59 140 ... (1 Reply)
Discussion started by: manigrover
1 Replies

5. 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

6. 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

7. 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

8. 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

9. 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

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