From: Dan Mick <dan.mick@inktank.com>
To: Stefan Priebe - Profihost AG <s.priebe@profihost.ag>
Cc: Oliver Francke <Oliver.Francke@filoo.de>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: rbd STDIN import does not work / wip-rbd-export-stdout
Date: Mon, 26 Nov 2012 12:00:47 -0800 [thread overview]
Message-ID: <50B3CA6F.6000000@inktank.com> (raw)
In-Reply-To: <2EC6C33E-4909-4AE5-B8C0-5D7A5856EA57@profihost.ag>
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.
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... :) )
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 <dan.mick@inktank.com>:
>
>> 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
>> <s.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
next prev parent reply other threads:[~2012-11-26 20:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-26 13:20 rbd STDIN import does not work / wip-rbd-export-stdout Stefan Priebe - Profihost AG
2012-11-26 13:29 ` Oliver Francke
2012-11-26 13:35 ` Stefan Priebe - Profihost AG
2012-11-26 17:34 ` Dan Mick
2012-11-26 19:35 ` Stefan Priebe - Profihost AG
2012-11-26 20:00 ` Dan Mick [this message]
2012-11-27 9:16 ` Stefan Priebe - Profihost AG
2012-11-27 22:50 ` Josh Durgin
2012-11-28 8:09 ` Stefan Priebe - Profihost AG
2012-11-28 18:51 ` Josh Durgin
2012-11-29 10:26 ` Stefan Priebe - Profihost AG
2012-11-28 14:53 ` Stefan Priebe - Profihost AG
2012-12-02 0:27 ` Dan Mick
2012-12-01 20:23 ` Stefan Priebe
2012-12-02 0:28 ` Dan Mick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50B3CA6F.6000000@inktank.com \
--to=dan.mick@inktank.com \
--cc=Oliver.Francke@filoo.de \
--cc=ceph-devel@vger.kernel.org \
--cc=s.priebe@profihost.ag \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox