IA/System Admin

HP SnA 4일차 오후 - M10. Managing Locical Volumes and File Systems

kiostory 2012. 6. 21. 14:39

# sleep 120
Quit(coredump)

--> quit (ctrl+\) : core dump created

 

root@rx233   [/root]
# ls -al
total 816
drwx------   3 root       sys           8192 Jun 21 14:36 .
drwxr-xr-x  15 root       root          8192 Jun 21 14:12 ..
-rw-r--r--   1 root       sys             20 Jun 19 13:38 .exrc
-rw-------   1 root       sys           1113 Jun 15 18:57 .profile
-rw-------   1 root       root            24 Jun 15 18:57 .rhosts
-rw-------   1 root       sys           8902 Jun 21 14:36 .sh_history
-rw-------   1 root       sys            100 Jun 15 18:57 .shrc
drwx------   6 root       sys             96 Jun 15 18:05 .sw
-rw-------   1 root       sys         284848 Jun 21 14:36 core
-rw-r--r--   1 root       sys            412 Jun 21 11:03 cp.err
prw-r--r--   1 root       sys              0 Jun 19 17:18 kio

root@rx233   [/root]


# strings core
04:Unable to find library '/usr/lib/nls/loc/hpux32/locales.3/C'.

root@rx233   [/root]


# stty -a
speed 9600 baud; line = 0;
rows = 0; columns = 0
min = 4; time = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^D; eol = ^@; eol2 = ^@; swtch = ^@
stop = ^S; start = ^Q; susp = ^Z; dsusp <undef>
werase <undef>; lnext <undef>
-parenb -parodd cs8 -cstopb -hupcl cread clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3

 

* Defragmenting File system

# fsadm -F vxfs -DE /home

  Directory Fragmentation Report
             Dirs        Total      Immed    Immeds   Dirs to   Blocks to
             Searched    Blocks     Dirs     to Add   Reduce    Reduce
  total            39         3        36         1         1           1

  Extent Fragmentation Report
        Total    Average      Average     Total
        Files    File Blks    # Extents   Free Blks
          121           1           1      144725
    blocks used for indirects: 0
    % Free blocks in extents smaller than 64 blks: 0.01
    % Free blocks in extents smaller than  8 blks: 0.00
    % blks allocated to extents 64 blks or larger: 0.00
    Free Extents By Size
           1:          1            2:          0            4:          1  
           8:          0           16:          1           32:          0  
          64:          1          128:          2          256:          2  
         512:          1         1024:          0         2048:          0  
        4096:          1         8192:          1        16384:          2  
       32768:          1        65536:          1       131072:          0  
      262144:          0       524288:          0      1048576:          0  
     2097152:          0      4194304:          0      8388608:          0  
    16777216:          0     33554432:          0     67108864:          0  
   134217728:          0    268435456:          0    536870912:          0  
  1073741824:          0   2147483648:          0  


root@rx233   [/root]
# fsadm -DE /home       
fsadm: /etc/default/fs is used for determining the file system type

  Directory Fragmentation Report
             Dirs        Total      Immed    Immeds   Dirs to   Blocks to
             Searched    Blocks     Dirs     to Add   Reduce    Reduce
  total            39         3        36         1         1           1

  Extent Fragmentation Report
        Total    Average      Average     Total
        Files    File Blks    # Extents   Free Blks
          121           1           1      144725
    blocks used for indirects: 0
    % Free blocks in extents smaller than 64 blks: 0.01
    % Free blocks in extents smaller than  8 blks: 0.00
    % blks allocated to extents 64 blks or larger: 0.00
    Free Extents By Size
           1:          1            2:          0            4:          1  
           8:          0           16:          1           32:          0  
          64:          1          128:          2          256:          2  
         512:          1         1024:          0         2048:          0  
        4096:          1         8192:          1        16384:          2  
       32768:          1        65536:          1       131072:          0  
      262144:          0       524288:          0      1048576:          0  
     2097152:          0      4194304:          0      8388608:          0  
    16777216:          0     33554432:          0     67108864:          0  
   134217728:          0    268435456:          0    536870912:          0  
  1073741824:          0   2147483648:          0  


root@rx233   [/root]
# fsadm -DEde -t 30 /home
fsadm: /etc/default/fs is used for determining the file system type

  Directory Fragmentation Report
             Dirs        Total      Immed    Immeds   Dirs to   Blocks to
             Searched    Blocks     Dirs     to Add   Reduce    Reduce
  total            39         3        36         1         1           1

  Extent Fragmentation Report
        Total    Average      Average     Total
        Files    File Blks    # Extents   Free Blks
          121           1           1      144725
    blocks used for indirects: 0
    % Free blocks in extents smaller than 64 blks: 0.01
    % Free blocks in extents smaller than  8 blks: 0.00
    % blks allocated to extents 64 blks or larger: 0.00
    Free Extents By Size
           1:          1            2:          0            4:          1  
           8:          0           16:          1           32:          0  
          64:          1          128:          2          256:          2  
         512:          1         1024:          0         2048:          0  
        4096:          1         8192:          1        16384:          2  
       32768:          1        65536:          1       131072:          0  
      262144:          0       524288:          0      1048576:          0  
     2097152:          0      4194304:          0      8388608:          0  
    16777216:          0     33554432:          0     67108864:          0  
   134217728:          0    268435456:          0    536870912:          0  
  1073741824:          0   2147483648:          0  


  Directory Fragmentation Report
             Dirs        Total      Immed    Immeds   Dirs to   Blocks to
             Searched    Blocks     Dirs     to Add   Reduce    Reduce
  total            39         3        36         1         1           1

  Extent Fragmentation Report
        Total    Average      Average     Total
        Files    File Blks    # Extents   Free Blks
          121           1           1      144725
    blocks used for indirects: 0
    % Free blocks in extents smaller than 64 blks: 0.06
    % Free blocks in extents smaller than  8 blks: 0.01
    % blks allocated to extents 64 blks or larger: 0.00
    Free Extents By Size
           1:          3            2:          1            4:          2  
           8:          1           16:          2           32:          1  
          64:          2          128:          3          256:          3  
         512:          2         1024:          1         2048:          1  
        4096:          2         8192:          2        16384:          1  
       32768:          1        65536:          1       131072:          0  
      262144:          0       524288:          0      1048576:          0  
     2097152:          0      4194304:          0      8388608:          0  
    16777216:          0     33554432:          0     67108864:          0  
   134217728:          0    268435456:          0    536870912:          0  
  1073741824:          0   2147483648:          0  


root@rx233   [/root]

 

 

* Repairing Corrupted F/S

# umount /home

root@rx233   [/root]
# fsck -F vxfs /dev/vg00/lvol4
file system is clean - log replay is not required

root@rx233   [/root]
# mount /home

root@rx233   [/root]

 

 

 

* lv제거 후 pv,vg삭제

# vgdisplay -v
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write    
VG Status                   available                
Max LV                      255   
Cur LV                      8     
Open LV                     8     
Max PV                      16    
Cur PV                      1     
Act PV                      1     
Max PE per PV               4238        
VGDA                        2  
PE Size (Mbytes)            8              
Total PE                    4228   
Alloc PE                    3474   
Free PE                     754    
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  1.0      
VG Max Size                 542464m   
VG Max Extents              67808        

   --- Logical volumes ---
   LV Name                     /dev/vg00/lvol1
   LV Status                   available/syncd          
   LV Size (Mbytes)            1792           
   Current LE                  224      
   Allocated PE                224        
   Used PV                     1      

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

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

   LV Name                     /dev/vg00/lvol4
   LV Status                   available/syncd          
   LV Size (Mbytes)            1152           
   Current LE                  144      
   Allocated PE                144        
   Used PV                     1      

   LV Name                     /dev/vg00/lvol5
   LV Status                   available/syncd          
   LV Size (Mbytes)            10472          
   Current LE                  1309     
   Allocated PE                1309       
   Used PV                     1      

   LV Name                     /dev/vg00/lvol6
   LV Status                   available/syncd          
   LV Size (Mbytes)            1152           
   Current LE                  144      
   Allocated PE                144        
   Used PV                     1      

   LV Name                     /dev/vg00/lvol7
   LV Status                   available/syncd          
   LV Size (Mbytes)            6696           
   Current LE                  837      
   Allocated PE                837        
   Used PV                     1      

   LV Name                     /dev/vg00/lvol8
   LV Status                   available/syncd          
   LV Size (Mbytes)            4480           
   Current LE                  560      
   Allocated PE                560        
   Used PV                     1      


   --- Physical volumes ---
   PV Name                     /dev/disk/disk2_p2
   PV Status                   available               
   Total PE                    4228   
   Free PE                     754    
   Autoswitch                  on       
   Proactive Polling           on              


--- Volume groups ---
VG Name                     /dev/vg01
VG Write Access             read/write    
VG Status                   available                
Max LV                      2047  
Cur LV                      2     
Open LV                     2     
Cur Snapshot LV             0             
Max PV                      2048  
Cur PV                      1     
Act PV                      1     
Max PE per PV               262144        
VGDA                        2  
PE Size (Mbytes)            4              
Unshare unit size (Kbytes)  1024                     
Total PE                    8680          
Alloc PE                    16            
Current pre-allocated PE    0                      
Free PE                     8664          
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  2.2      
VG Max Size                 1t        
VG Max Extents              262144        
Cur Snapshot Capacity       0p                  
Max Snapshot Capacity       1t                  

   --- Logical volumes ---
   LV Name                     /dev/vg01/swapvol
   LV Status                   available/syncd          
   LV Size (Mbytes)            32             
   Current LE                  8             
   Allocated PE                8             
   Used PV                     1      

   LV Name                     /dev/vg01/datavol
   LV Status                   available/syncd          
   LV Size (Mbytes)            32             
   Current LE                  8             
   Allocated PE                8             
   Used PV                     1      


   --- Physical volumes ---
   PV Name                     /dev/disk/disk3
   PV Status                   available               
   Total PE                    8680          
   Free PE                     8664          
   Current pre-allocated PE    0                      
   Autoswitch                  on       
   Proactive Polling           on              

 

 

root@rx233   [/home]
# lvremove /dev/vg01/swapvol                
The logical volume "/dev/vg01/swapvol" is not empty;
do you really want to delete the logical volume (y/n) : y
Logical volume "/dev/vg01/swapvol" has been successfully removed.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

root@rx233   [/home]
# vgdisplay -v vg01        
--- Volume groups ---
VG Name                     /dev/vg01
VG Write Access             read/write    
VG Status                   available                
Max LV                      2047  
Cur LV                      1     
Open LV                     1     
Cur Snapshot LV             0             
Max PV                      2048  
Cur PV                      1     
Act PV                      1     
Max PE per PV               262144        
VGDA                        2  
PE Size (Mbytes)            4              
Unshare unit size (Kbytes)  1024                     
Total PE                    8680          
Alloc PE                    8             
Current pre-allocated PE    0                      
Free PE                     8672          
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  2.2      
VG Max Size                 1t        
VG Max Extents              262144        
Cur Snapshot Capacity       0p                  
Max Snapshot Capacity       1t                  

   --- Logical volumes ---
   LV Name                     /dev/vg01/datavol
   LV Status                   available/syncd          
   LV Size (Mbytes)            32             
   Current LE                  8             
   Allocated PE                8             
   Used PV                     1      


   --- Physical volumes ---
   PV Name                     /dev/disk/disk3
   PV Status                   available               
   Total PE                    8680          
   Free PE                     8672          
   Current pre-allocated PE    0                      
   Autoswitch                  on       
   Proactive Polling           on              

 

root@rx233   [/home]
# lvremove /dev/vg01/datavol
The logical volume "/dev/vg01/datavol" is not empty;
do you really want to delete the logical volume (y/n) : y
Logical volume "/dev/vg01/datavol" has been successfully removed.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

root@rx233   [/home]
#

root@rx233   [/home]
# vgdisplay -v vg01        
--- Volume groups ---
VG Name                     /dev/vg01
VG Write Access             read/write    
VG Status                   available                
Max LV                      2047  
Cur LV                      0     
Open LV                     0     
Cur Snapshot LV             0             
Max PV                      2048  
Cur PV                      1     
Act PV                      1     
Max PE per PV               262144        
VGDA                        2  
PE Size (Mbytes)            4              
Unshare unit size (Kbytes)  1024                     
Total PE                    8680          
Alloc PE                    0             
Current pre-allocated PE    0                      
Free PE                     8680          
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  2.2      
VG Max Size                 1t        
VG Max Extents              262144        
Cur Snapshot Capacity       0p                  
Max Snapshot Capacity       1t                  


   --- Physical volumes ---
   PV Name                     /dev/disk/disk3
   PV Status                   available               
   Total PE                    8680          
   Free PE                     8680          
   Current pre-allocated PE    0                      
   Autoswitch                  on       
   Proactive Polling           on              

 

root@rx233   [/home]
# vgremove -X vg01
Volume group "vg01" has been successfully removed.

 

root@rx233   [/home]
# vgdisplay -v vg01
vgdisplay: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab" file.
vgdisplay: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab_p" file.
vgdisplay: Cannot display volume group "vg01".

root@rx233   [/home]
# pvdisplay -v /dev/disk/disk3
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/disk/disk3" belongs.
pvdisplay: Cannot display physical volume "/dev/disk/disk3".

root@rx233   [/home]
# ioscan -fnNC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      2  64000/0xfa00/0x0  esdisk   CLAIMED     DEVICE       HP 36.4GMAU3036NC
                      /dev/disk/disk2      /dev/disk/disk2_p2   /dev/rdisk/disk2     /dev/rdisk/disk2_p2
                      /dev/disk/disk2_p1   /dev/disk/disk2_p3   /dev/rdisk/disk2_p1  /dev/rdisk/disk2_p3
disk      3  64000/0xfa00/0x1  esdisk   CLAIMED     DEVICE       HP 36.4GMAU3036NC
                      /dev/disk/disk3   /dev/rdisk/disk3

root@rx233   [/home]
# lvmadm -l
--- Version 1.0 volume groups ---
VG Name /dev/vg00
PV Name /dev/disk/disk2_p2


root@rx233   [/home]
# pvremove /dev/rdisk/disk3
The physical volume associated with "/dev/rdisk/disk3" has been removed.

root@rx233   [/home]
# ioscan -fnNC disk       
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      2  64000/0xfa00/0x0  esdisk   CLAIMED     DEVICE       HP 36.4GMAU3036NC
                      /dev/disk/disk2      /dev/disk/disk2_p2   /dev/rdisk/disk2     /dev/rdisk/disk2_p2
                      /dev/disk/disk2_p1   /dev/disk/disk2_p3   /dev/rdisk/disk2_p1  /dev/rdisk/disk2_p3
disk      3  64000/0xfa00/0x1  esdisk   CLAIMED     DEVICE       HP 36.4GMAU3036NC
                      /dev/disk/disk3   /dev/rdisk/disk3

root@rx233   [/home]
# ll /dev/*disk/*
brw-r-----   1 bin        sys          1 0x000000 Jun 15 17:57 /dev/disk/disk2
brw-r-----   1 bin        sys          1 0x000002 Jun 15 18:23 /dev/disk/disk2_p1
brw-r-----   1 bin        sys          1 0x000003 Jun 15 17:57 /dev/disk/disk2_p2
brw-r-----   1 bin        sys          1 0x000004 Jun 15 17:57 /dev/disk/disk2_p3
brw-r-----   1 bin        sys          1 0x000001 Jun 20 12:55 /dev/disk/disk3
crw-r-----   1 bin        sys         13 0x000000 Jun 15 17:57 /dev/rdisk/disk2
crw-r-----   1 bin        sys         13 0x000002 Jun 15 17:57 /dev/rdisk/disk2_p1
crw-r-----   1 bin        sys         13 0x000003 Jun 15 17:57 /dev/rdisk/disk2_p2
crw-r-----   1 bin        sys         13 0x000004 Jun 15 17:57 /dev/rdisk/disk2_p3
crw-r-----   1 bin        sys         13 0x000001 Jun 21 15:20 /dev/rdisk/disk3

root@rx233   [/home]
#
# vgdisplay
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write    
VG Status                   available                
Max LV                      255   
Cur LV                      8     
Open LV                     8     
Max PV                      16    
Cur PV                      1     
Act PV                      1     
Max PE per PV               4238        
VGDA                        2  
PE Size (Mbytes)            8              
Total PE                    4228   
Alloc PE                    3474   
Free PE                     754    
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  1.0      
VG Max Size                 542464m   
VG Max Extents              67808        

# lvmadm -l
--- Version 1.0 volume groups ---
VG Name /dev/vg00
PV Name /dev/disk/disk2_p2

 

 

 

 

* 파일시스템 풀의 경우 해결절차

# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  265832  776752   25% /
/dev/vg00/lvol1    1835008  190792 1631456   10% /stand
/dev/vg00/lvol8    4587520  462280 4100528   10% /var
/dev/vg00/lvol7    6856704 3225160 3603248   47% /usr
/dev/vg00/lvol6    1179648   20840 1149760    2% /tmp
/dev/vg00/lvol5    10723328 5690976 4993104   53% /opt
/dev/vg00/lvol4    1179648 1179648       0  100% /home

 

# cp /stand/vmunix /home

vxfs: msgcnt 6 mesg 001: V-2-1: vx_nospace - /dev/vg00/lvol4 file system full (128 block extent)cp: bad copy to /home/vmunix: write: No space left on device

root@rx233   [/labs]

 


# tail /var/adm/syslog/syslog.log
Jun 21 15:18:42 rx233 LVM[5651]: Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
Jun 21 15:19:09 rx233 vmunix: LVM: VG 128 0x000000: Flushing the deferred attach list.
Jun 21 15:19:09 rx233 LVM[5743]: vgremove -X vg01
Jun 21 15:20:16 rx233 LVM[5810]: lvmadm -l
Jun 21 15:20:29 rx233 LVM[5811]: pvremove /dev/rdisk/disk3
Jun 21 15:22:28 rx233 telnetd[5855]: getpid: peer died: Error 0
Jun 21 15:23:12 rx233 LVM[5862]: lvmadm -l
Jun 21 15:35:09 rx233 vmunix: vxfs: NOTICE: msgcnt 1 mesg 001: V-2-1: vx_nospace - /dev/vg00/lvol4 file system full (64 block extent)
Jun 21 15:35:17 rx233 vmunix: vxfs: NOTICE: msgcnt 3 mesg 001: V-2-1: vx_nospace - /dev/vg00/lvol4 file system full (8 block extent)
Jun 21 15:55:34 rx233 vmunix: vxfs: NOTICE: msgcnt 5 mesg 001: V-2-1: vx_nospace - /dev/vg00/lvol4 file system full (128 block extent)

 

# find /home/ -name core
/home/user5/core

root@rx233   [/labs]
# rm /home/user5/core

root@rx233   [/labs]
#

root@rx233   [/labs]
# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  265576  777008   25% /
/dev/vg00/lvol1    1835008  190792 1631456   10% /stand
/dev/vg00/lvol8    4587520  462328 4100472   10% /var
/dev/vg00/lvol7    6856704 3225160 3603248   47% /usr
/dev/vg00/lvol6    1179648   20840 1149760    2% /tmp
/dev/vg00/lvol5    10723328 5690976 4993104   53% /opt
/dev/vg00/lvol4    1179648 1179568      80  100% /home

 

 

*vg 늘리기 전에 기본값 확인

# vgdisplay vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write    
VG Status                   available                
Max LV                      255   
Cur LV                      8     
Open LV                     8     
Max PV                      16    
Cur PV                      1     
Act PV                      1     
Max PE per PV               4238        
VGDA                        2  
PE Size (Mbytes)            8              
Total PE                    4228   
Alloc PE                    3474   
Free PE                     754    
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  1.0      
VG Max Size                 542464m   
VG Max Extents              67808        

 

 

# pvcreate -f /dev/rdisk/disk3
Physical volume "/dev/rdisk/disk3" has been successfully created.

 

 

# vgextend vg00 /dev/disk/disk3
vgextend: Warning: Max_PE_per_PV for the volume group (4238) too small for this PV (4341).
         Using only 4238 PEs from this physical volume.
Volume group "vg00" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

 

 

# vgdisplay vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write    
VG Status                   available                
Max LV                      255   
Cur LV                      8     
Open LV                     8     
Max PV                      16    
Cur PV                      2     
Act PV                      2     
Max PE per PV               4238        
VGDA                        4  
PE Size (Mbytes)            8              
Total PE                    8466   
Alloc PE                    3474   
Free PE                     4992   
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  1.0      
VG Max Size                 542464m   
VG Max Extents              67808        

 

# lvdisplay /dev/vg00/lvol4
--- Logical volumes ---
LV Name                     /dev/vg00/lvol4
VG Name                     /dev/vg00
LV Permission               read/write               
LV Status                   available/syncd          
Mirror copies               0           
Consistency Recovery        MWC                
Schedule                    parallel     
LV Size (Mbytes)            1152           
Current LE                  144      
Allocated PE                144        
Stripes                     0      
Stripe Size (Kbytes)        0                  
Bad block                   on          
Allocation                  strict                   
IO Timeout (Seconds)        default            


root@rx233   [/labs]
#

root@rx233   [/labs]
# lvdisplay -v /dev/vg00/lvol4
--- Logical volumes ---
LV Name                     /dev/vg00/lvol4
VG Name                     /dev/vg00
LV Permission               read/write               
LV Status                   available/syncd          
Mirror copies               0           
Consistency Recovery        MWC                
Schedule                    parallel     
LV Size (Mbytes)            1152           
Current LE                  144      
Allocated PE                144   
     
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/disk/disk2_p2      144       144      

   --- Logical extents ---
   LE    PV1                     PE1   Status 1
   00000 /dev/disk/disk2_p2      00480 current 
   00001 /dev/disk/disk2_p2      00481 current 
   00002 /dev/disk/disk2_p2      00482 current 
   00003 /dev/disk/disk2_p2      00483 current 
   00004 /dev/disk/disk2_p2      00484 current 
   00005 /dev/disk/disk2_p2      00485 current 
   00006 /dev/disk/disk2_p2      00486 current 
   00007 /dev/disk/disk2_p2      00487 current 
   00008 /dev/disk/disk2_p2      00488 current 
   00009 /dev/disk/disk2_p2      00489 current 
   00010 /dev/disk/disk2_p2      00490 current 
   00011 /dev/disk/disk2_p2      00491 current 
   00012 /dev/disk/disk2_p2      00492 current 
   00013 /dev/disk/disk2_p2      00493 current 
   00014 /dev/disk/disk2_p2      00494 current 
   00015 /dev/disk/disk2_p2      00495 current 
   00016 /dev/disk/disk2_p2      00496 current 
   00017 /dev/disk/disk2_p2      00497 current 
   00018 /dev/disk/disk2_p2      00498 current 
   00019 /dev/disk/disk2_p2      00499 current 
   00020 /dev/disk/disk2_p2      00500 current 
   00021 /dev/disk/disk2_p2      00501 current 
   00022 /dev/disk/disk2_p2      00502 current 
   00023 /dev/disk/disk2_p2      00503 current 
   00024 /dev/disk/disk2_p2      00504 current 
   00025 /dev/disk/disk2_p2      00505 current 
   00026 /dev/disk/disk2_p2      00506 current 
   00027 /dev/disk/disk2_p2      00507 current 
   00028 /dev/disk/disk2_p2      00508 current 
   00029 /dev/disk/disk2_p2      00509 current 
   00030 /dev/disk/disk2_p2      00510 current 
   00031 /dev/disk/disk2_p2      00511 current 
   00032 /dev/disk/disk2_p2      00512 current 
   00033 /dev/disk/disk2_p2      00513 current 
   00034 /dev/disk/disk2_p2      00514 current 
   00035 /dev/disk/disk2_p2      00515 current 
   00036 /dev/disk/disk2_p2      00516 current 
   00037 /dev/disk/disk2_p2      00517 current 
   00038 /dev/disk/disk2_p2      00518 current 
   00039 /dev/disk/disk2_p2      00519 current 
   00040 /dev/disk/disk2_p2      00520 current 
   00041 /dev/disk/disk2_p2      00521 current 
   00042 /dev/disk/disk2_p2      00522 current 
   00043 /dev/disk/disk2_p2      00523 current 
   00044 /dev/disk/disk2_p2      00524 current 
   00045 /dev/disk/disk2_p2      00525 current 
   00046 /dev/disk/disk2_p2      00526 current 
   00047 /dev/disk/disk2_p2      00527 current 
   00048 /dev/disk/disk2_p2      00528 current 
   00049 /dev/disk/disk2_p2      00529 current 
   00050 /dev/disk/disk2_p2      00530 current 
   00051 /dev/disk/disk2_p2      00531 current 
   00052 /dev/disk/disk2_p2      00532 current 
   00053 /dev/disk/disk2_p2      00533 current 
   00054 /dev/disk/disk2_p2      00534 current 
   00055 /dev/disk/disk2_p2      00535 current 
   00056 /dev/disk/disk2_p2      00536 current 
   00057 /dev/disk/disk2_p2      00537 current 
   00058 /dev/disk/disk2_p2      00538 current 
   00059 /dev/disk/disk2_p2      00539 current 
   00060 /dev/disk/disk2_p2      00540 current 
   00061 /dev/disk/disk2_p2      00541 current 
   00062 /dev/disk/disk2_p2      00542 current 
   00063 /dev/disk/disk2_p2      00543 current 
   00064 /dev/disk/disk2_p2      00544 current 
   00065 /dev/disk/disk2_p2      00545 current 
   00066 /dev/disk/disk2_p2      00546 current 
   00067 /dev/disk/disk2_p2      00547 current 
   00068 /dev/disk/disk2_p2      00548 current 
   00069 /dev/disk/disk2_p2      00549 current 
   00070 /dev/disk/disk2_p2      00550 current 
   00071 /dev/disk/disk2_p2      00551 current 
   00072 /dev/disk/disk2_p2      00552 current 
   00073 /dev/disk/disk2_p2      00553 current 
   00074 /dev/disk/disk2_p2      00554 current 
   00075 /dev/disk/disk2_p2      00555 current 
   00076 /dev/disk/disk2_p2      00556 current 
   00077 /dev/disk/disk2_p2      00557 current 
   00078 /dev/disk/disk2_p2      00558 current 
   00079 /dev/disk/disk2_p2      00559 current 
   00080 /dev/disk/disk2_p2      00560 current 
   00081 /dev/disk/disk2_p2      00561 current 
   00082 /dev/disk/disk2_p2      00562 current 
   00083 /dev/disk/disk2_p2      00563 current 
   00084 /dev/disk/disk2_p2      00564 current 
   00085 /dev/disk/disk2_p2      00565 current 
   00086 /dev/disk/disk2_p2      00566 current 
   00087 /dev/disk/disk2_p2      00567 current 
   00088 /dev/disk/disk2_p2      00568 current 
   00089 /dev/disk/disk2_p2      00569 current 
   00090 /dev/disk/disk2_p2      00570 current 
   00091 /dev/disk/disk2_p2      00571 current 
   00092 /dev/disk/disk2_p2      00572 current 
   00093 /dev/disk/disk2_p2      00573 current 
   00094 /dev/disk/disk2_p2      00574 current 
   00095 /dev/disk/disk2_p2      00575 current 
   00096 /dev/disk/disk2_p2      00576 current 
   00097 /dev/disk/disk2_p2      00577 current 
   00098 /dev/disk/disk2_p2      00578 current 
   00099 /dev/disk/disk2_p2      00579 current 
   00100 /dev/disk/disk2_p2      00580 current 
   00101 /dev/disk/disk2_p2      00581 current 
   00102 /dev/disk/disk2_p2      00582 current 
   00103 /dev/disk/disk2_p2      00583 current 
   00104 /dev/disk/disk2_p2      00584 current 
   00105 /dev/disk/disk2_p2      00585 current 
   00106 /dev/disk/disk2_p2      00586 current 
   00107 /dev/disk/disk2_p2      00587 current 
   00108 /dev/disk/disk2_p2      00588 current 
   00109 /dev/disk/disk2_p2      00589 current 
   00110 /dev/disk/disk2_p2      00590 current 
   00111 /dev/disk/disk2_p2      00591 current 
   00112 /dev/disk/disk2_p2      00592 current 
   00113 /dev/disk/disk2_p2      00593 current 
   00114 /dev/disk/disk2_p2      00594 current 
   00115 /dev/disk/disk2_p2      00595 current 
   00116 /dev/disk/disk2_p2      00596 current 
   00117 /dev/disk/disk2_p2      00597 current 
   00118 /dev/disk/disk2_p2      00598 current 
   00119 /dev/disk/disk2_p2      00599 current 
   00120 /dev/disk/disk2_p2      00600 current 
   00121 /dev/disk/disk2_p2      00601 current 
   00122 /dev/disk/disk2_p2      00602 current 
   00123 /dev/disk/disk2_p2      00603 current 
   00124 /dev/disk/disk2_p2      00604 current 
   00125 /dev/disk/disk2_p2      00605 current 
   00126 /dev/disk/disk2_p2      00606 current 
   00127 /dev/disk/disk2_p2      00607 current 
   00128 /dev/disk/disk2_p2      00608 current 
   00129 /dev/disk/disk2_p2      00609 current 
   00130 /dev/disk/disk2_p2      00610 current 
   00131 /dev/disk/disk2_p2      00611 current 
   00132 /dev/disk/disk2_p2      00612 current 
   00133 /dev/disk/disk2_p2      00613 current 
   00134 /dev/disk/disk2_p2      00614 current 
   00135 /dev/disk/disk2_p2      00615 current 
   00136 /dev/disk/disk2_p2      00616 current 
   00137 /dev/disk/disk2_p2      00617 current 
   00138 /dev/disk/disk2_p2      00618 current 
   00139 /dev/disk/disk2_p2      00619 current 
   00140 /dev/disk/disk2_p2      00620 current 
   00141 /dev/disk/disk2_p2      00621 current 
   00142 /dev/disk/disk2_p2      00622 current 
   00143 /dev/disk/disk2_p2      00623 current 

--> free없음

 

 

# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  265896  776688   26% /
/dev/vg00/lvol1    1835008  190792 1631456   10% /stand
/dev/vg00/lvol8    4587520  462352 4100440   10% /var
/dev/vg00/lvol7    6856704 3225160 3603248   47% /usr
/dev/vg00/lvol6    1179648   20840 1149760    2% /tmp
/dev/vg00/lvol5    10723328 5690976 4993104   53% /opt
/dev/vg00/lvol4    1179648 1179568      80  100% /home

root@rx233   [/labs]
# fsadm -b 1200m /home  --> lv늘리지 않고 fs를 바로 늘려보았으나 실패
fsadm: /etc/default/fs is used for determining the file system type
UX:vxfs fsadm: ERROR: V-3-25811: cannot expand /dev/vg00/rlvol4 more than size of the underlying device - 1179648 sectors

root@rx233   [/labs]
#

root@rx233   [/labs]
# lvextend -L 1216 /dev/vg00/lvol4
Logical volume "/dev/vg00/lvol4" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

 

*  온라인 JFS가 없을경우 umount후 extendfs를 통해 fs를 늘리고 다시 마운트

# umount /home

root@rx233   [/labs]
# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  265912  776672   26% /
/dev/vg00/lvol1    1835008  190792 1631456   10% /stand
/dev/vg00/lvol8    4587520  462360 4100432   10% /var
/dev/vg00/lvol7    6856704 3225160 3603248   47% /usr
/dev/vg00/lvol6    1179648   20840 1149760    2% /tmp
/dev/vg00/lvol5    10723328 5690976 4993104   53% /opt

root@rx233   [/labs]
#

root@rx233   [/labs]
# extendfs /dev/vg00/rlvol4

root@rx233   [/labs]
# mount /home

root@rx233   [/labs]
# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  265912  776672   26% /
/dev/vg00/lvol1    1835008  190792 1631456   10% /stand
/dev/vg00/lvol8    4587520  462368 4100424   10% /var
/dev/vg00/lvol7    6856704 3225160 3603248   47% /usr
/dev/vg00/lvol6    1179648   20840 1149760    2% /tmp
/dev/vg00/lvol5    10723328 5690976 4993104   53% /opt
/dev/vg00/lvol4    1245184 1179576   65152   95% /home

온라인jfs를 이용해 온라인으로 또 늘리자

 

# lvextend -L 1280 /dev/vg00/lvol4
Logical volume "/dev/vg00/lvol4" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

root@rx233   [/labs]
# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  265912  776672   26% /
/dev/vg00/lvol1    1835008  190792 1631456   10% /stand
/dev/vg00/lvol8    4587520  462432 4100360   10% /var
/dev/vg00/lvol7    6856704 3225160 3603248   47% /usr
/dev/vg00/lvol6    1179648   20840 1149760    2% /tmp
/dev/vg00/lvol5    10723328 5690976 4993104   53% /opt
/dev/vg00/lvol4    1245184 1179576   65152   95% /home  --> 파일시스템은 변화없다

root@rx233   [/labs]
# lvdisplay -v /dev/vg00/lvol4
--- Logical volumes ---
LV Name                     /dev/vg00/lvol4
VG Name                     /dev/vg00
LV Permission               read/write               
LV Status                   available/syncd          
Mirror copies               0           
Consistency Recovery        MWC                
Schedule                    parallel     
LV Size (Mbytes)            1280           
Current LE                  160      
Allocated PE                160        
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/disk/disk2_p2      160       160      

   --- Logical extents ---
   LE    PV1                     PE1   Status 1
   00000 /dev/disk/disk2_p2      00480 current 
   00001 /dev/disk/disk2_p2      00481 current 
   00002 /dev/disk/disk2_p2      00482 current 
   00003 /dev/disk/disk2_p2      00483 current 
   00004 /dev/disk/disk2_p2      00484 current 
   00005 /dev/disk/disk2_p2      00485 current 
   00006 /dev/disk/disk2_p2      00486 current 
   00007 /dev/disk/disk2_p2      00487 current 
   00008 /dev/disk/disk2_p2      00488 current 
   00009 /dev/disk/disk2_p2      00489 current 
   00010 /dev/disk/disk2_p2      00490 current 
   00011 /dev/disk/disk2_p2      00491 current 
   00012 /dev/disk/disk2_p2      00492 current 
   00013 /dev/disk/disk2_p2      00493 current 
   00014 /dev/disk/disk2_p2      00494 current 
   00015 /dev/disk/disk2_p2      00495 current 
   00016 /dev/disk/disk2_p2      00496 current 
   00017 /dev/disk/disk2_p2      00497 current 
   00018 /dev/disk/disk2_p2      00498 current 
   00019 /dev/disk/disk2_p2      00499 current 
   00020 /dev/disk/disk2_p2      00500 current 
   00021 /dev/disk/disk2_p2      00501 current 
   00022 /dev/disk/disk2_p2      00502 current 
   00023 /dev/disk/disk2_p2      00503 current 
   00024 /dev/disk/disk2_p2      00504 current 
   00025 /dev/disk/disk2_p2      00505 current 
   00026 /dev/disk/disk2_p2      00506 current 
   00027 /dev/disk/disk2_p2      00507 current 
   00028 /dev/disk/disk2_p2      00508 current 
   00029 /dev/disk/disk2_p2      00509 current 
   00030 /dev/disk/disk2_p2      00510 current 
   00031 /dev/disk/disk2_p2      00511 current 
   00032 /dev/disk/disk2_p2      00512 current 
   00033 /dev/disk/disk2_p2      00513 current 
   00034 /dev/disk/disk2_p2      00514 current 
   00035 /dev/disk/disk2_p2      00515 current 
   00036 /dev/disk/disk2_p2      00516 current 
   00037 /dev/disk/disk2_p2      00517 current 
   00038 /dev/disk/disk2_p2      00518 current 
   00039 /dev/disk/disk2_p2      00519 current 
   00040 /dev/disk/disk2_p2      00520 current 
   00041 /dev/disk/disk2_p2      00521 current 
   00042 /dev/disk/disk2_p2      00522 current 
   00043 /dev/disk/disk2_p2      00523 current 
   00044 /dev/disk/disk2_p2      00524 current 
   00045 /dev/disk/disk2_p2      00525 current 
   00046 /dev/disk/disk2_p2      00526 current 
   00047 /dev/disk/disk2_p2      00527 current 
   00048 /dev/disk/disk2_p2      00528 current 
   00049 /dev/disk/disk2_p2      00529 current 
   00050 /dev/disk/disk2_p2      00530 current 
   00051 /dev/disk/disk2_p2      00531 current 
   00052 /dev/disk/disk2_p2      00532 current 
   00053 /dev/disk/disk2_p2      00533 current 
   00054 /dev/disk/disk2_p2      00534 current 
   00055 /dev/disk/disk2_p2      00535 current 
   00056 /dev/disk/disk2_p2      00536 current 
   00057 /dev/disk/disk2_p2      00537 current 
   00058 /dev/disk/disk2_p2      00538 current 
   00059 /dev/disk/disk2_p2      00539 current 
   00060 /dev/disk/disk2_p2      00540 current 
   00061 /dev/disk/disk2_p2      00541 current 
   00062 /dev/disk/disk2_p2      00542 current 
   00063 /dev/disk/disk2_p2      00543 current 
   00064 /dev/disk/disk2_p2      00544 current 
   00065 /dev/disk/disk2_p2      00545 current 
   00066 /dev/disk/disk2_p2      00546 current 
   00067 /dev/disk/disk2_p2      00547 current 
   00068 /dev/disk/disk2_p2      00548 current 
   00069 /dev/disk/disk2_p2      00549 current 
   00070 /dev/disk/disk2_p2      00550 current 
   00071 /dev/disk/disk2_p2      00551 current 
   00072 /dev/disk/disk2_p2      00552 current 
   00073 /dev/disk/disk2_p2      00553 current 
   00074 /dev/disk/disk2_p2      00554 current 
   00075 /dev/disk/disk2_p2      00555 current 
   00076 /dev/disk/disk2_p2      00556 current 
   00077 /dev/disk/disk2_p2      00557 current 
   00078 /dev/disk/disk2_p2      00558 current 
   00079 /dev/disk/disk2_p2      00559 current 
   00080 /dev/disk/disk2_p2      00560 current 
   00081 /dev/disk/disk2_p2      00561 current 
   00082 /dev/disk/disk2_p2      00562 current 
   00083 /dev/disk/disk2_p2      00563 current 
   00084 /dev/disk/disk2_p2      00564 current 
   00085 /dev/disk/disk2_p2      00565 current 
   00086 /dev/disk/disk2_p2      00566 current 
   00087 /dev/disk/disk2_p2      00567 current 
   00088 /dev/disk/disk2_p2      00568 current 
   00089 /dev/disk/disk2_p2      00569 current 
   00090 /dev/disk/disk2_p2      00570 current 
   00091 /dev/disk/disk2_p2      00571 current 
   00092 /dev/disk/disk2_p2      00572 current 
   00093 /dev/disk/disk2_p2      00573 current 
   00094 /dev/disk/disk2_p2      00574 current 
   00095 /dev/disk/disk2_p2      00575 current 
   00096 /dev/disk/disk2_p2      00576 current 
   00097 /dev/disk/disk2_p2      00577 current 
   00098 /dev/disk/disk2_p2      00578 current 
   00099 /dev/disk/disk2_p2      00579 current 
   00100 /dev/disk/disk2_p2      00580 current 
   00101 /dev/disk/disk2_p2      00581 current 
   00102 /dev/disk/disk2_p2      00582 current 
   00103 /dev/disk/disk2_p2      00583 current 
   00104 /dev/disk/disk2_p2      00584 current 
   00105 /dev/disk/disk2_p2      00585 current 
   00106 /dev/disk/disk2_p2      00586 current 
   00107 /dev/disk/disk2_p2      00587 current 
   00108 /dev/disk/disk2_p2      00588 current 
   00109 /dev/disk/disk2_p2      00589 current 
   00110 /dev/disk/disk2_p2      00590 current 
   00111 /dev/disk/disk2_p2      00591 current 
   00112 /dev/disk/disk2_p2      00592 current 
   00113 /dev/disk/disk2_p2      00593 current 
   00114 /dev/disk/disk2_p2      00594 current 
   00115 /dev/disk/disk2_p2      00595 current 
   00116 /dev/disk/disk2_p2      00596 current 
   00117 /dev/disk/disk2_p2      00597 current 
   00118 /dev/disk/disk2_p2      00598 current 
   00119 /dev/disk/disk2_p2      00599 current 
   00120 /dev/disk/disk2_p2      00600 current 
   00121 /dev/disk/disk2_p2      00601 current 
   00122 /dev/disk/disk2_p2      00602 current 
   00123 /dev/disk/disk2_p2      00603 current 
   00124 /dev/disk/disk2_p2      00604 current 
   00125 /dev/disk/disk2_p2      00605 current 
   00126 /dev/disk/disk2_p2      00606 current 
   00127 /dev/disk/disk2_p2      00607 current 
   00128 /dev/disk/disk2_p2      00608 current 
   00129 /dev/disk/disk2_p2      00609 current 
   00130 /dev/disk/disk2_p2      00610 current 
   00131 /dev/disk/disk2_p2      00611 current 
   00132 /dev/disk/disk2_p2      00612 current 
   00133 /dev/disk/disk2_p2      00613 current 
   00134 /dev/disk/disk2_p2      00614 current 
   00135 /dev/disk/disk2_p2      00615 current 
   00136 /dev/disk/disk2_p2      00616 current 
   00137 /dev/disk/disk2_p2      00617 current 
   00138 /dev/disk/disk2_p2      00618 current 
   00139 /dev/disk/disk2_p2      00619 current 
   00140 /dev/disk/disk2_p2      00620 current 
   00141 /dev/disk/disk2_p2      00621 current 
   00142 /dev/disk/disk2_p2      00622 current 
   00143 /dev/disk/disk2_p2      00623 current 
   00144 /dev/disk/disk2_p2      03474 current 
   00145 /dev/disk/disk2_p2      03475 current 
   00146 /dev/disk/disk2_p2      03476 current 
   00147 /dev/disk/disk2_p2      03477 current 
   00148 /dev/disk/disk2_p2      03478 current 
   00149 /dev/disk/disk2_p2      03479 current 
   00150 /dev/disk/disk2_p2      03480 current 
   00151 /dev/disk/disk2_p2      03481 current 
   00152 /dev/disk/disk2_p2      03482 current 
   00153 /dev/disk/disk2_p2      03483 current 
   00154 /dev/disk/disk2_p2      03484 current 
   00155 /dev/disk/disk2_p2      03485 current 
   00156 /dev/disk/disk2_p2      03486 current 
   00157 /dev/disk/disk2_p2      03487 current 
   00158 /dev/disk/disk2_p2      03488 current 
   00159 /dev/disk/disk2_p2      03489 current 

 

 

# fsadm -b 1280m /home
fsadm: /etc/default/fs is used for determining the file system type
UX:vxfs fsadm: INFO: V-3-25942: /dev/vg00/rlvol4 size increased from 1245184 sectors to 1310720 sectors

root@rx233   [/labs]
# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  265528  777056   25% /
/dev/vg00/lvol1    1835008  190792 1631456   10% /stand
/dev/vg00/lvol8    4587520  462440 4100352   10% /var
/dev/vg00/lvol7    6856704 3225160 3603248   47% /usr
/dev/vg00/lvol6    1179648   20840 1149760    2% /tmp
/dev/vg00/lvol5    10723328 5690976 4993104   53% /opt
/dev/vg00/lvol4    1310720 1179576  130176   90% /home

 

 

root@rx233   [/labs]
# fsadm -b 2000m /home
fsadm: /etc/default/fs is used for determining the file system type
UX:vxfs fsadm: ERROR: V-3-25811: cannot expand /dev/vg00/rlvol4 more than size of the underlying device - 1310720 sectors

# lvmadm -l                
--- Version 1.0 volume groups ---
VG Name /dev/vg00
PV Name /dev/disk/disk2_p2
        /dev/disk/disk3

 

* 다시 줄이자

# lvreduce -L 1152 /dev/vg00/lvol4
The Logical Volume has a mounted filesystem on it.
Logical volume "/dev/vg00/lvol4" is not reduced.

--> 파일시스템부터 줄여야지...

 

# fsadm -b 1152 /home
fsadm: /etc/default/fs is used for determining the file system type
UX:vxfs fsadm: ERROR: V-3-23544: sectors must be >= 22001 as they are currently in use.

--> 메가단위니까 m을 붙여야지

 

# fsadm -b 1152m /home
fsadm: /etc/default/fs is used for determining the file system type
UX:vxfs fsadm: INFO: V-3-23586: /dev/vg00/rlvol4 is currently 1310720 sectors - size will be reduced

root@rx233   [/labs]

 

# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  265912  776672   26% /
/dev/vg00/lvol1    1835008  190792 1631456   10% /stand
/dev/vg00/lvol8    4587520  462448 4100336   10% /var
/dev/vg00/lvol7    6856704 3225160 3603248   47% /usr
/dev/vg00/lvol6    1179648   20840 1149760    2% /tmp
/dev/vg00/lvol5    10723328 5690976 4993104   53% /opt
/dev/vg00/lvol4    1179648   22000 1148832    2% /home

root@rx233   [/labs]
#

root@rx233   [/labs]
# lvreduce -L 1152 /dev/vg00/lvol4
When a logical volume is reduced useful data might get lost;
do you really want the command to proceed (y/n) : y
Logical volume "/dev/vg00/lvol4" has been successfully reduced.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

root@rx233   [/labs]
# lvdisplay /dev/vg00/lvol4
--- Logical volumes ---
LV Name                     /dev/vg00/lvol4
VG Name                     /dev/vg00
LV Permission               read/write               
LV Status                   available/syncd          
Mirror copies               0           
Consistency Recovery        MWC                
Schedule                    parallel     
LV Size (Mbytes)            1152           
Current LE                  144      
Allocated PE                144        
Stripes                     0      
Stripe Size (Kbytes)        0                  
Bad block                   on          
Allocation                  strict                   
IO Timeout (Seconds)        default            

 

 

* vg00에서 disk3번 제거

# pvdisplay -v /dev/disk/disk3 |more
--- Physical volumes ---
PV Name                     /dev/disk/disk3
VG Name                     /dev/vg00
PV Status                   available               
Allocatable                 yes         
VGDA                        2  
Cur LV                      0     
PE Size (Mbytes)            8              
Total PE                    4238   
Free PE                     4238   
Allocated PE                0          
Stale PE                    0      
IO Timeout (Seconds)        default            
Autoswitch                  on       
Proactive Polling           on 

...

 

 

# vgreduce vg00 /dev/disk/disk3
Volume group "vg00" has been successfully reduced.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

root@rx233   [/labs]
# vgdisplay vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write    
VG Status                   available                
Max LV                      255   
Cur LV                      8     
Open LV                     8     
Max PV                      16    
Cur PV                      1     
Act PV                      1     

Max PE per PV               4238        
VGDA                        2  
PE Size (Mbytes)            8              
Total PE                    4228   
Alloc PE                    3474   
Free PE                     754    
Total PVG                   0       
Total Spare PVs             0             
Total Spare PVs in use      0                    
VG Version                  1.0      
VG Max Size                 542464m   
VG Max Extents              67808        


root@rx233   [/labs]
# lvmadm -l
--- Version 1.0 volume groups ---
VG Name /dev/vg00
PV Name /dev/disk/disk2_p2