终于还是找到了.现在将执行代码贴出来.希望对大家有帮助!

[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系统)

[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.

标签:
Centos5,根分区扩容

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
评论“Centos5给/根分区扩容”
暂无“Centos5给/根分区扩容”评论...

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。