All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heinz J . Mauelshagen" <mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Disk crash , LVM and ext2... (bis)
Date: Fri Oct  4 05:40:01 2002	[thread overview]
Message-ID: <20021004123352.A9010@sistina.com> (raw)
In-Reply-To: <3D99B6CC.30102@free.fr>; from emmanuel.varagnat@free.fr on Tue, Oct 01, 2002 at 04:53:00PM +0200

On Tue, Oct 01, 2002 at 04:53:00PM +0200, Emmanuel Varagnat wrote:
> Emmanuel Varagnat wrote:
> > I played a bit with that, and it looks like when device-mapper can't 
> > access a zone it returns zeros.
> > What I did, is to create an LV over 4 or 5 partitions, format it, zeroed 
> > the first partition, do a 'vgscan -P' and try to read the block device 
> > (LV raw data).
> > I supposed that this is the device-mapper that hide the missing 
> > informations by returning zeros. Is there a way to know (via ioctl for 
> > example) that a data is not available ?
> > For my program, I need to know, what is readable and what is not readable.
> > 
> 
> Do you think the LV_BMAP ioctl command could tell me if a block is 
> available or not into the LV ?
> Its purpose is to give the sector number and the drive of a logical 
> block, isn't it ?
> 
> What I want from the LVM is to tell me if data returned by a read 
> command can be trusted. If it returns me a lot of zeros is it because 
> the block is not available or because the block effectivly contains zeros.

We don't support zeroing of the data in the error case so far and do return
an io error to the application. Later we plan to as an option.

So today you get a read error if the block is not available and the data
is not zeroed in memory. No need to (ab)use LV_BMAP.

If your application needs to distinguish those cases anyways, you would want
to stay with 'io error returned'.

> 
> Thanks a lot.
> 
> -=( manu )=-
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  reply	other threads:[~2002-10-04  5:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-24 17:51 [linux-lvm] Disk crash , LVM and ext2... (bis) Emmanuel Varagnat
2002-09-25  2:22 ` Patrick Caulfield
2002-09-25  2:43   ` Emmanuel Varagnat
2002-09-25  2:57     ` Patrick Caulfield
2002-09-30 17:55       ` Emmanuel Varagnat
2002-10-01  9:53         ` Emmanuel Varagnat
2002-10-04  5:40           ` Heinz J . Mauelshagen [this message]
2002-10-09 13:59             ` Emmanuel Varagnat

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=20021004123352.A9010@sistina.com \
    --to=mauelshagen@sistina.com \
    --cc=linux-lvm@sistina.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.