Operating System - HP-UX
1752724 Members
5701 Online
108789 Solutions
New Discussion юеВ

Re: disks are mirrored or not?

 
SOLVED
Go to solution
praveen..
Super Advisor

disks are mirrored or not?

Hi All,
i am facing one problem that one disk of vg00 is unavailable.

#vgdisplay -v /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 13
Open LV 13
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4384
VGDA 4
PE Size (Mbytes) 16
Total PE 8748
Alloc PE 7890
Free PE 858
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/stale
LV Size (Mbytes) 128
Current LE 8
Allocated PE 16
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 24576
Current LE 1536
Allocated PE 3072
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/stale
LV Size (Mbytes) 256
Current LE 16
Allocated PE 32
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 128
Allocated PE 256
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/stale
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/stale
LV Size (Mbytes) 2320
Current LE 145
Allocated PE 290
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/stale
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/stale
LV Size (Mbytes) 3072
Current LE 192
Allocated PE 384
Used PV 2

LV Name /dev/vg00/lvol9
LV Status available/stale
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/oracle
LV Status available/stale
LV Name /dev/vg00/oracle
LV Status available/stale
LV Size (Mbytes) 8192
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg00/ora
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 2

LV Name /dev/vg00/laoracle
LV Status available/syncd
LV Size (Mbytes) 8192
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg00/home
LV Status available/stale
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c0t6d0
PV Status available
Total PE 4374
Free PE 429
Autoswitch On

PV Name /dev/dsk/c3t6d0
PV Status unavailable
Total PE 4374
Free PE 429
Autoswitch On




It is showing PV status unavailable.


# pvdisplay /dev/dsk/c3t6d0
--- Physical volumes ---
PV Name /dev/dsk/c3t6d0
VG Name /dev/vg00
PV Status unavailable
Allocatable yes
VGDA 2
Cur LV 13
PE Size (Mbytes) 16
Total PE 4374
Free PE 429
Allocated PE 3945
Stale PE 646
IO Timeout (Seconds) default
Autoswitch On





# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0)
Boot: lvol1 on: /dev/dsk/c0t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0




#ioscan -fnC disk
::::
disk 0 1/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GST373307LC
/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0
disk 1 1/0/0/3/1.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 305
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 2 1/0/1/0/0/1/1.6.0 sdisk CLAIMED DEVICE HP 73.4GST373307LC
/dev/dsk/c3t6d0 /dev/rdsk/c3t6d0
:::::::::


# diskinfo /dev/rdsk/c3t6d0
SCSI describe of /dev/rdsk/c3t6d0:
vendor: HP 73.4G
product id: ST373307LC
type: direct access
size: 71687369 Kbytes
bytes per sector: 512


#diskinfo /dev/rdsk/c0t6d0
SCSI describe of /dev/rdsk/c0t6d0:
vendor: HP 73.4G
product id: ST373307LC
type: direct access
size: 71687369 Kbytes
bytes per sector: 512




why /dev/dsk/c3t6d0 is unavailble?
all file systems are properly mounted. is it the mirrored disk (RAID-1 configured or not?)


please correct if i am wrong:-
Each disk (of vg00) size is 71687369 KB = 68.34GB

Total size of two disks = 68.34 GB *2 = 136.68 GB



Each PE size in vg00 is 16 MB (see attached text file in my previous mail).

Total no. of PEтАЩs in vg00 is 8748.

So Total Volume Group size = 16 MB * 8748 = 139968 MB = 136.68 GB



Total size of two disks & Volume group size is same so this is not mirrored volume (correct me if I am wrong).



So if this is not mirrored volume and all the file systems of vg00 are properly mounted then why it is showing second disk status тАЬunavailableтАЭ?

please suggest
8 REPLIES 8
Dave Hutton
Honored Contributor

Re: disks are mirrored or not?

LVs are mirrored on the lv level. What does lvdisplay -v /dev/vg00/lvol1 show?

It should look something like this:
servera:root /root/# lvdisplay -v /dev/vg00/lvol1 |more
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 304
Current LE 19
Allocated PE 38
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t1d0s2 19 19
/dev/dsk/c2t0d0s2 19 19

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c2t1d0s2 00000 current /dev/dsk/c2t0d0s2 00000 current
00001 /dev/dsk/c2t1d0s2 00001 current /dev/dsk/c2t0d0s2 00001 current
00002 /dev/dsk/c2t1d0s2 00002 current /dev/dsk/c2t0d0s2 00002 current
00003 /dev/dsk/c2t1d0s2 00003 current /dev/dsk/c2t0d0s2 00003 current
00004 /dev/dsk/c2t1d0s2 00004 current /dev/dsk/c2t0d0s2 00004 current
00005 /dev/dsk/c2t1d0s2 00005 current /dev/dsk/c2t0d0s2 00005 current
Pete Randall
Outstanding Contributor

Re: disks are mirrored or not?

Check your lvdisplay output to see if the LV's are mirrored or not:

# lvdisplay /dev/vg00/lvol9
--- Logical volumes ---
LV Name /dev/vg00/lvol9
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1


Pete

Pete
Patrick Wallek
Honored Contributor
Solution

Re: disks are mirrored or not?

It appears to me that you do have all LV's in VG00 mirrored. Two things lead me to think this. 1) All LV's are using 2 PV's. 2) Some LV's are showing stale, which means some extents for that LV are NOT in sync between the 2 volumes.

I would look into getting the disk replaced very soon.

The VG size really has nothing to do with mirroring. The VG doesn't know about mirroring. Mirroring is not done at the disk or VG level, it is done the LV (logical volume) level. To really see if your LV's are mirrored do an 'lvdisplay /dev/vg00/lvol1' (or for any LV) and look for the 'Mirror Copies' line. If the value is 1 or 2 then you are mirrored.

James R. Ferguson
Acclaimed Contributor

Re: disks are mirrored or not?

Hi Praveen:

See if you can read the device:

# dd if=/dev/rdsk/c3t6d0 of=/dev/null bs=1024k count=100

Regards!

...JRF...
praveen..
Super Advisor

Re: disks are mirrored or not?

Thanks for your replies.

Used PV status of all the logical volume under vg00 is 2 so this means all the LV are mirrored.

Server is 9000/800/rp7410 so it is hot swappable or not?


If these are hot-swappable, then we can replace the faulty disks.

Should i should this procedure?
1. We will shutdown the database.
2. remove the faulty disk (/dev/dsk/c3t6d0) from volume group vg00 using command:
# vgreduce /dev/vg00 /dev/dsk/c3t6d0
3. shutdown the server
4. HP engineer will replace the disk and Once the server is up...
5. I need to restore the LVM configuration:
# vcfgrestore -n /dev/vg00 /dev/dsk/c3t6d0
6. I will sync the volume group vg00:
# vgsync /dev/vg00

Please let me know if i need to use any other command / step to bring it up.

and my questions are:
1. if the PV status of faulty disk is unavailable in vg00 so can i remove this disk from vg00? if no, then should i try this with force fully?
# vgreduce -f /dev/vg00
# mv /etc/lvmtab /etc/lvmtab.save
# vgsacn -v

2. should i need to use this command to activate the volume group vg00 and bring any disk online:
# vgchange -a y /dev/vg00



Please suggest soon, I need to this activity right now.

praveen..
Super Advisor

Re: disks are mirrored or not?

# vgreduce /dev/vg00 /dev/dsk/c3t6d0
vgreduce: Physical volume "/dev/dsk/c3t6d0" could not be removed since some of its
physical extents are still in use.

then i tried to remove it force fully.
# vgreduce -f /dev/vg00
#cp /etc/lvmtab /etc/lvmtab.save
#vgscan -v
::::::::::::
:::::::::::
Couldn't stat physical volume "/dev/dsk/c3t6d0":
Invalid argument
::::::::::::
vgscan: has no correspoding valid raw device file under /dev/rdsk.
Verification of unique LVM disk id on each disk in the volume group
/dev/vg00 failed.


# lvreduce -m 0 -k /dev/vg00/lvol6 /dev/dsk/c3t6d0
Physical extents on remaining physical volumes are stale or
Remaining physical volumes are not responding.
lvreduce: The LVM device driver failed to reduce mirrors on
the logical volume "/dev/vg00/lvol6".



Please suggest how can i remove this faulty disk, is there any other way to replace the disk.
Marc Ahrendt
Super Advisor

Re: disks are mirrored or not?

1) there is not need to tweak the LVM configuration with commands like "vgreduce" and "lvreduce" ...just making more work for yourself later and more headache now

2) just remove the bad disk (make LVM know its best to "see" the drive as dead at this point) ...if the system allows for drives to be removed on-the-fly then pull out the drive else shutdown the system

3) add a new drive ...hopefully with no LVM info on it

4) run "vgcfgrestore ..." and maybe "vgchange -a y ..." if the stale extents still around after serveral minutes (these commands may not work if you have already tweaked LVM configuration with those "*reduce" commands you stated you ran)

5) and just as important as getting the drive back online is making that drive bootable. your LVs are only mirrored but actually not the drive. fortunately you did not lose c0t6d0 else there would not be an option to do a reboot! ...this may mean that you have to remove c3t6d0 from LVM and use "pvcreate -fB /dev/rdsk/c3t6d0" then "mkboot" before/after mirroring all the LVs again
hola
praveen..
Super Advisor

Re: disks are mirrored or not?

I have opened a new thread:
how to make the disk bootable?


Thanks