Sponsored Content
Operating Systems HP-UX Remove Faulty disk from HP-UX LVM VG Post 302597132 by Shirishlnx on Thursday 9th of February 2012 09:44:57 AM
Old 02-09-2012
No this is another set of server on which am testing the clone behaviors ..

Here what have did
# OS data alread in 1 mirrored state
# HAVE mirrored it to one more disk
# AND removed the third disk
# Then have run below script
Code:
# sh -x  lvmirr_b.sh
## cat lvmirr_b.sh
for i in 1 2 3 4 5 6 7 8 9
do
 # lvextend -m 1 /dev/vg00/lvol${i} /dev/dsk/c2t0d0    ## As have extended to  -m 2
 lvreduce -m 1 -A n -k  /dev/vg00/lvol${i} /dev/dsk/c2t0d0
done

# vgreduce -f  /dev/dsk/c2t0d0
# mv /etc/lvmtab /etc/lvmtab_9212
# vgscan -v 

### And now am getting above error 

### Below out for more desc..
 # lvdisplay -v /dev/vg00/lvol1
lvdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group
lvdisplay: Warning: couldn't query all of the physical volumes.
--- Logical volumes ---
LV Name                     /dev/vg00/lvol1
VG Name                     /dev/vg00
LV Permission               read/write
LV Status                   available/stale
Mirror copies               1
Consistency Recovery        MWC
Schedule                    parallel
LV Size (Mbytes)            504
Current LE                  63
Allocated PE                126
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/c2t2d0    63        63

   --- Logical extents ---
   LE    PV1                PE1   Status 1 PV2                PE2   Status 2
   00000 /dev/dsk/c2t2d0    00000 current  ???                00000 stale
   00001 /dev/dsk/c2t2d0    00001 current  ???                00001 stale
   00002 /dev/dsk/c2t2d0    00002 current  ???                00002 stale
.
.

--Shirish

Last edited by methyl; 02-09-2012 at 10:56 AM.. Reason: please use code tags
 

10 More Discussions You Might Find Interesting

1. HP-UX

disk adding through lvm

Hi dear(s) Can u explain how to add a disk through lvm with commands. I need to add a 9 gb scsi HS disk to a Hp D class 9000 server. (2 Replies)
Discussion started by: sreekumar.R
2 Replies

2. AIX

Removing Faulty Disk SSA

Hi Experts, I have configured A D40 Array. There is an faulty disk which is not part of an raid volume but shows fault in the diagnostics. pdisk15 U0.1-P1-I1/Q1-W40AA83CC2400D SSA160 Physical Disk Drive ( MB) Is there a way to stop this... (2 Replies)
Discussion started by: vuppala360
2 Replies

3. AIX

Disk I/O Issue using LVM

We have a filesystem which contains 8 hard disks but i am facing disk I/O issue becuase data is not spreading across all the disks.Is there any way i can check how data is spreading and any parameter we need to change to spread ata across all disks. OS--AIX 5.3 (1 Reply)
Discussion started by: ukatru
1 Replies

4. Solaris

Help with faulty Disk on Sun OS

Hi, Recently i came across a disk that seems to be faulty and need help. I have gathered some information by running below commands and any help on how to solve this will be great. # uname –a SunOS XYZ 5.7 Generic_106541-16 sun4u sparc SUNW,Ultra-4 #df -k Filesystem kbytes used... (3 Replies)
Discussion started by: phanidhar6039
3 Replies

5. HP-UX

Remove faulty disk LV from VG

Hi, Have mirrored the primary disk to 3 . Server and OS: # uname -a HP-UX pdwp1s B.11.11 U 9000/800 118434630 unlimited-user license # model 9000/800/L3000-7x # strings /etc/lvmtab /dev/vg00 +F@< /dev/dsk/c1t2d0 /dev/dsk/c2t2d0 /dev/dsk/c2t0d0 But now I have only 1 disk... (5 Replies)
Discussion started by: Shirishlnx
5 Replies

6. HP-UX

FAULTY DISK replacement HP rx4640

Hello, I'm new to this forum and as you will see from my question I'm new to UNIX as well. One of our costumers has HP rx4640 running on UNIX with two 300GB hot-swappable disks that are mirrored. They reported to us that one of the disks is faulty and they want us to take care of it. Below is... (16 Replies)
Discussion started by: gjk
16 Replies

7. Solaris

[solved] How to blink faulty disk in Solaris hardware?

Hi Guys, One of two disks in my solaris machine has failed, the name is disk0, this is SUN physical sparc machine But I work remotely, so people working near that physical server are not that technical, so from OS command prompt can run some command to bink faulty disk at front panel of Server.... (9 Replies)
Discussion started by: manalisharmabe
9 Replies

8. UNIX for Advanced & Expert Users

LVM - restore metadata on other disk

Hi guys, I would like to ask your opinion about my theory, how to fix my broken LVM without risking any data loss. I use Archlinux at home. I just love this distro, even it gives me a lots of work (particularly after system updates). Basic system spec: AMD FX(tm)-6100 Six-Core Processor... (1 Reply)
Discussion started by: lyynxxx
1 Replies

9. HP-UX

LVM: is possible to replace a disk?

Scenario1: VG00 lvm,not mirrored,2 disk of 36GB vg size VG00 size is under 30G. Is possible to remove a disk of 36GB and replace "on fly" with a disk of 300GB on VG00? Thanks (6 Replies)
Discussion started by: Linusolaradm1
6 Replies

10. UNIX for Beginners Questions & Answers

Show faulty shows PS1 faulty

I plugged both power cables in both power supply. When I unplugged each power cable one by one, the SPARC T4-1 machine keep running. However, show faulty command shows below message. (I have also attached the picture of both power supply) -> show faulty Target ... (1 Reply)
Discussion started by: z_haseeb
1 Replies
LVM(3pm)						User Contributed Perl Documentation						  LVM(3pm)

NAME
Linux::LVM - Perl extension for accessing Logical Volume Manager(LVM) data structures on Linux. SYNOPSIS
use Linux::LVM; Linux::LVM->units('G'); ABSTRACT
The live data used in the examples is included in the DESCRIPTION area for your convenience and reference. DESCRIPTION
units() Get or set the units used to report sizes of LVs, PVs, etc. legal values: hbskmgtpeHBSKMGTPE see man lvm documentation of --units get_volume_group_list() This routine will return an array that contains the names of the volume groups. @vgs = get_volume_group_list(); print "@vgs "; Would yield the following: vg00 get_volume_group_information($) This routine will return all of the volume group information about the specified volume group. %vg = get_volume_group_information("vg00"); foreach(sort keys %vg) { print "$_ = $vg{$_} "; } Would yield the following: access = read/write act_pv = 2 alloc_pe = 3840 alloc_pe_size = 15 alloc_pe_size_unit = GB cur_lv = 3 cur_pv = 2 free_pe = 864 free_pe_size = 3.38 free_pe_size_unit = GB max_lv = 256 max_lv_size = 255.99 max_lv_size_unit = GB max_pv = 256 open_lv = 0 pe_size = 4 pe_size_unit = MB status = available/resizable total_pe = 4704 uuid = BBq8si-NyRR-9ZNW-3J5e-DoRO-RBHK-ckrszi vg_number = 0 vg_size = 18.38 vg_size_unit = GB vgname = vg00 get_logical_volume_information($) This routine will return all of the logical volume information associated with the specified volume group. %lv = get_logical_volume_information("vg00"); foreach $lvname (sort keys %lv) { foreach(sort keys %{$lv{$lvname}}) { print "$_ = $lv{$lvname}->{$_} "; } print " "; } Would yield the following results: alloc_le = 1024 allocation = next free cur_le = 1024 device = 58:0 lv_number = 1 lv_size = 4 lv_size_unit = GB name = /dev/vg00/lvol1 open_lv = 0 read_ahead = 1024 status = available write_access = read/write alloc_le = 1280 allocation = next free cur_le = 1280 device = 58:1 lv_number = 2 lv_size = 5 lv_size_unit = GB name = /dev/vg00/lvol2 open_lv = 0 read_ahead = 1024 status = available write_access = read/write alloc_le = 1536 allocation = next free cur_le = 1536 device = 58:2 lv_number = 3 lv_size = 6 lv_size_unit = GB name = /dev/vg00/lvol3 open_lv = 0 read_ahead = 1024 status = available write_access = read/write get_physical_volume_information($) This routine will return all of the information information about the physical volumes assigned to the specified volume group. %pv = get_physical_volume_information("vg00"); foreach $pvname (sort keys %pv) { foreach(sort keys %{$pv{$pvname}}) { print "$_ = $pv{$pvname}->{$_} "; } print " "; } Would yield the following results: device = /dev/hda3 free_pe = 0 pv_number = 1 status = available / allocatable total_pe = 2160 device = /dev/hda4 free_pe = 864 pv_number = 2 status = available / allocatable total_pe = 2544 get_lv_info($) This routine will return all of the information about the specified logical volume. The information will be returned in a hash. get_lv_info %lv = get_lv_info("/dev/vg00/lvol1"); foreach (sort keys %lv) { print "$_ = $lv{$_} "; } Would yield the following results: access = read/write alloc_le = 1024 allocation = next free block_device = 58:0 current_le = 1024 lv_name = /dev/vg00/lvol1 lv_number = 1 lv_open = 0 read_ahead = 1024 size = 4 size_unit = GB status = available vg_name = vg00 get_pv_info($) This routine will return all of the information about the specified physical volume. The information will be returned in a hash. %pv = get_pv_info("/dev/hda3"); foreach (sort keys %pv) { print "$_ = $pv{$_} "; } Would yield the following results: alloc_pe = 2160 allocatable = yes (but full) free_pe = 0 num_lvols = 2 pe_size = 4096 pe_size_unit = KByte pv_name = /dev/hda3 pv_number = 1 sectors = 17703630 size = 8.44 size_info = NOT usable 4.19 MB [LVM: 136 KB] size_unit = GB status = available total_pe = 2160 uuid = 2c5ADu-oEdt-ovCe-rqp0-MWpF-I5u1-8XigH4 vg_name = vg00 Command Output Used In The Above Examples: /sbin/vgdisplay -v --- Volume group --- VG Name vg00 VG Access read/write VG Status available/resizable VG # 0 MAX LV 256 Cur LV 3 Open LV 0 MAX LV Size 255.99 GB Max PV 256 Cur PV 2 Act PV 2 VG Size 18.38 GB PE Size 4 MB Total PE 4704 Alloc PE / Size 3840 / 15 GB Free PE / Size 864 / 3.38 GB VG UUID BBq8si-NyRR-9ZNW-3J5e-DoRO-RBHK-ckrszi --- Logical volume --- LV Name /dev/vg00/lvol1 VG Name vg00 LV Write Access read/write LV Status available LV # 1 # open 0 LV Size 4 GB Current LE 1024 Allocated LE 1024 Allocation next free Read ahead sectors 1024 Block device 58:0 --- Logical volume --- LV Name /dev/vg00/lvol2 VG Name vg00 LV Write Access read/write LV Status available LV # 2 # open 0 LV Size 5 GB Current LE 1280 Allocated LE 1280 Allocation next free Read ahead sectors 1024 Block device 58:1 --- Logical volume --- LV Name /dev/vg00/lvol3 VG Name vg00 LV Write Access read/write LV Status available LV # 3 # open 0 LV Size 6 GB Current LE 1536 Allocated LE 1536 Allocation next free Read ahead sectors 1024 Block device 58:2 --- Physical volumes --- PV Name (#) /dev/hda3(1) PV Status available / allocatable Total PE / Free PE 2160 / 0 PV Name (#) /dev/hda4(2) PV Status available / allocatable Total PE / Free PE 2544 / 864 SEE ALSO
vgdisplay(1M) lvdisplay(1M) pvdisplay(1M) AUTHOR
Chad Kerner, <chadkerner@yahoo.com> COPYRIGHT AND LICENSE
Copyright 2003 by Chad Kerner This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-02-11 LVM(3pm)
All times are GMT -4. The time now is 08:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy