Bug 1404 - [Anolis OS 8.6][x86_64][anck&rhck][qcow2] 镜像磁盘热扩容失败
Summary: [Anolis OS 8.6][x86_64][anck&rhck][qcow2] 镜像磁盘热扩容失败
Status: RESOLVED WONTFIX
Alias: None
Product: Anolis OS 8
Classification: Anolis OS
Component: Images&Installations (show other bugs) Images&Installations
Version: 8.6
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: 葛立伟
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1338
  Show dependency tree
 
Reported: 2022-06-06 15:02 UTC by wanqian
Modified: 2022-06-15 17:46 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wanqian alibaba_cloud_group 2022-06-06 15:02:01 UTC
Description of problem:

镜像地址: https://mirrors.openanolis.cn/anolis/8.6/isos/BETA/x86_64/anolis-8.6-x86_64.qcow2
https://mirrors.openanolis.cn/anolis/8.6/isos/BETA/x86_64/anolis-8.6-x86_64-rhck.qcow2

默认镜像信息: 
#qemu-img info anolis-8.6-x86_64.qcow2
image: anolis-8.6-x86_64.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 1.3G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false

qemu-img resize anolis-8.6-x86_64.qcow2 +20G

修改后: 
[root@j66c07448.sqa.eu95:/disk0]
#qemu-img info wqanolis.qcow2
image: wqanolis.qcow2
file format: qcow2
virtual size: 40G (42949672960 bytes)
disk size: 1.5G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false



启动镜像后,扩容磁盘, 不能改变/dev/vda的大小.

[root@localhost anuser]# lsblk
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda    253:0    0  40G  0 disk
├─vda1 253:1    0  18G  0 part /
└─vda2 253:2    0   2G  0 part [SWAP]
[root@localhost anuser]# df -lh
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.7G     0  7.7G   0% /dev
tmpfs           7.7G     0  7.7G   0% /dev/shm
tmpfs           7.7G  420K  7.7G   1% /run
tmpfs           7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/vda1        18G  2.5G   15G  15% /
tmpfs           1.6G     0  1.6G   0% /run/user/1000
[root@localhost anuser]# growpart /dev/vda 1
NOCHANGE: partition 1 is size 37746688. it cannot be grown

其他信息: 
[root@localhost anuser]# rpm -qa | grep growpart
cloud-utils-growpart-0.31-3.an8.noarch
Comment 1 gaochang alibaba_cloud_group 2022-06-14 12:43:40 UTC
这个是standard partition的特点决定的,能扩容的只能是存储空间的最末尾的分区
Comment 2 wanqian alibaba_cloud_group 2022-06-14 16:21:14 UTC
了解了. bug 关闭
Comment 3 wanqian alibaba_cloud_group 2022-06-15 17:46:26 UTC
无需修复