Visit Our UNIX and Linux User Community


help in a script using raidctl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting help in a script using raidctl
# 1  
Old 06-10-2011
Question help in a script using raidctl

Code:
getStatusi86()
{
  #storing logical volume name
  volumelist=`cfgadm -val | grep "Logical Volume" | awk '{print substr($1,9,14)}'`
  controller=`echo $volumelist | awk '{print substr($1,2,1)}'`
  #errordisk=""
  volume1=`echo $volumelist | awk '{print $1}'`
  for volume in $volumelist
  do
    waitpe=0
    raidctl -l $volume > $fruTmpPath/${volume}.out 2>/dev/null

    while [ $? -ne 0 ]     #if raidctl doesnot executes successfully  keep on trying for 200 seconds and exit
    do
              if [ $waitpe -lt 40 ]
              then
                 echo "The disk verification is halted Retrying Please wait.........."
                 sleep 5
                 waitpe=`expr $waitpe + 1`
                 raidctl -l $volume > $fruTmpPath/${volume}.out 2>/dev/null

====================================================
I am getting the output " The disk verification is halted Retrying Please wait " because it fails for the command raidctl .

I used the command raidconfig which is in usr/bin instead of raidctlas suggested by one of my colleague but it ends with same error .

Have one more general query , it shows for volume in $volumelist in the script ( Is it correct or it has to be for volumelist in $volumelist )

Also , can anyone explain the usage of raidctl / raidconfig with examples

Bottom line is raidctl should not fail Smilie

Last edited by frintocf; 06-11-2011 at 04:12 AM.. Reason: No suggestion ?
# 2  
Old 06-13-2011
Is this an AIX?
Difficult to say anything for we dont know the content of the variables...
I would start by finding out that first either by displaying or loading in separates files...
You redirected also STD ERR to /dev/null, it may be a good idea to send it to a file and see if there is a clue...

Previous Thread | Next Thread
Test Your Knowledge in Computers #12
Difficulty: Easy
CPU stands for 'Computer Processing Unit' and controls all of a computer's functions, acting as the brain(s) of computers.
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

Raidctl - Sun T5240 Solaris 10 Problem

I tried using raidctl earlier today to use my 2 disks in a RAID1 setup and I totally destroyed my OS install. I'm sure I did something funky and it freaked out. No big deal...right? This is what I was seeing after a reboot. I decided to just reinstall the OS. It let me go through all of... (3 Replies)
Discussion started by: kingdbag
3 Replies

2. Solaris

How to Find Drive serial Number under raidctl?

I have boot disk mirrored using hardware raid i.e raidctl command. If I want to place an order for a spare drive and keep it at our location for spare, how do I find the disk specification since #format does not reveal this. The server is T2000 running Solaris 10. Any help please. (5 Replies)
Discussion started by: Tirmazi
5 Replies

3. Solaris

raidctl performance issues

using the internal 2 drives mirror was created using raidctl on 100's of our servers . sometime when one drive fails we dont face any issue & we replace the drive with out any problem . but sometimes when one drive fails , system becomes unresponsive and doesnot allow us to login , the only way to... (1 Reply)
Discussion started by: skamal4u
1 Replies

4. UNIX for Dummies Questions & Answers

Information About raidctl

Hello people i have a question, when i put raidctl -l on sun fire show this Volume Size Stripe Status Cache RAID Sub Size Level Disk ... (0 Replies)
Discussion started by: enkei17
0 Replies

5. UNIX for Advanced & Expert Users

Solaris 10 Raidctl

Hello World: Recently I ran into an issue where a collegue had installed a Sun T5140 with twin 136GB disks in them. However, he forgot to execute the raidctl command first to mirror c1t0d0 to c1t1d0 boo hoo:) So along I come and try to mirror the disks by booting to sigle user... (1 Reply)
Discussion started by: rambo15
1 Replies

6. Solaris

raidctl on SUN T5240

Setting up a T5240 with two disks c1t0d0 and c1t1d0. I am trying to use raidctl but when I issue. raidctl -l I get Controller 1 Disk: 0.0.0 Disk: 0.1.0 So I try raidctl -c '0.0.0 0.1.0' -r 1 1 and I get "Array in use." I try (4 Replies)
Discussion started by: photon
4 Replies

7. Solaris

raidctl

At my own eys I can see 4 disks inside of server. Previous admin told me that hardware mirror is done. What I see with "format" is 2 disks - I suspect that these are 2 MIRRORS. I just cant be sure because raidctl show this: # raidctl -l c0t0d0 Volume Size Stripe ... (0 Replies)
Discussion started by: czezz
0 Replies

8. UNIX for Dummies Questions & Answers

create raidctl mirror with mounted source parition

I am mirroring a single partition drive with raidctl. The source partition was mounted when I created the mirror with raidctl -c c1t1d0 c1t3d0. The source disk was defined with s2 and s6 only. I didn't think to umount it first. Is there a problem with that? (2 Replies)
Discussion started by: csgonan
2 Replies

9. UNIX for Dummies Questions & Answers

raidctl and resync when reboot

I am using raidctl on a v440 disk and noticed it resyncs after every boot, which takes about 30 minutes because of the size of the partition. I am concerned with what happens during the resync if "writes" happen to the disk before it is complete? Any info would be helpful. Thanks (0 Replies)
Discussion started by: csgonan
0 Replies

10. UNIX for Dummies Questions & Answers

disksuite and raidctl used together

I have a live Sunfire v440 server with 4 drives and I want to mirror drive 0 & 1 to 2 & 3. The on-board raid controller only allows for 1 live mirror. I was thinking of disksuite, but unfortunately the second disk is just one large partition with no free slices. I was thinking of using... (0 Replies)
Discussion started by: csgonan
0 Replies

Featured Tech Videos