lvm收縮邏輯卷空間
[root@cspserver1 /]# umount /softdata
[root@cspserver1 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/RHELVG-ROOT
15G 12G 2.6G 82% /
tmpfs 16G 7.8G 8.0G 50% /dev/shm
/dev/sda1 190M 40M 141M 23% /boot
/dev/mapper/RHELVG-HOME
20G 55M 19G 1% /home
/dev/mapper/RHELVG-OPT
15G 13G 1.2G 92% /opt
/dev/mapper/RHELVG-TMP
15G 44M 14G 1% /tmp
/dev/mapper/RHELVG-USR
15G 3.8G 11G 28% /usr
/dev/mapper/RHELVG-VAR
15G 261M 14G 2% /var
[root@cspserver1 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/RHELVG-ROOT
15G 12G 2.6G 82% /
tmpfs 16G 7.8G 8.0G 50% /dev/shm
/dev/sda1 190M 40M 141M 23% /boot
/dev/mapper/RHELVG-HOME
20G 55M 19G 1% /home
/dev/mapper/RHELVG-OPT
15G 13G 1.2G 92% /opt
/dev/mapper/RHELVG-TMP
15G 44M 14G 1% /tmp
/dev/mapper/RHELVG-USR
15G 3.8G 11G 28% /usr
/dev/mapper/RHELVG-VAR
15G 261M 14G 2% /var
[root@cspserver1 /]# e2fsck -f /dev/mapper/RHELVG-SOFTDATA
e2fsck 1.41.12 (17-May-2010)
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/RHELVG-SOFTDATA: 11/2559088 files (0.0% non-contiguous), 205643/10232832 blocks
[root@cspserver1 /]# resize2fs /dev/mapper/RHELVG-SOFTDATA 10240m (檔案系統縮到10g)
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/mapper/RHELVG-SOFTDATA to 2621440 (4k) blocks.
The filesystem on /dev/mapper/RHELVG-SOFTDATA is now 2621440 blocks long.
e2fsck 1.41.12 (17-May-2010)
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/RHELVG-SOFTDATA: 11/2559088 files (0.0% non-contiguous), 205643/10232832 blocks
[root@cspserver1 /]# resize2fs /dev/mapper/RHELVG-SOFTDATA 10240m (檔案系統縮到10g)
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/mapper/RHELVG-SOFTDATA to 2621440 (4k) blocks.
The filesystem on /dev/mapper/RHELVG-SOFTDATA is now 2621440 blocks long.
is already 2621440 blocks long. Nothing to do!
[root@cspserver1 /]# lvreduce -L 10240m /dev/mapper/RHELVG-SOFTDATA (再縮lv)
WARNING: Reducing active logical volume to 10.00 GiB.
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce RHELVG/SOFTDATA? [y/n]: y
Size of logical volume RHELVG/SOFTDATA changed from 39.04 GiB (9993 extents) to 10.00 GiB (2560 extents).
Logical volume SOFTDATA successfully resized.
[root@cspserver1 /]# mount /dev/mapper/RHELVG-SOFTDATA /softdata
[root@cspserver1 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/RHELVG-ROOT
15G 12G 2.6G 82% /
tmpfs 16G 7.8G 8.0G 50% /dev/shm
/dev/sda1 190M 40M 141M 23% /boot
/dev/mapper/RHELVG-HOME
20G 55M 19G 1% /home
/dev/mapper/RHELVG-OPT
15G 13G 1.2G 92% /opt
/dev/mapper/RHELVG-TMP
15G 44M 14G 1% /tmp
/dev/mapper/RHELVG-USR
15G 3.8G 11G 28% /usr
/dev/mapper/RHELVG-VAR
15G 261M 14G 2% /var
/dev/mapper/RHELVG-SOFTDATA
9.8G 36M 9.2G 1% /softdata
[root@cspserver1 /]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 RHELVG lvm2 a--u 149.80g 29.04g
[root@cspserver1 /]# lvextend -L +20480M /dev/mapper/RHELVG-OPT (擴充套件邏輯卷)
Size of logical volume RHELVG/OPT changed from 15.00 GiB (3840 extents) to 35.00 GiB (8960 extents).
Logical volume OPT successfully resized.
[root@cspserver1 /]# resize2fs /dev/mapper/RHELVG-OPT (將擴充套件的邏輯卷同步到檔案系統)
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/RHELVG-OPT is mounted on /opt; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 3
Performing an on-line resize of /dev/mapper/RHELVG-OPT to 9175040 (4k) blocks.
The filesystem on /dev/mapper/RHELVG-OPT is now 9175040 blocks long.
WARNING: Reducing active logical volume to 10.00 GiB.
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce RHELVG/SOFTDATA? [y/n]: y
Size of logical volume RHELVG/SOFTDATA changed from 39.04 GiB (9993 extents) to 10.00 GiB (2560 extents).
Logical volume SOFTDATA successfully resized.
[root@cspserver1 /]# mount /dev/mapper/RHELVG-SOFTDATA /softdata
[root@cspserver1 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/RHELVG-ROOT
15G 12G 2.6G 82% /
tmpfs 16G 7.8G 8.0G 50% /dev/shm
/dev/sda1 190M 40M 141M 23% /boot
/dev/mapper/RHELVG-HOME
20G 55M 19G 1% /home
/dev/mapper/RHELVG-OPT
15G 13G 1.2G 92% /opt
/dev/mapper/RHELVG-TMP
15G 44M 14G 1% /tmp
/dev/mapper/RHELVG-USR
15G 3.8G 11G 28% /usr
/dev/mapper/RHELVG-VAR
15G 261M 14G 2% /var
/dev/mapper/RHELVG-SOFTDATA
9.8G 36M 9.2G 1% /softdata
[root@cspserver1 /]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 RHELVG lvm2 a--u 149.80g 29.04g
[root@cspserver1 /]# lvextend -L +20480M /dev/mapper/RHELVG-OPT (擴充套件邏輯卷)
Size of logical volume RHELVG/OPT changed from 15.00 GiB (3840 extents) to 35.00 GiB (8960 extents).
Logical volume OPT successfully resized.
[root@cspserver1 /]# resize2fs /dev/mapper/RHELVG-OPT (將擴充套件的邏輯卷同步到檔案系統)
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/RHELVG-OPT is mounted on /opt; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 3
Performing an on-line resize of /dev/mapper/RHELVG-OPT to 9175040 (4k) blocks.
The filesystem on /dev/mapper/RHELVG-OPT is now 9175040 blocks long.
[root@cspserver1 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/RHELVG-ROOT
15G 12G 2.6G 82% /
tmpfs 16G 7.8G 8.0G 50% /dev/shm
/dev/sda1 190M 40M 141M 23% /boot
/dev/mapper/RHELVG-HOME
20G 55M 19G 1% /home
/dev/mapper/RHELVG-OPT
35G 13G 20G 40% /opt
/dev/mapper/RHELVG-TMP
15G 44M 14G 1% /tmp
/dev/mapper/RHELVG-USR
15G 3.8G 11G 28% /usr
/dev/mapper/RHELVG-VAR
15G 261M 14G 2% /var
/dev/mapper/RHELVG-SOFTDATA
9.8G 36M 9.2G 1% /softdata
[root@cspserver1 /]#
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/RHELVG-ROOT
15G 12G 2.6G 82% /
tmpfs 16G 7.8G 8.0G 50% /dev/shm
/dev/sda1 190M 40M 141M 23% /boot
/dev/mapper/RHELVG-HOME
20G 55M 19G 1% /home
/dev/mapper/RHELVG-OPT
35G 13G 20G 40% /opt
/dev/mapper/RHELVG-TMP
15G 44M 14G 1% /tmp
/dev/mapper/RHELVG-USR
15G 3.8G 11G 28% /usr
/dev/mapper/RHELVG-VAR
15G 261M 14G 2% /var
/dev/mapper/RHELVG-SOFTDATA
9.8G 36M 9.2G 1% /softdata
[root@cspserver1 /]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-2564575/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- lvm 擴充邏輯卷空間(linux的磁碟擴容)LVMLinux
- LVM邏輯卷線上動態擴容磁碟空間LVM
- LVM 邏輯卷管理LVM
- linux之LVM邏輯卷LinuxLVM
- LVM_邏輯卷管理LVM
- Linux下LVM邏輯卷管理LinuxLVM
- Linux—磁碟配額,管理LVM邏輯卷LinuxLVM
- 在Linux中,如何使用LVM管理邏輯卷?LinuxLVM
- Linux LVM Logical Volume Management 邏輯卷的管理LinuxLVM
- Lvm邏輯卷管理、建立、使用、擴充套件、縮減、遷移、快照、恢復LVM套件
- Centos8中建立LVM精簡邏輯卷CentOSLVM
- 如何在 Ubuntu 中管理和使用邏輯卷管理 LVMUbuntuLVM
- 一文全解:LVM(邏輯卷管理器)LVM
- 在LVM中恢復已刪除的邏輯卷LVM
- linux 磁碟分割槽掛載-LVM-物理卷PV,卷組VG,邏輯卷LVLinuxLVM
- ENGINEER01 - 分割槽規劃和使用,LVM邏輯卷LVM
- 實操CentOS8系統中建立LVM邏輯卷CentOSLVM
- Oracle表空間收縮方案Oracle
- mysql收縮共享表空間MySql
- Linux作業系統邏輯盤卷管理LVM建立步驟(轉)Linux作業系統LVM
- 什麼是LVM邏輯卷管理?0基礎學Linux運維LVMLinux運維
- linux 磁碟自動化分割槽掛載-LVM-物理卷PV,卷組VG,邏輯卷LV-shellLinuxLVM
- 如何新建邏輯卷及磁碟掛載,邏輯卷擴容
- 【RESIZE】Oracle收縮表空間主要命令Oracle
- 『學了就忘』Linux檔案系統管理 — 65、LVM邏輯卷管理介紹LinuxLVM
- 手把手教學----LVM邏輯卷管理與磁碟配額實操全流程LVM
- linux系統掛載邏輯卷和擴充套件邏輯卷組Linux套件
- Linux擴充套件LVM空間Linux套件LVM
- Ubuntu 22.04擴容LVM空間UbuntuLVM
- 表空間(資料檔案shrink)收縮示例
- mysql共享表空間擴容,收縮,遷移MySql
- MySQL 5.7新特性之線上收縮undo表空間MySql
- Oracle案例11——Oracle表空間資料庫檔案收縮Oracle資料庫
- Centos8中遷移邏輯卷CentOS
- Linux下的磁碟分割槽和邏輯卷Linux
- linux系統lvm中lv使用空間的調整LinuxLVM
- Linux硬碟掛載與磁碟分割槽基礎(二)(物理卷、卷組、邏輯卷)Linux硬碟
- linux系統下分割槽邏輯卷擴容Linux