扩展分区的大小

我正在寻求如何正确地扩大分区大小的帮助,这是我的情况。

运行fdisk -l,给出这个结果

root@ ~]# fdisk -l Disk /dev/sda: 2000.3 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 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 1058 8393962+ 82 Linux swap / Solaris /dev/sda3 1059 7457 51399967+ 83 Linux 

但是在检查directadmin和df -l命令时,我看到了这个结果。

 /dev/sda1 99M 12M 82M 13% /boot /dev/sda3 48G 9.4G 36G 21% / 

我如何扩大sda3分区的大小来增加额外/未分配的1500GB磁盘空间。 需要磁盘空间来存储将被parsing并传输到mysql数据库的xml文件。

请帮帮我。 我对这件事很陌生。 任何帮助,将不胜感激。 谢谢。

修改:我已阅读这篇文章来调整分区的大小http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-disk-storage-parted-resize-part.html 。 但是,我不能清楚地理解这些步骤。 请帮助我如何做ff:

  -unmount any partitions(am I going to unmount the boot and root partition?) -turn off the swap space - ok (http://techie-buzz.com/foss/ubuntu-enable-disable-swap-partition.html) -minor number - ok (http://www.centos.org/docs/4/4.5/System_Administration_Guide/Standard_Partitions_using_parted-Viewing_the_Partition_Table.html) -the starting place in megabytes, and the end place in megabytes -and complete `resize` command to use. 

伙计们,我能够研究一些命令来调整和确定参数,但我不确定是否正确。 这里是:

 parted /dev/sda print resize 3 8702 200000 

请告诉我,如果上述命令将是正常的。 我正在运行CentOS 5. ext3文件系统的sda3和200GB的硬盘。

谢谢

您不需要closures交换分区,因为它位于/ dev / sda3分区之前。 运行fdisk以进一步扩展分区3的结尾。 您可能需要删除并重新创build它,但只要开始时保持不变,并且结束位置> =当前位置即可。

扩展文件系统取决于你已经安装了哪个FS。 对于ext2 / 3/4,通常使用resize2fs