본문 바로가기
IT 이야기 - About IT

[HP-UX] stale시 해당 Block의 파일시스템 찾기

by 회사원 주씨 2008. 8. 4.
반응형

HLCAP1:/etc/ftpd]lvdisplay -v /dev/vg01/lvol1 | more
--- Logical volumes ---
LV Name                     /dev/vg01/lvol1
VG Name                     /dev/vg01
LV Permission               read/write  
LV Status                   available/syncd          
Mirror copies               1           
Consistency Recovery        MWC                
Schedule                    parallel    
LV Size (Mbytes)            20480          
Current LE                  640      
Allocated PE                1280       
Stripes                     0      
Stripe Size (Kbytes)        0                  
Bad block                   on          
Allocation                  strict                   
IO Timeout (Seconds)        default            

   --- Distribution of logical volume ---
   PV Name            LE on PV  PE on PV 
   /dev/dsk/c1t1d0    640       640      
   /dev/dsk/c5t1d0    640       640      

   --- Logical extents ---
   LE    PV1                PE1   Status 1 PV2                PE2   Status 2
   00000 /dev/dsk/c1t1d0    00000 current  /dev/dsk/c5t1d0    00000 current 
   00001 /dev/dsk/c1t1d0    00001 current  /dev/dsk/c5t1d0    00001 current 
   00002 /dev/dsk/c1t1d0    00002 current  /dev/dsk/c5t1d0    00002 current 
   00003 /dev/dsk/c1t1d0    00003 current  /dev/dsk/c5t1d0    00003 current 
   00004 /dev/dsk/c1t1d0    00004 current  /dev/dsk/c5t1d0    00004 current 
   00005 /dev/dsk/c1t1d0    00005 current  /dev/dsk/c5t1d0    00005 current 
   00006 /dev/dsk/c1t1d0    00006 current  /dev/dsk/c5t1d0    00006 current 
   00007 /dev/dsk/c1t1d0    00007 current  /dev/dsk/c5t1d0    00007 current 
   00008 /dev/dsk/c1t1d0    00008 current  /dev/dsk/c5t1d0    00008 current 
   00009 /dev/dsk/c1t1d0    00009 current  /dev/dsk/c5t1d0    00009 current 
   00010 /dev/dsk/c1t1d0    00010 current  /dev/dsk/c5t1d0    00010 stale 
   00011 /dev/dsk/c1t1d0    00011 current  /dev/dsk/c5t1d0    00011 current 
   00012 /dev/dsk/c1t1d0    00012 current  /dev/dsk/c5t1d0    00012 current 
   00013 /dev/dsk/c1t1d0    00013 current  /dev/dsk/c5t1d0    00013 current 



HLCAP1:/etc/ftpd]vgdisplay -v vg01
--- Volume groups ---
VG Name                     /dev/vg01
VG Write Access             read/write    
VG Status                   available                
Max LV                      255   
Cur LV                      7     
Open LV                     7     
Max PV                      16    
Cur PV                      2     
Act PV                      2     
Max PE per PV               4375        
VGDA                        4  
PE Size (Mbytes)            32             
Total PE                    8748   
Alloc PE                    2880   
Free PE                     5868   
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    


- PE Size : 32M
- stale block : PE1의 10번째에서 stale이 발생했다고 하면 10번째와 11번째 block 사이의 파일들이 대상이므로

- 계산법 : (32*1024)*10 = 327680
- 계산법 : (32*1024)*11 = 360448

> ncheck -F vxfs -o sector=327680-360448 /dev/vg01/lvol1

아래와 같이 list에 나오는 모든 파일들이 대상이다


HLCAP1:/etc/ftpd]ncheck -F vxfs -o sector=327680-360448 /dev/vg01/lvol1
/dev/vg01/lvol1:

sectors(32769)          blocks(32769)         
-----------------       -----------------     
0/327680-0/360448       0/327680-0/360448     

fileset    fset        match  match devid/       
name       indx  inode indx  inode sectors       name
---------- ---- ------ ---- ------ ------------- ------------------
UNNAMED     999   7953    -      - 0/327680-0/358895 /ora10g/lib/libttsh10.so
UNNAMED     999   7954    -      - 0/358912-0/359695 /ora10g/lib/libgx10.a
UNNAMED     999   7955    -      - 0/359744-0/359903 /ora10g/lib/libnid.a
UNNAMED     999   7956    -      - 0/359936-0/360295 /ora10g/lib/libplc10.a
UNNAMED     999   7957    -      - 0/360448      /ora10g/lib/libzx10.a
UNNAMED     999   7957    -      - 0/360320-0/360447 /ora10g/lib/libzx10.a
UNNAMED     999   9126    -      - 0/360296-0/360299 /ora10g/network/tools/help/ca/help_ko/local_naming.htm
UNNAMED     999   9139    -      - 0/360300-0/360303 /ora10g/network/tools/help/ca/help_ko/ops_cluster_configuration.htm
UNNAMED     999   9945    -      - 0/358896-0/358903 /ora10g/nls/data/lx200a4.nlb
UNNAMED     999   9946    -      - 0/358904-0/358910 /ora10g/nls/data/lx200a5.nlb
UNNAMED     999   9951    -      - 0/359696-0/359702 /ora10g/nls/data/lx200ac.nlb
UNNAMED     999   9952    -      - 0/359703-0/359709 /ora10g/nls/data/lx200ad.nlb
UNNAMED     999   9953    -      - 0/360304-0/360311 /ora10g/nls/data/lx200ae.nlb
UNNAMED     999   9954    -      - 0/360312-0/360319 /ora10g/nls/data/lx200af.nlb
UNNAMED     999   9955    -      - 0/359710-0/359715 /ora10g/nls/data/lx200b0.nlb
UNNAMED     999   9956    -      - 0/359733-0/359737 /ora10g/nls/data/lx200b1.nlb
UNNAMED     999   9956    -      - 0/359720-0/359727 /ora10g/nls/data/lx200b1.nlb
UNNAMED     999   9957    -      - 0/359728-0/359732 /ora10g/nls/data/lx200b2.nlb
UNNAMED     999   9959    -      - 0/359738-0/359743 /ora10g/nls/data/lx200b4.nlb
UNNAMED     999   9960    -      - 0/359904-0/359909 /ora10g/nls/data/lx200b5.nlb
UNNAMED     999   9961    -      - 0/359910-0/359914 /ora10g/nls/data/lx200b6.nlb
UNNAMED     999   9962    -      - 0/359915-0/359919 /ora10g/nls/data/lx200b7.nlb
UNNAMED     999   9963    -      - 0/359920-0/359925 /ora10g/nls/data/lx200b8.nlb
UNNAMED     999   9964    -      - 0/359926-0/359931 /ora10g/nls/data/lx200b9.nlb
UNNAMED     999  10088    -      - 0/359716-0/359719 /ora10g/nls/data/lx2035f.nlb
UNNAMED     999  10104    -      - 0/359932-0/359935 /ora10g/nls/data/lx203e6.nlb
UNNAMED     999  10234    -      - 0/358911      /ora10g/nls/lbuilder/lbuilder

HLCAP1:/oracle/ora10g/lib]bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    31457280 17791992 13559088   57% /
/dev/vg00/lvol1     512499  181257  279992   39% /stand
/dev/vg00/lvol10   25165824   22636 23571746    0% /var/adm/crash
/dev/vg01/lvol1    20971520 7414366 12710534   37% /oracle
/dev/vg01/lvol2    2097152  861125 1158825   43% /apps/tuxedo81
/dev/vg01/lvol11   2097152 1017841 1013682   50% /apps/server81
/dev/vg01/lvol3    4194304 3125380 1004816   76% /TEMP
/dev/vg01/lvol12   5242880 1763021 3262394   35% /NBUm
/dev/vg01/lvol14   2097152 1305479  742233   64% /EDI
/dev/vg01/lvol4    10485760 4353119 5749364   43% /users

조회한 block이 lvol1이고 bdf에서 보면 lvol1은 /oracle에 할당되어 있다.

UNNAMED     999   7953    -      - 0/327680-0/358895 /ora10g/lib/libttsh10.so
위에서 보면 파일의 경로가 /ora10g/lib/libttsh10.so로 되어 있는데,

lvol(/oracle)에 할당되어 있는 파일이기 때문에

실제 파일의 패스 앞에 /oracle이 들어간다.
예) /oracle/ora10g/lib/libttsh10.so

해당 파일이 있는 디렉토리로 이동한다음

> lsf

또는

> lsf /oracle/ora10g/lib/libttsh10.so

했을때, 정상적으로 파일이 보여지면 문제가 없는 것이다.

<정상적인 예>
HLCAP1:/etc/ftpd]lsf
ftp-exec/   ftpaccess   pids/

HLCAP1:/oracle/ora10g/lib]lsf /oracle/ora10g/lib/libttsh10.so
/oracle/ora10g/lib/libttsh10.so*

728x90