我有一个 kvm 来宾,如下,来宾磁盘/dev/vda
实际上是 Host 中的一个 qcow2 文件
[root@guest ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@guest ~]# uname -a
Linux guest 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@guest ~]# parted -l
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 64.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 8590MB 8589MB primary xfs boot
但我只看到命令8G
,df
如何将根分区增加到64G
?我有尝试xfs_growfs /dev/vda1
,但不起作用
[root@guest ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 8.0G 1.1G 6.9G 14% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 17M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 380M 0 380M 0% /run/user/0