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):
- First use fdisk or friends to extend the partition,
- 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)