lvm中怎麼增大根分割槽的步驟:
1,檢視磁碟分割槽,其中/dev/sda5是沒有用的磁碟空間
[root@server1 /]# fdisk -l
Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1318 10482412+ 8e Linux LVM
/dev/sda3 1319 1383 522112+ 82 Linux swap / Solaris
/dev/sda4 1384 1958 4618687+ 5 Extended
/dev/sda5 1384 1958 4618656 83 Linux
[root@server1 /]#
2,檢視vg,剩餘空間為0
[root@server1 /]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 9.97 GB
PE Size 32.00 MB
Total PE 319
Alloc PE / Size 319 / 9.97 GB
Free PE / Size 0 / 0
VG UUID o8XLQS-jxb8-ZKid-sYxF-y97T-1M1S-AKBdz3
3,擴充套件vg
[root@server1 /]# vgextend VolGroup00 /dev/sda5
Volume group "VolGroup00" successfully extended
[root@server1 /]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 14.34 GB
PE Size 32.00 MB
Total PE 459
Alloc PE / Size 319 / 9.97 GB
Free PE / Size 140 / 4.38 GB
VG UUID o8XLQS-jxb8-ZKid-sYxF-y97T-1M1S-AKBdz3
4,檢視載入的分割槽資訊:
[root@server1 /]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mapper/VolGroup00-LogVol01 on /home type ext3 (rw)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@server1 /]#
5,擴充套件根分割槽的lv
[root@server1 /]# lvextend -L +4.3G /dev/VolGroup00/LogVol00
Rounding up size to full physical extent 4.31 GB
Extending logical volume LogVol00 to 8.31 GB
Logical volume LogVol00 successfully resized
[root@server1 /]# umount /
umount: /: device is busy
umount: /: device is busy
6,執行檔案系統檢查:
[root@server1 /]# e2fsck -f /dev/VolGroup00/LogVol00
e2fsck 1.39 (29-May-2006)
/dev/VolGroup00/LogVol00 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
Do you really want to continue (y/n)? yes
/dev/VolGroup00/LogVol00: recovering journal
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/VolGroup00/LogVol00: ***** FILE SYSTEM WAS MODIFIED *****
/dev/VolGroup00/LogVol00: ***** REBOOT LINUX *****
/dev/VolGroup00/LogVol00: 114168/1048576 files (0.6% non-contiguous), 695530/1048576 blocks
7,執行resize2fs
[root@server1 /]# resize2fs /dev/VolGroup00/LogVol00
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/VolGroup00/LogVol00 to 2179072 (4k) blocks.
The filesystem on /dev/VolGroup00/LogVol00 is now 2179072 blocks long.
8,重新檢視lv資訊和mount的資訊
[root@server1 /]# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID 8Ows1C-xr8e-kkS7-j2Kj-ZLyn-0gV9-eimuHk
LV Write Access read/write
LV Status available
# open 1
LV Size 8.31 GB
Current LE 266
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID jcgE93-1O2G-DXu6-grv1-UNSV-z9L1-03oYHS
LV Write Access read/write
LV Status available
# open 1
LV Size 5.97 GB
Current LE 191
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
[root@server1 /]# df -h
檔案系統 容量 已用 可用 已用% 掛載點
/dev/mapper/VolGroup00-LogVol00
8.1G 2.6G 5.2G 34% /
/dev/mapper/VolGroup00-LogVol01
5.8G 2.6G 2.9G 48% /home
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 125M 0 125M 0% /dev/shm
[root@server1 /]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-1011025/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- aix擴充 交換分割槽的步驟AI
- Linux 新增LVM分割槽及LVM分割槽擴容LinuxLVM
- Linux中lvm分割槽是什麼?LVM優缺點有哪些?LinuxLVM
- linux中增加swap分割槽或檔案的步驟方法Linux
- LVM分割槽恢復LVM
- 在 Linux 中建立 LVM 分割槽的分步指南LinuxLVM
- Linux系統中增加Swap分割槽檔案步驟方法Linux
- lvm增加分割槽容量LVM
- win10無損分割槽的步驟_win10如何對硬碟無損分割槽Win10硬碟
- linux下掛載新硬碟和分割槽的步驟Linux硬碟
- win10分割槽合併保留資料怎麼操作_win10硬碟合併分割槽並保留檔案詳細步驟Win10硬碟
- LVM建立的詳細步驟LVM
- 邏輯分割槽管理 LVM 概念及在Ubuntu中的使用?LVMUbuntu
- 非 LVM 分割槽動態擴容LVM
- 固態硬碟怎麼分割槽硬碟
- 對新硬碟分割槽格式化步驟和內容硬碟
- 聊聊分割槽Partition——我們為什麼要分割槽(中)
- Linux LVM 擴充套件磁碟分割槽LinuxLVM套件
- (轉)管理LVM2邏輯分割槽LVM
- Linux系統怎麼分割槽Linux
- 系統分割槽win10怎麼設定 怎麼給win10系統分割槽Win10
- 安裝分割槽助手,總是顯示“分割槽助手已安裝到你的電腦中,怎麼辦
- win10怎麼合併分割槽_win10合併分割槽的方法Win10
- Linux中什麼是分割槽?Linux分割槽有什麼好處?Linux
- win10 怎麼分割槽_如何給win10系統分割槽Win10
- win10增加分割槽的方法_win10怎麼給磁碟新增分割槽Win10
- 3tb硬碟怎麼分割槽_利用DiskGenius給3tb硬碟分割槽的方法硬碟
- win10只有c盤怎麼分割槽 win10c盤分割槽的方法Win10
- ghost win10如何分割槽硬碟_ghost win10怎麼分割槽硬碟Win10硬碟
- 如何找回U盤分割槽丟失的資料?詳細演示三步驟
- 新增儲存用Parted分割槽並建LVM卷LVM
- win10系統硬碟如何分割槽_win10主硬碟怎麼分割槽Win10硬碟
- win10桌面怎麼分割槽域_win10桌面如何分割槽域Win10
- Windows 8.1怎麼建立擴充套件分割槽?Windows套件
- 線上重定義的操作步驟__普通錶轉換為分割槽表的實驗案例
- win10怎麼快速給磁碟分割槽_win10如何進行磁碟分割槽Win10
- mbr分割槽能不能裝win10_mbr分割槽怎麼裝win10Win10
- win10硬碟分割槽怎麼分_win10系統如何對硬碟分割槽Win10硬碟