为什么df和lsblk显示的内存不一样大

lsblk命令
块名 块大小 块类型 挂载点
[root@cluster-datanode-1 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
vda 252:0 0 100G 0 disk
├─vda1 252:1 0 500M 0 part /boot
└─vda2 252:2 0 99.5G 0 part /

df 命令
文件系统 大小 使用 可用 使用百分比 挂载点
[root@cluster-datanode-1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda2 2.5G 2.4G 22M 100% /
tmpfs 20G 76K 20G 1% /dev/shm
/dev/vda1 485M 108M 352M 24% /boot

The block device is now bigger, but the filesystem still has its old size. You need to resize it, e.g. using resize2fs - increasing size can be done online.

The steps are these (assuming this is the last partition on the block device):

  1. First use fdisk or friends to extend the partition,
  2. then use the resize tool for your file system (resize2fs for
    ext{2,3,4}) to resize the file system.

You don’t need to stop your processes, if you use a file system, that can grow online (such as ext{2,3,4} or ocfs2)

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值