全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 911|回复: 6

Centos如何增加根目录容量(扩大分区)

[复制链接]
发表于 2021-4-18 10:03:33 | 显示全部楼层 |阅读模式
如题,昨天好不容易把azure的免费硬盘搞明白了,今天早上起来开了个win小鸡,用diskgenius扩展了分区。linux下有什么好的工具或者脚本吗?网上的教程fdisk玩不懂
发表于 2021-4-18 10:24:07 | 显示全部楼层
免费硬盘注意别选错了,我上学的时候申请的azure,我选P10,大小为 2X G
当时产生了费用,我还开工单问的,人家告诉我免费的是支持两块P6,每块大小是 X G

好像是这样,太久了,记不清了
发表于 2021-4-18 10:25:48 | 显示全部楼层
Linux分区工具-parted
 楼主| 发表于 2021-4-18 10:37:00 | 显示全部楼层
Waylon 发表于 2021-4-18 10:24
免费硬盘注意别选错了,我上学的时候申请的azure,我选P10,大小为 2X G
当时产生了费用,我还开工单问的, ...

没选错,从免费服务里创建的,但是开机是30GB,windows的用diskgenius扩容了,linux不知道怎么搞
 楼主| 发表于 2021-4-18 10:42:05 | 显示全部楼层
fdisk

[root@Linux ~]# fdisk -l

Disk /dev/sdb: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x7971965b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     8386559     4192256   83  Linux

Disk /dev/sda: 68.7 GB, 68719476736 bytes, 134217728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x000a41c5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    62914559    30944256   83  Linux
发表于 2021-4-18 11:18:40 | 显示全部楼层
lvdisplay 看一下 cent-os 分区是不是 LVM,如果是,就把 /dev/sdb 设置成 LVM 分区,然后 vgextend,最后 resize 就好了。
 楼主| 发表于 2021-4-18 11:50:00 | 显示全部楼层
2bitO 发表于 2021-4-18 11:18
lvdisplay 看一下 cent-os 分区是不是 LVM,如果是,就把 /dev/sdb 设置成 LVM 分区,然后 vgextend,最后  ...

搞完了,最终还是把这个硬盘挂载到/www上了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-25 14:44 , Processed in 0.059326 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表