How to Verify
Whether a Disk Contains Data
You've
just added one new disk to an AIX logical partition (LPAR), and you're trying
to figure out why your new disk has a physical volume identifier
(PVID). A PVID indicates that the disk might either be a replicated disk, a
disk from an exported volume group,
or a new empty disk with a PVID that wasn't cleared previously. If the disk is
either of the first two types, it could have real data on it that you don't
want to overwrite.
# lspv
hdisk1          none                                None                        
hdisk2          none                                None                        
hdisk45         00c32b7788951e30                    rootvg          active      
hdisk4          none                                None                        
hdisk5          none                                None                        
hdisk42         00c32b7788951e30                    rootvg          active      
hdisk18         00c32b7788951e30                    rootvg          active      
hdisk31         none                                None                        
hdisk32         none                                None                        
hdisk15         00c32b7788951e30                    rootvg          active      
1>    Run
readvgda, The command output—specifically the readvgda_type value of : vg_type
—suggests that hdisk15 belongs to a volume group.
 # readvgda
-p hdisk15
.....    
.....    Thu Mar 20
17:31:34 EST:2014
.....    readvgda -p
hdisk15 
.....   
readvgda_file: /dev/rhdisk15
.....   
readvgda_type: vg_type: 0
.....   
readvgda_ver:  3
.....    
============= B: LVM REC 0x7 (0xe00) ============= 
lvm_id:         _LVM
vgid:          
00c32b7700004c000000013ef281e742
pv_num:         1
version:        34
pp_size:        27
ltg_shift:      0
lvmarea_len:   
00001074 (0020e800)
vgsa_psn[0]:   
00000080 (00010000)    
vgsa_len:       00000008
(00001000)
vgda_psn[0]:   
00000088 (00011000)    
vgda_len:       00000832
(00106400)
vgsa_psn[1]:   
000008ba (00117400)    
vgsa_len:       00000008
(00001000)
vgda_psn[1]:   
000008c2 (00118400)    
vgda_len:       00000832
(00106400)
reloc_psn:     
077ffeff (fffdfe00)    
reloc_len:      00000100
(00020000)
============= E: LVM REC =============
*********************************************************************
Or U ca n run lqueryvg command
*********************************************************************
# lqueryvg
-Atp hdisk15
Max LVs:        256
PP Size:        27
Free PPs:       31
PV count:       1
Total VGDAs:    2
Conc Allowed:   0
MAX PPs per PV: 1016
MAX PVs:        32
Quorum (disk):  1
Quorum (dd):    1
Auto Varyon ?:  1
Conc Autovaryon 0
Varied on Conc: 0
Logical:       
00c32b7700004c000000013ef281e742.1  
bos_hd5 1  
               
00c32b7700004c000000013ef281e742.2  
hd6 1  
               
00c32b7700004c000000013ef281e742.3  
hd8 1  
               
00c32b7700004c000000013ef281e742.4  
bos_hd4 1  
               
00c32b7700004c000000013ef281e742.5  
bos_hd2 1  
               
00c32b7700004c000000013ef281e742.6  
bos_hd9var 1  
               
00c32b7700004c000000013ef281e742.7  
hd3 1  
               
00c32b7700004c000000013ef281e742.8  
hd1 1  
               
00c32b7700004c000000013ef281e742.9  
bos_hd10opt 1  
               
00c32b7700004c000000013ef281e742.10 
hd11admin 1  
               
00c32b7700004c000000013ef281e742.11 
livedump 1  
               
00c32b7700004c000000013ef281e742.12 
hd12audit 1  
                00c32b7700004c000000013ef281e742.13  lg_dumplv 1 
               
00c32b7700004c000000013ef281e742.14 
osysadm 1  
               
00c32b7700004c000000013ef281e742.15 
voperf 1  
               
00c32b7700004c000000013ef281e742.16 
actmagent 1  
                00c32b7700004c000000013ef281e742.17  dump00 1 
               
00c32b7700004c000000013ef281e742.18 
nmon 1  
               
00c32b7700004c000000013ef281e742.19 
hd5 1  
               
00c32b7700004c000000013ef281e742.20 
hd4 1  
                00c32b7700004c000000013ef281e742.21  hd2 1  
               
00c32b7700004c000000013ef281e742.22 
hd9var 1  
               
00c32b7700004c000000013ef281e742.23 
hd10opt 1  
Physical:      
00c32b7788951e30               
2   0  
Total PPs:      479
LTG size:       128
HOT SPARE:      0
AUTO SYNC:      0
VG PERMISSION:  0
SNAPSHOT VG:    0
IS_PRIMARY VG:  0
PSNFSTPP:       4352
VARYON MODE:    0
VG Type:        0
Max PPs:        32512
Mirror Pool Str n
Sys Mgt Mode:   0
VG Reserved:    1
PV RESTRICTION: 0
Infinite Retry: 2
Disk Block Size 512
2> The command output below
suggests that hdisk31 doesn't belong to any volume group and is the empty disk
that I configured earlier using cfgmgr.
# readvgda -p hdisk31
Invalid lvm_rec!
00000E00   00000000 00000000 00000000 00000000  |................|
00000E10   00000000 00000000 00000000 00000000  |................|
00000E20   00000000 00000000 00000000 00000000  |................|
00000E30   00000000 00000000 00000000 00000000  |................|
00000E40   00000000 00000000 00000000 00000000  |................|
00000E50   00000000 00000000 00000000 00000000  |................|
00000E60   00000000 00000000 00000000 00000000  |................|
00000E70   00000000 00000000 00000000 00000000  |................|
00000E80   00000000 00000000 00000000 00000000  |................|
00000E90   00000000 00000000 00000000 00000000  |................|
00000EA0   00000000 00000000 00000000 00000000  |................|
00000EB0   00000000 00000000 00000000 00000000  |................|
00000EC0   00000000 00000000 00000000 00000000  |................|
00000ED0   00000000 00000000 00000000 00000000  |................|
00000EE0   00000000 00000000 00000000 00000000  |................|
00000EF0   00000000 00000000 00000000 00000000  |................|
read_lvm_rec had an error, exiting
************************************************************
Or u can run lqueryvg command
************************************************************
# lqueryvg -Atp hdisk31
0516-1396 lqueryvg: The physical
volume hdisk31, was not found in the
system database.
0516-066 lqueryvg: Physical volume
is not a volume group member.
        Check the physical volume name
specified.
************************************************************
Or to use lspv command with the -l option to list the
physical volume hdisk1. The output shows the names of all the logical volumes
on the physical volume, the number of physical and logical partitions
allocated, the distribution across the physical volume, and the mount point if
one exists.
*************************************************************
# lspv -l hdisk31
0516-304 : Unable to find device id
00000000000000000000000000000000 in the Device Configuration Database.
 
No comments:
Post a Comment