アットウィキロゴ
 
  • ファイルシステム縮小
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/volgrp-var_crash
                      9.9G   55M  9.3G   1% /var/crash
# umount /var/crash
# e2fsck -f /dev/mapper/volgrp-var_crash
e2fsck 1.35 (28-Feb-2004)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/volgrp-var_crash: 12/1310720 files (8.3% non-contiguous), 55099/2621440 blocks
# resize2fs /dev/mapper/volgrp-var_crash 6G
resize2fs 1.35 (28-Feb-2004)
Resizing the filesystem on /dev/mapper/volgrp-var_crash to 1572864 (4k) blocks.
The filesystem on /dev/mapper/volgrp-var_crash is now 1572864 blocks long.

  • LV縮小
# lvdisplay /dev/volgrp/var_crash
 --- Logical volume ---
 LV Name                /dev/volgrp/var_crash
 VG Name                volgrp
 LV UUID                8r763T-KnEN-275a-qjfX-v3t4-peKL-u6Yoat
 LV Write Access        read/write
 LV Status              available
 # open                 0
 LV Size                10.00 GB
 Current LE             320
 Segments               1
 Allocation             inherit
 Read ahead sectors     auto
 - currently set to     256
 Block device           253:5

# lvreduce -L 6g /dev/volgrp/var_crash
  WARNING: Reducing active logical volume to 6.00 GB
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce var_crash? [y/n]: y
  Reducing logical volume var_crash to 6.00 GB
  Logical volume var_crash successfully resized
# lvdisplay /dev/volgrp/var_crash
  --- Logical volume ---
  LV Name                /dev/volgrp/var_crash
  VG Name                volgrp
  LV UUID                8r763T-KnEN-275a-qjfX-v3t4-peKL-u6Yoat
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                6.00 GB
  Current LE             192
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:5

# mount /dev/volgrp/var_crash /var/crash
# df -h /var/crash
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/volgrp-var_crash
                      6.0G   53M  5.6G   1% /var/crash

タグ:

+ タグ編集
  • タグ:
最終更新:2010年06月10日 13:31