wetopi / docker-volume-rbd

Docker Engine managed plugin to manage RBD volumes.
MIT License
69 stars 18 forks source link

Is there a way to grow the filesystem after growing the RBD? #21

Closed rsjohn closed 2 years ago

rsjohn commented 2 years ago

I went into ceph backend and grew the image from 900mb to 1.5gig. I then updated the config: volumes: test: driver: wetopi/rbd driver_opts: size: 1500

However the mount still shows as 900mb and resize2fs command does not seem to work on /dev/rbd0

What am I missing?

sitamet commented 2 years ago

This is my method:

rbd map my_pool/my_volume
# /dev/rbd0
fsck.ext4 /dev/rbd0

# resize:
rbd resize --size 1.5G my_pool/my_volume

# clean the MMP (multiple mount protection)
tune2fs -f -E clear_mmp /dev/rbd0
e2fsck -f /dev/rbd0
resize2fs /dev/rbd0
rsjohn commented 2 years ago

Thank you so much. This works for me!