Thanks Sébastien, Yes, it works fine with btrfs.
It also works with kvm + librbd + virtio + XFS (without mount / remount file system): # Guest : $ df -h | grep vdb /dev/vdb 500G 22G 479G 5% /share2 # On host : $ rbd resize datashare/share2 --size 614400 $ virsh blockresize --domain vmhost --path vdb --size 600G # Guest : $ xfs_growfs /share2 data blocks changed from 131072000 to 157286400 $ df -h | grep vdb /dev/vdb 600G 22G 579G 4% /share2 -- Laurent 2013/4/9 Sebastien Han <[email protected]> > This is pretty old thread, I launched a similar discussion a while ago > here http://www.spinics.net/lists/ceph-devel/msg08096.html. I got it > working but _only_ with btrfs… See the procedure below: > > # lsb_release -a > No LSB modules are available. > Distributor ID: Debian > Description: Debian GNU/Linux 7.0 (wheezy) > Release: 7.0 > Codename: wheezy > > # uname -a > Linux os-ci-test1 3.2.0-4-amd64 #1 SMP Debian 3.2.39-2 x86_64 GNU/Linux > > # rbd -p leseb create --size 4096 seb > # rbd -p leseb map seb > # mkfs.btrfs /dev/rbd0 > > WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL > WARNING! - see http://btrfs.wiki.kernel.org before using > > fs created label (null) on /dev/rbd0 > nodesize 4096 leafsize 4096 sectorsize 4096 size 4.00GB > Btrfs Btrfs v0.19 > # mount /dev/rbd0 /mnt/ > # rbd -p leseb resize seb --size 8192 > Resizing image: 100% complete…done. > # fdisk -l /dev/rbd0 > > Disk /dev/rbd0: 4294 MB, 4294967296 bytes > 255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors > Units = sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 4194304 bytes / 4194304 bytes > Disk identifier: 0x00000000 > > Disk /dev/rbd0 doesn't contain a valid partition table > > # blockdev --rereadpt /dev/rbd0 > # fdisk -l /dev/rbd0 > > Disk /dev/rbd0: 8589 MB, 8589934592 bytes > 255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors > Units = sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 4194304 bytes / 4194304 bytes > Disk identifier: 0x00000000 > > Disk /dev/rbd0 doesn't contain a valid partition table > > # df -h | grep mnt > /dev/rbd0 4.0G 56K 3.6G 1% /mnt > > # btrfs filesystem resize max /mnt > Resize '/mnt' of 'max' > # df -h | grep mnt > /dev/rbd0 8.0G 120K 7.6G 1% /mnt > > Unfortunately I just tried with ifs and it doesn't work... > > Cheers > > –––– > Sébastien Han > Cloud Engineer > > "Always give 100%. Unless you're giving blood." > > > > > > > > > > PHONE : +33 (0)1 49 70 99 72 – MOBILE : +33 (0)6 52 84 44 70 > EMAIL : [email protected] – SKYPE : han.sbastien > ADDRESS : 10, rue de la Victoire – 75009 Paris > WEB : www.enovance.com – TWITTER : @enovance > > On Apr 5, 2013, at 3:05 PM, Laurent Barbe <[email protected]> wrote: > > Thanks for your answer, > no more chance with blockdev --rereadpt or partprobe -s. :( > > > 2013/4/5 Wido den Hollander <[email protected]> > On 04/05/2013 12:34 PM, Laurent Barbe wrote: > Hello, > > I'm trying online resizing with RBD + XFS. But when i try to make a > xfs_growfs, it doesn't seen the new size. I don't use partition table, > os is debian squeeze / kernel 3.8.4 / ceph 0.56.4. > It seems that the mounted file system prevents update the block device > size ? > > If the file system is not mounted, or if I unmount + mount, xfs_growfs > works as expected. > > > When I block device is in use it can't change. When you unmount the > blockdevice is no longer in use and the new size can be detected. > > This is a not a RBD limitation, but it's something that goes for all block > devices in Linux. > > I've seen some patches floating around that could do this online, but I'm > not sure if they are in the kernel. > > You could try this: > > $ blockdev --rereadpt /dev/rbd1 > > Or > > $ partprobe -s /dev/rbd1 > > > -- > Wido den Hollander > 42on B.V. > > Phone: +31 (0)20 700 9902 > Skype: contact42on > > #### ORIGINAL SIZE #### > # parted /dev/rbd1 print > Model: Unknown (unknown) > Disk /dev/rbd1: *105MB* > > Sector size (logical/physical): 512B/512B > Partition Table: loop > > Number Start End Size File system Flags > 1 0,00B 105MB 105MB xfs > > #### RBD RESIZE #### > # rbd resize rbdxfs --size=200 > Resizing image: 100% complete...done. > > #### SIZE NOT CHANGE IF FS ON RBD1 IS MOUNTED #### > # parted /dev/rbd1 print > Model: Unknown (unknown) > Disk /dev/rbd1: *105MB* > > Sector size (logical/physical): 512B/512B > Partition Table: loop > > Number Start End Size File system Flags > 1 0,00B 105MB 105MB xfs > > #### UMOUNT FS --> SIZE OK #### > # umount /mnt/rbdxfs > # parted /dev/rbd1 print > Model: Unknown (unknown) > Disk /dev/rbd1: *210MB* > > Sector size (logical/physical): 512B/512B > Partition Table: loop > > Number Start End Size File system Flags > 1 0,00B 210MB 210MB xfs > > > Any Ideas ? > Thanks > > -- > Laurent Barbe > > > _______________________________________________ > ceph-users mailing list > [email protected] > http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com > > > > _______________________________________________ > ceph-users mailing list > [email protected] > http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com > > _______________________________________________ > ceph-users mailing list > [email protected] > http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com > > >
<<image.png>>
_______________________________________________ ceph-users mailing list [email protected] http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
