码迷,mamicode.com
首页 > 其他好文 > 详细

Liunx 不用LVM 83分区 扩展根目录

时间:2017-07-31 22:08:52      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:83

[root@TSM ~]# df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda3             863G  405G  413G  50% /
/dev/sda1              99M   12M   83M  13% /boot
tmpfs                 3.9G     0  3.9G   0% /dev/shm

[root@TSM ~]# fdisk -l

Disk /dev/sda: 1429.3 GB, 1429365115904 bytes
255 heads, 63 sectors/track, 173777 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        1033     8193150   82  Linux swap / Solaris
/dev/sda3            1034      173777  1387566180   83  Linux

[root@TSM ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 173777.
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/sda: 1429.3 GB, 1429365115904 bytes
255 heads, 63 sectors/track, 173777 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        1033     8193150   82  Linux swap / Solaris
/dev/sda3            1034      173777  1387566180   83  Linux

Command (m for help): d

Selected partition 3

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (1-652, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-652, default 652): +4G

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@TSM ~]# resize2fs /dev/sda3 1300G
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/sda3 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/sda3 to 340787200 (4k) blocks.
The filesystem on /dev/sda3 is now 340787200 blocks long.

[root@TSM ~]# df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda3             1.3T  405G  790G  34% /
/dev/sda1              99M   12M   83M  13% /boot
tmpfs                 3.9G     0  3.9G   0% /dev/shm


Liunx 不用LVM 83分区 扩展根目录

标签:83

原文地址:http://yiliang.blog.51cto.com/936874/1952337

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!