我很好奇是否可以创建(例如)10G 卷的快照,然后将快照的大小调整为 20G,以及其中的文件系统?
使用lvresize
或lvextend
仅更改 COW 表大小,LV 大小保持在 10G,随后尝试调整文件系统大小失败。例如
# lvextend --size 20G --resizefs /dev/vg_data/bigsize_test
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
/dev/mapper/vg_data-bigsize_test: clean, 27/655360 files, 85571/2621440 blocks
Extending logical volume bigsize_test to 20.00 GiB
Logical volume bigsize_test successfully resized
resize2fs 1.42 (29-Nov-2011)
The containing partition (or device) is only 2621440 (4k) blocks.
You requested a new size of 5242880 blocks.
fsadm: Resize ext4 failed
fsadm failed: 1
这留下了一个很大的快照COW-table size
,但不是一个很大的LV Size
,这是我的目标:
# lvdisplay /dev/vg_data/bigsize_test
--- Logical volume ---
LV Name /dev/vg_data/bigsize_test
VG Name vg_data
LV UUID 77uCVJ-Sdml-KlQS-xGkS-mPiT-ITzU-0i7Zwi
LV Write Access read/write
LV snapshot status active destination for /dev/vg_data/origin
LV Status available
# open 0
LV Size 10.00 GiB
Current LE 2560
COW-table size 20.00 GiB
COW-table LE 5120
Allocated to snapshot 0.00%
Snapshot chunk size 4.00 KiB
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:30
是否可以制作比其原始更大的快照?