Skip to content

Instantly share code, notes, and snippets.

@kyledrake
Forked from briancline/ceph-grow-rbd-xfs
Created March 14, 2017 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyledrake/6e14a033718ea68b7ef6a1b0031bebb5 to your computer and use it in GitHub Desktop.
Save kyledrake/6e14a033718ea68b7ef6a1b0031bebb5 to your computer and use it in GitHub Desktop.
Growing a Ceph RBD volume and an XFS filesystem contained within
# df -h /dev/rbd0
Filesystem Size Used Avail Use% Mounted on
/dev/rbd0 1.5T 1.5T 557M 100% /mnt/media
# rbd info media/media01
rbd image 'media01':
size 1536 GB in 393216 objects
order 22 (4096 kB objects)
block_name_prefix: rb.0.1098.74b0dc51
format: 1
# rbd resize media/media01 --size 4194304
# rbd info media/media01
rbd image 'media01':
size 4096 GB in 1048576 objects
order 22 (4096 kB objects)
block_name_prefix: rb.0.1098.74b0dc51
format: 1
# umount -l /mnt/media01
# rbd unmap /dev/rbd0
# rbd map media/media01
# mount -o nouuid /dev/rbd/media/media01 /mnt/media
# xfs_growfs /mnt/media -d
meta-data=/dev/rbd3 isize=256 agcount=33, agsize=12581888 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=402653184, imaxpct=5
= sunit=1024 swidth=1024 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=196608, version=2
= sectsz=512 sunit=8 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 402653184 to 1073741824
# df -h /dev/rbd0
Filesystem Size Used Avail Use% Mounted on
/dev/rbd3 4.0T 1.5T 2.6T 38% /mnt/media
# umount /mnt/media
# xfs_admin -U generate /dev/rbd3
Clearing log and setting UUID
writing all SBs
new UUID = 3c2275d5-2527-49c8-8adc-3fee074e51d1
# mount /mnt/media
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment