Re: xfs on ceph RBD resizing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/20/2013 11:42 PM, Wido den Hollander wrote:
On 07/20/2013 05:16 PM, Sage Weil wrote:
On Sat, 20 Jul 2013, Wido den Hollander wrote:
On 07/20/2013 06:56 AM, Jeffrey 'jf' Lim wrote:
On Fri, Jul 19, 2013 at 12:54 PM, Jeffrey 'jf' Lim
<jfs.world@xxxxxxxxx>
wrote:
hey folks, I was hoping to be able to use xfs on top of RBD for a
deployment of mine. And was hoping for the resize of the RBD
(expansion, actually, would be my use case) in the future to be as
simple as a "resize on the fly", followed by an 'xfs_growfs'.'

I just found a recent post, though
(http://lists.ceph.com/pipermail/ceph-users-ceph.com/2013-June/002425.html),

that seems to indicate that what I have in mind may not be possible?
is this true? Do I have to unmount the system (or worse, do a reboot?)
before I can do an effective resize?


another question that just came to mind: would you recommend skipping
partitioning, and then making an xfs out of the entire drive? I'm just
thinking how you would have to deal with partitioning upon an RBD
resize.


Yes, skip the partitioning, otherwise you will have to expand the
partition
first prior to expanding the filesystem.

I also just did a quick test with the 3.8 kernel and XFS directly on
top of
the RBD device, but the new size won't get detected while XFS is
mounted.

Hrm.  Do you know if this works with LVM?


I verified again with the 3.8 kernel in Ubuntu 12.04
(linux-image-generic-lts-raring) and with XFS this works:

$ rbd create --size 20480 image1
$ rbd map image1
$ mkfs.xfs /dev/rbd/rbd/image1
$ mkdir /tmp/rbd1
$ mount -o rw,noatime /dev/rbd/rbd/image1 /tmp/rbd1
$ rbd resize --size 40960 image1
$ umount /tmp/rbd1
$ mount -o rw,noatime /dev/rbd/rbd/image1 /tmp/rbd1
$ xfs_growfs /tmp/rbd1

I couldn't get LVM to work though, pvcreate kept failing with:

"#filters/filter.c:134 /dev/rbd2: Skipping: Unrecognised LVM device type
250"

That is usually due to a filter in /etc/lvm/lvm.conf, but that is set to:

     # By default we accept every block device:
     filter = [ "a/.*/" ]

So I'm not sure why pvcreate fails to use that RBD device for LVM.


Ok, so I got LVM working by adding this in the lvm.conf:

types = [ "rbd", 249 ]

Where I fetched that information from /proc/devices

LVM however didn't see the new size, I had to unmount all my FSes on top of LVM, change the Volume Group to inactive and run pvresize before the new PV size was detected.

Again on the 3.8 kernel

Wido

Wido

sage





--
Wido den Hollander
42on B.V.

Phone: +31 (0)20 700 9902
Skype: contact42on
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux