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

Re: [linux-lvm] Disk crash , LVM and ext2... (bis)

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.

Thanks a lot.

-=( manu )=-

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