Centos7扩展磁盘空间(LVM管理)

Centos7扩展磁盘空间(LVM管理)

 

1. 查看磁盘情况

fdisk -l /dev/sda

 

Disk /dev/sda: 536.9 GB, 536870912000 bytes, 1048576000 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: 0x000ac88a Device Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 266338303 132119552 8e Linux LVM

 

2. 查看磁盘占用情况

df -lh

 

Filesystem Size Used Avail Use% Mounted on /dev/mapper/cl-root 50G 24G 27G 47% / devtmpfs 5.8G 0 5.8G 0% /dev tmpfs 5.8G 84K 5.8G 1% /dev/shm tmpfs 5.8G 8.8M 5.8G 1% /run tmpfs 5.8G 0 5.8G 0% /sys/fs/cgroup /dev/sda1 1014M 173M 842M 18% /boot /dev/mapper/cl-home 69G 517M 68G 1% /home tmpfs 1.2G 16K 1.2G 1% /run/user/42 tmpfs 1.2G 0 1.2G 0% /run/user/0

 

3. 创建新分区

fdisk /dev/sda

弹出的命令行中输入对应的命令,命令说明如下:

Command action

a toggle a bootable flag

b edit bsd disklabel

c toggle the dos compatibility flag

d delete a partition

g create a new empty GPT partition table

G create an IRIX (SGI) partition table

l list known partition types

m print this menu

n add a new partition

o create a new empty DOS partition table

p print the partition table

q quit without saving changes

s create a new empty Sun disklabel

t change a partition's system id

u change display/entry units

v verify the partition table

w write table to disk and exit

x extra functionality (experts only)

a) 命令行输入 n 创建新分区

 

[root@lenmom ~]# fdisk /dev/sda The device presents a logical sector size that is smaller than the physical sector size. Aligning to a physical sector (or optimal I/O) size boundary is recommended, or performance may be impacted. Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you de

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值