From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Barbe Subject: Re: krbd & live resize Date: Tue, 30 Jul 2013 12:07:24 +0200 Message-ID: <51F7905C.6050604@ksperis.com> References: <51F6E389.1040607@dachary.org> <51F78D74.803@ksperis.com> <51F78E0B.4030106@dachary.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-we0-f169.google.com ([74.125.82.169]:63035 "EHLO mail-we0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758444Ab3G3KH2 (ORCPT ); Tue, 30 Jul 2013 06:07:28 -0400 Received: by mail-we0-f169.google.com with SMTP id n5so4216344wev.14 for ; Tue, 30 Jul 2013 03:07:27 -0700 (PDT) In-Reply-To: <51F78E0B.4030106@dachary.org> Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Loic Dachary Cc: Ceph Development Live resize has been added in 3.6.10 for krbd client. There is a need to do revalidate_disk() on rbd resize : https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/co= mmit/?id=3Dd98df63ea7e87d5df4dce0cece0210e2a777ac00 Cheers Laurent Le 30/07/2013 11:57, Loic Dachary a =E9crit : > > > On 30/07/2013 11:55, Laurent Barbe wrote: >> Hello Loic, >> >> which version of kernel do you use for krbd ? > > Linux i-csnces-0000 3.2.0-41-generic #66-Ubuntu SMP > > That may explain a few things ... :-) > >> >> Laurent >> >> >> Le 29/07/2013 23:50, Loic Dachary a =E9crit : >>> Hi, >>> >>> This works: >>> >>> lvcreate --name tmp --size 10G all >>> Logical volume "tmp" created >>> mkfs.ext4 /dev/all/tmp >>> mount /dev/all/tmp /mnt >>> blockdev --getsize64 /dev/all/tmp >>> 10737418240 >>> lvextend -L+1G /dev/all/tmp >>> Extending logical volume tmp to 11,00 GiB >>> Logical volume tmp successfully resized >>> blockdev --getsize64 /dev/all/tmp >>> 11811160064 >>> resize2fs /dev/all/tmp >>> resize2fs 1.41.12 (17-May-2010) >>> Filesystem at /dev/all/tmp is mounted on /mnt; on-line resizing req= uired >>> old desc_blocks =3D 1, new_desc_blocks =3D 1 >>> Performing an on-line resize of /dev/all/tmp to 2883584 (4k) blocks= =2E >>> The filesystem on /dev/all/tmp is now 2883584 blocks long. >>> >>> This does not work: >>> >>> rbd create --size 10240 tmp >>> rbd info tmp >>> rbd image 'tmp': >>> size 10240 MB in 2560 objects >>> order 22 (4096 KB objects) >>> block_name_prefix: rb.0.12dd.238e1f29 >>> format: 1 >>> rbd map tmp >>> mkfs.ext4 /dev/rbd1 >>> mount /dev/rbd1 /mnt >>> blockdev --getsize64 /dev/rbd1 >>> 10737418240 >>> rbd resize --size 20000 tmp >>> blockdev --getsize64 /dev/rbd1 >>> 10737418240 >>> resize2fs /dev/rbd1 >>> resize2fs 1.42 (29-Nov-2011) >>> The filesystem is already 2621440 blocks long. Nothing to do! >>> >>> It does work after umounting: >>> >>> umount /mnt >>> blockdev --getsize64 /dev/rbd1 >>> fsck -f /dev/rbd1 >>> resize2fs /dev/rbd1 >>> resize2fs 1.42 (29-Nov-2011) >>> Resizing the filesystem on /dev/rbd1 to 5120000 (4k) blocks. >>> The filesystem on /dev/rbd1 is now 5120000 blocks long. >>> >>> I assume there should be "something" in KRBD to allow for the same = behavior as with LVM but I don't know enough about the kernel to be mor= e specific. Maybe something similar to ioctl BLKRRPART ? >>> >>> Cheers >>> >> -- >> To unsubscribe from this list: send the line "unsubscribe ceph-devel= " in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html