Centos5給/根分區(qū)擴容
終于還是找到了.現(xiàn)在將執(zhí)行代碼貼出來.希望對大家有幫助!
[root@localhost ~]# fdisk /dev/hda3
The number of cylinders for this disk is set to 3916.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/hda4: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0×000bc363
Device Boot Start End Blocks Id System
/dev/hda1 * 1 25 200781 83 Linux
/dev/hda2 26 1958 15526822+ 8e Linux LVM
/dev/hda3 1959 2610 5237190 8e Linux LVM
Command (m for help): n
Command action
e extended
p primary partition (1-4)
Selected partition 4
First cylinder (2611-3916, default 2611):
Using default value 2611
Last cylinder or +size or +sizeM or +sizeK (2611-3916, default 3916):
Using default value 3916
Command (m for help): t
Partition number (1-4): 4
Hex code (type L to list codes): 8e
Changed system type of partition 4 to 8e (Linux LVM)
Command (m for help): p
Disk /dev/hda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0×000bc363
Device Boot Start End Blocks Id System
/dev/hda1 * 1 25 200781 83 Linux
/dev/hda2 26 1958 15526822+ 8e Linux LVM
/dev/hda3 1959 2610 5237190 8e Linux LVM
/dev/hda4 2611 3916 10490445 8e Linux LVM
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
(注:建議重啟一下CentOS系統(tǒng))
[root@localhost ~]# pvcreate /dev/hda3
Physical volume “/dev/hda4″ successfully created
[root@localhost ~]# vgextend VolGroup00 /dev/hda3
Volume group “VolGroup00″ successfully extended
[root@localhost ~]# lvextend -l +100%FREE /dev/VolGroup00/LogVol00
Extending logical volume LogVol00 to 28.25 GB
Logical volume LogVol00 successfully resized
[root@localhost ~]# lvresize -l +100%FREE /dev/VolGroup00/LogVol00
New size (904 extents) matches existing size (904 extents)
lvresize: Resize a logical volume
lvresize
[-A|--autobackup y|n]
[--alloc AllocationPolicy]
[-d|--debug]
[-h|--help]
[-i|--stripes Stripes [-I|--stripesize StripeSize]]
{-l|–extents [+|-]LogicalExtentsNumber[%{VG|LV|FREE}] |
-L|–size [+|-]LogicalVolumeSize[kKmMgGtTpPeE]}
[-n|--nofsck]
[-r|--resizefs]
[-t|--test]
[--type VolumeType]
[-v|--verbose]
[--version]
LogicalVolume[Path] [ PhysicalVolumePath... ]
[root@localhost ~]# resize2fs /dev/VolGroup00/LogVol00
resize2fs 1.40.2 (12-Jul-2007)
Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 2
Performing an on-line resize of /dev/VolGroup00/LogVol00 to 7405568 (4k) blocks.
The filesystem on /dev/VolGroup00/LogVol00 is now 7405568 blocks long.
相關(guān)文章
Apache加速模塊mod_pagespeed安裝使用詳細介紹
這篇文章主要介紹了Apache加速模塊mod_pagespeed安裝使用詳細介紹,需要的朋友可以參考下2014-03-03Linux 7.4上安裝配置Oracle 11.2.0.4圖文教程
本文通過圖文并茂的形式給大家介紹了Linux 7.4上安裝配置Oracle 11.2.0.4的方法,非常不錯,具有參考借鑒價值,需要的朋友參考下吧2017-12-12一文教你如何快速排查Windows和Linux系統(tǒng)是否被黑
這篇文章主要為大家詳細介紹了如何實現(xiàn)快速排查Windows和Linux系統(tǒng)是否被黑,文中通過圖文進行了詳細介紹,需要的小伙伴可以參考一下2023-08-08Apache mod_rewrite實現(xiàn)HTTP和HTTPS重定向跳轉(zhuǎn)
這篇文章主要介紹了Apache mod_rewrite實現(xiàn)HTTP和HTTPS重定向跳轉(zhuǎn),本文分別給出了HTTP重定向HTTPS和HTTPS重定向HTTP配置參考,需要的朋友可以參考下2015-06-06Ubuntu20.04安裝Python3的虛擬環(huán)境教程詳解
這篇文章主要介紹了Ubuntu20.04安裝Python3的虛擬環(huán)境,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-06-06