1827286 Members
1722 Online
109717 Solutions
New Discussion

disk replacemnet in a vg

 
SOLVED
Go to solution
223848
Frequent Advisor

disk replacemnet in a vg

Hi Gurus,

 

      In one of my machine ( B.11.23)  one disk (/dev/dsk/c1t0d1) gone bad , the disk is part of vg01 , vg01 contains two lvols

In ioscan the disk c1t0d1 is not at all showing


******:#ioscan -fnC disk
Class     I  H/W Path        Driver         S/W State   H/W Type     Description
=================================================================================
disk      2  0/0/2/1.0.16.0.0         sdisk          CLAIMED     DEVICE       TEAC    DVD-ROM DW-224EV
                            /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0
disk      1  0/6/0/0/0/0/2/0/0/0.0.0  sdisk          CLAIMED     DEVICE       HP      LOGICAL VOLUME
                            /dev/dsk/c1t0d0     /dev/dsk/c1t0d0s2   /dev/rdsk/c1t0d0    /dev/rdsk/c1t0d0s2
                            /dev/dsk/c1t0d0s1   /dev/dsk/c1t0d0s3   /dev/rdsk/c1t0d0s1  /dev/rdsk/c1t0d0s3
disk      3  0/6/0/0/0/0/4/0/0/0.0.0  sdisk          CLAIMED     DEVICE       HP      LOGICAL VOLUME
                            /dev/dsk/c2t0d0     /dev/dsk/c2t0d0s2   /dev/rdsk/c2t0d0    /dev/rdsk/c2t0d0s2
                            /dev/dsk/c2t0d0s1   /dev/dsk/c2t0d0s3   /dev/rdsk/c2t0d0s1  /dev/rdsk/c2t0d0s3
disk      5  0/6/0/0/0/0/4/0/0/0.0.1  sdisk          CLAIMED     DEVICE       HP      LOGICAL VOLUME
                            /dev/dsk/c2t0d1   /dev/rdsk/c2t0d1
*******:#

 

*******:#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t0d0s2
/dev/dsk/c1t0d0s2
/dev/vg01
/dev/dsk/c1t0d1
/dev/dsk/c2t0d1
******:#

*****:#vgdisplay -v vg01
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t0d1":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name                     /dev/vg01
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      2
Open LV                     2
Max PV                      16
Cur PV                      2
Act PV                      1
Max PE per PV               3280
VGDA                        2
PE Size (Mbytes)            256
Total PE                    1093
Alloc PE                    1093
Free PE                     0
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t0d1":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
   --- Logical volumes ---
   LV Name                     /dev/vg01/extraswap
   LV Status                   available/syncd
   LV Size (Mbytes)            34560
   Current LE                  135
   Allocated PE                135
   Used PV                     0

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t0d1":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
   LV Name                     /dev/vg01/lvol1
   LV Status                   available/syncd
   LV Size (Mbytes)            1084928
   Current LE                  4238
   Allocated PE                4238
   Used PV                     1


   --- Physical volumes ---
   PV Name                     /dev/dsk/c2t0d1
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t0d1":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
   PV Status                   available
   Total PE                    1093
   Free PE                     0
   Autoswitch                  On
   Proactive Polling           On


******:#


=========================================================================================================


The server consisit of two sas card .. the details are given below


Class     I  H/W Path       Driver   S/W State   H/W Type     Description
==========================================================================
ext_bus   1  0/6/0/0/0/0/2/0/0/0  ciss     CLAIMED     INTERFACE    PCIe SAS SmartArray P800 RAID Controller
                           /dev/ciss1
ext_bus   2  0/6/0/0/0/0/4/0/0/0  ciss     CLAIMED     INTERFACE    PCIe SAS SmartArray P800 RAID Controller
                           /dev/ciss2

 

******:#sautil /dev/ciss1



---- LOGICAL DRIVE SUMMARY ---------------------------------------------------

       #   RAID      Size        Status

       0   1+0      139982 MB    OK
       1   0        839893 MB    FAILED


---- SAS/SATA DEVICE SUMMARY -------------------------------------------------

  Location  Ct Enc Bay       WWID           Type        Capacity Status

  internal  4I   1  12  0x5000c5000ecd3a6d  DISK       146.8 GB  OK
  internal  4I   1  11  0x5000c5000ecd9389  DISK       146.8 GB  OK
  internal  4I   1  10  0x5000c5000ecd5dbd  DISK       146.8 GB  OK
  internal  4I   1   9  0x5000c5000ecd38e1  DISK       146.8 GB  OK
  N/A       3I   1  16  0x5000c5000ecd8425  N/A        N/A       FAILED  ------> Failed
  internal  3I   1  15  0x5000c5000ecc5965  DISK       146.8 GB  OK
  internal  3I   1  14  0x5000c5000ecd93cd  DISK       146.8 GB  OK
  internal  3I   1  13  0x5000c5000ecc3171  DISK       146.8 GB  OK



---- LOGICAL DRIVE 1 ---------------------------------------------------------

  Logical Drive Device File........... c1t0d1
  Fault Tolerance Mode................ RAID 0 (no fault tolerance)
  Logical Drive Size.................. 839893 MB
  Logical Drive Status................ FAILED
  # of Participating Physical Disks... 6

  Participating Physical Disk(s)...... Ct:Enc:Bay:WWID
                                       4I:1:12:0x5000c5000ecd3a6d
                                       4I:1:11:0x5000c5000ecd9389
                                       3I:1:16:0x5000c5000ecd8425 <-- NOT RESPONDING
                                       3I:1:15:0x5000c5000ecc5965
                                       3I:1:14:0x5000c5000ecd93cd
                                       3I:1:13:0x5000c5000ecc3171

  Participating Spare Disk(s)......... Ct:Enc:Bay:WWID
                                       none

  Stripe Size......................... 256 KB
  Logical Drive Cache Status.......... cache enabled
  Configuration Signature............. 0xA93895E9
  Media Exchange Detected?............ no

====================================================================================================================


******:#sautil /dev/ciss2

  Driver State........................ READY

---- CONTROLLER INFORMATION --------------------------------------------------

  Controller Product Number........... P800
  Controller Product Name............. HP PCIe SmartArray P800
  Hardware Path....................... 0/6/0/0/0/0/4/0/0/0
  Serial Number....................... PAFGF0M9SWH1V9
  Device File......................... /dev/ciss2
  Hardware Revision................... 'E'
  Boot Block Revision................. 0.03
  Firmware Revision (running)......... 5.20
  Firmware Revision (in ROM).......... 5.20
  Firmware Revision (inactive)........ 5.20
  # of Logical Drives................. 2
  # of Physical Disks Configured...... 4
  # of Physical Disks Detected........ 4
  Logical Drive Rebuild Priority...... 118 (high)
  Array Capacity Expansion Priority... 64  (medium)
  Auto-Fail Missing Disks at Boot..... enabled
  SCSI Transfer Detection Mode........ Auto Detect


---- ARRAY ACCELERATOR (CACHE) INFORMATION -----------------------------------

  Array Accelerator Board Present?.... yes
  Cache Configuration Status.......... cache enabled
  Cache Ratio......................... 50% Read / 50% Write
  Total Cache Size (MB)............... 456
    Read Cache........................ 228
    Write Cache....................... 228
    Transfer Buffer................... 000
  Battery Pack Count.................. 2
  Battery Status (pack #1)............ ok
  Battery Status (pack #2)............ ok


---- LOGICAL DRIVE SUMMARY ---------------------------------------------------

       #   RAID      Size        Status

       0   1+0      139982 MB    OK
       1   0        279964 MB    OK


So the disk in bay 16 gone fault

As i told the lvols are using for tmp and swap, so the data is not at all important

The action plan from my side is:
=====================================

Since this a hardware RAID, after replacing the disk the lgical volume1 will resynch automatically

Take the copy of lvmtab , vg01.conf

 

1) vgreduce -f /dev/vg01  ==== This will reduce the vg from faulty disk

After replacing the disk

2) insf -e
3) ioscan -fnC disk  ===== check the new disk is visible
4) vgextend /dev/vg01 /dev/dsk/c1t0d1
5) Remve the existing two lvs
6) lvcreate -L 1084928 -n lvol1 /dev/vg01
7) lvcreate -L 34560 -n extraswap /dev/vg01
8) newfs -F vxfs /dev/vg01/rlvol1
9) swapon /dev/vg01/extraswap

=================================================

Can you please tell me my actions are  ok


Regards
Laiju

9 REPLIES 9
Hiren N Dave
Valued Contributor

Re: disk replacemnet in a vg

Since the failed disk is in RAID 0, it won't recover the data, you need to restore it from backup.

I am an HP Employee

Was this post useful? - You may click the KUDOS! star to say thank you.
223848
Frequent Advisor

Re: disk replacemnet in a vg

Hi Hiren,

      Thanks for your time. I can restore from back up.

 

But what is my doubt , the steps which i provided (action plan) is correct or not . ?

Hiren N Dave
Valued Contributor

Re: disk replacemnet in a vg

All steps seems fine by me. The swap volume requires that all the extents be contiguous in the logical volume. You can use the -C option with the lvcreate command to create a contiguous volume.


# lvcreate -L 8 -n swapvol -C y vg01 

 

Also add the entry into /etc/fstab.

I am an HP Employee

Was this post useful? - You may click the KUDOS! star to say thank you.
223848
Frequent Advisor

Re: disk replacemnet in a vg

Hi Hiren,

     Thanks for the reply,

I have a small doubt how can i check in the existing lvol whether "largefukes is enabled or not"

Hiren N Dave
Valued Contributor

Re: disk replacemnet in a vg

You mean largefiles...

 

# fsadm /dev/vg01/rlvol1

 

 

I am an HP Employee

Was this post useful? - You may click the KUDOS! star to say thank you.
223848
Frequent Advisor

Re: disk replacemnet in a vg

Hi,

        Thanks for the reply

 

But in my case its not working (may be because of disk issue )

 

*******:#fsadm /dev/vg01/rlvol1
vxfs fsadm: read of super-block on /dev/vg01/rlvol1 failed: I/O error
You have mail in /var/mail/root
******:#
=============================================

 

But from /etc/fstab i got the below entry

 

/dev/vg01/lvol1 /tmp vxfs largefiles,tmplog,nodatainlog,mincache=tmpcache 0 3

 

That means it will support large files

 

am i right ?

 

 

Hiren N Dave
Valued Contributor

Re: disk replacemnet in a vg

>> That means it will support large files

Yes, this LV does support largefiles but anyway you are going to lvremvoe old LVs, aren't you?

 

When you create new LVs and file system, use below commands to support largefiles and use same /etc/fstab options as currently defined for this mount point.

 

# newfs -F vxfs -o largefiles /dev/vg01/rlvol1

 

I am an HP Employee

Was this post useful? - You may click the KUDOS! star to say thank you.
223848
Frequent Advisor

Re: disk replacemnet in a vg

Hi Hiren,

 

           Thanks for the reply and for your  valuable time ... :)

 

Regards

Laiju

223848
Frequent Advisor
Solution

Re: disk replacemnet in a vg

Hi  All,

         thanks a lot for every one who helped..

The actions i performed are as below

 

1) Tried to reduce the vg but not succesfult --- So we decided to replace the disk and see waht hapens

2) Replaced the disk ---- but in sautil still the logical drive was showing asFAILED but all disks  status are OK ans in ioscan the disk was not showing  after insf -e also same situation

  

 since its hardware RAID 0 i used the below comamnd

 

sautil <device name> accept_media_xchg <logical drive number>
 
In my case
 
 sautil /dev/ciss1 accept_media_xchg 1
 
Then the disk was  shown in ioscan and the vg become OK and lv also become ok
 
Then i just rebooted the node and restored the data back
 
Regards
Laiju