Bug #14200
The mounted image can not expansion
0%
Description
Wheather the ceph linux kernal client support the expansion?
My linux kernal is 3.10.
Such as below after i finished mount /dev/rbd1 on /mnt1.Then I resize the song/im1 to 1024.But the mount info
on /mnt is not change.When the image size is changed,how to resize the mount image size.
rbd info song/im1
rbd image 'im1':
size 512 MB in 128 objects
order 22 (4096 kB objects)
block_name_prefix: rbd_data.ac4b2ae8944a
format: 2
features: layering
flags:
rbd showmapped
id pool image snap device
1 song im1 - /dev/rbd1
2 song im2 - /dev/rbd2
[root@client101 dev]# mount /dev/rbd1 /mnt1
[root@client101 dev]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 234882056 143628704 79298920 65% /
devtmpfs 32884724 0 32884724 0% /dev
tmpfs 32892996 4 32892992 1% /dev/shm
tmpfs 32892996 10508 32882488 1% /run
tmpfs 32892996 0 32892996 0% /sys/fs/cgroup
/dev/sda1 388480 108700 255204 30% /boot
/dev/rbd2 999320 2564 927944 1% /mnt
/dev/rbd1 499656 780 462180 1% /mnt1
rbd resize song/im1 --size 1024
Resizing image: 100% complete...done.
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 225G 137G 76G 65% /
devtmpfs 32G 0 32G 0% /dev
tmpfs 32G 4.0K 32G 1% /dev/shm
tmpfs 32G 11M 32G 1% /run
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/sda1 380M 107M 250M 30% /boot
/dev/rbd2 976M 2.6M 907M 1% /mnt
/dev/rbd1 488M 780K 452M 1% /mnt1
History
#1 Updated by Ilya Dryomov about 8 years ago
- Status changed from New to Closed
Kernel client does support resize, both up and down.
"rbd resize" command resizes /dev/rbd* block device, not the filesystem. After you do "rbd resize", you have to resize the filesystem separately with resize2fs(8) or similar - just like if you extend a partition on a regular block device.