From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Priebe - Profihost AG Subject: Re: rbd STDIN import does not work / wip-rbd-export-stdout Date: Tue, 27 Nov 2012 10:16:47 +0100 Message-ID: <50B484FF.9070500@profihost.ag> References: <50B36C9F.80107@profihost.ag> <50B36ED1.1020108@filoo.de> <50B37027.5000701@profihost.ag> <2EC6C33E-4909-4AE5-B8C0-5D7A5856EA57@profihost.ag> <50B3CA6F.6000000@inktank.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail.profihost.ag ([85.158.179.208]:37090 "EHLO mail.profihost.ag" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758478Ab2K0JQw (ORCPT ); Tue, 27 Nov 2012 04:16:52 -0500 In-Reply-To: <50B3CA6F.6000000@inktank.com> Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Dan Mick Cc: Oliver Francke , "ceph-devel@vger.kernel.org" Am 26.11.2012 21:00, schrieb Dan Mick: > It writes zeros; there's no way for it to know how many zeros are > coming. It could make a half-hearted attempt depending on its buffer > size and the amount of data the source is willing to buffer. Yes OK that's correct. Maybe the buffer should be the size of a rados object / stripe size? So a whole stripe containing zeros could be ignored? > As for fstrim: on the rbd image?....sure, if it's a filesystem, it ought > to work (modulo some bugs I've heard about with 32-bit vs. 64-bit > offsets in qemu... :) ) it works fine with my patches i send to qemu. But right now they're no upstream an nobody of the qemu people answers anymore. So right now i'll keep my patches and be lucky others can't use RBD and fstrim. So maybe inktank should push this a bit more to the qemu people. Stefan > On 11/26/2012 11:35 AM, Stefan Priebe - Profihost AG wrote: >> Hi, >> >> Export isn't a problem. But import should handle this correctly. Or >> does it write zeros to the object file >> >> But even if it write zeros to the file shouldn't a fstrim fix this? >> >> Stefan >> >> Am 26.11.2012 um 18:34 schrieb Dan Mick : >> >>> Yes, it's broken too (there's an issue open on it). I have some test >>> code done over the weekend >>> and will be pushing it after review. >>> >>> Be aware that import/export to stdin/stdout are limited in that they >>> cannot preserve sparseness >>> of the image, but they should both be working soon at least. >>> >>> On Mon, Nov 26, 2012 at 5:35 AM, Stefan Priebe - Profihost AG >>> wrote: >>>> Am 26.11.2012 14:29, schrieb Oliver Francke: >>>>> >>>>> Well... >>>> >>>> >>>> makes no difference: >>>> gzip -dc vm-101-disk-1.img.gz | rbd import --format=2 --size=40960 - >>>> kvmpool1/vm-101-disk-1 >>>> >>>> rbd: error reading file: (29) Illegal seek >>>> Importing image: 0% complete...failed. >>>> rbd: import failed: (29) Illegal seek >>>> >>>> I think the problem is that ceph seeks in File when it get's zeros (not >>>> filled content). But seeking doesn't work on stdin. It has to read from >>>> stdin until there are no more zeros. >>>> >>>> Stefan >>>> >>>> >>>>> On 11/26/2012 02:20 PM, Stefan Priebe - Profihost AG wrote: >>>>>> >>>>>> Hello list, >>>>>> >>>>>> i know branch wip-rbd-export-stdout is work in progress but it is >>>>>> more >>>>>> than useful ;-) >>>>>> >>>>>> When i try to import an image i get: >>>>>> >>>>>> # gzip -dc vm-101-disk-1.img.gz | rbd import --format=2 >>>>>> --size=42949672960 - kvmpool1/vm-101-disk-1 >>>>>> rbd: error reading file: (29) Illegal seek >>>>>> Importing image: 0% complete...failed. >>>>>> rbd: import failed: (29) Illegal seek >>>>>> >>>>>> Anything i've tried wrong? >>>>> >>>>> >>>>> I would assume, that size is already in MiB? Seems to be a slightly >>>>> too >>>>> big value... Not tried myself, though... >>>>> >>>>> Oliver. >>>>> >>>>>> >>>>>> Greets, >>>>>> Stefan >>>>>> -- >>>>>> 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" 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" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html