<div dir="ltr"><div><div><div>Here are the answers to your questions<br><br></div>1. fsck does not report any error and the file contained inside the FS is definitely greater than the allocatable LV size <br># fsck.ext4 -f -C0 /dev/virtp/vol01 <br>e2fsck 1.43-WIP (15-Mar-2016)<br>Pass 1: Checking inodes, blocks, and sizes<br>Pass 2: Checking directory structure                                           <br>Pass 3: Checking directory connectivity<br>Pass 4: Checking reference counts<br>Pass 5: Checking group summary information<br>/dev/virtp/vol01: 12/65536 files (8.3% non-contiguous), 30492/262144 blocks   <br><br></div>2. Size of the file <br><br># du -hs fil <br>69M     fil<br><br></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(255,0,0)">(please note here that the LV virtual size is 1G but the parent pool size is just 40M I expect the file not to exceed 40M at any cost.)<br><br></span></span></div>3. lvs <br># lvs<br>  LV       VG    Attr       LSize  Pool     Origin Data%  Meta%  Move Log Cpy%Sync Convert<br>  virtpool virtp twi-aotzD- 40.00m                 100.00 1.37                            <br>  vol01    virtp Vwi-aotz--  1.00g virtpool                                       <br><div><br><br></div><div>You can do this on any virtual machine. I use qemu with virtio back-end. <br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 11:54 AM, Zdenek Kabelac <span dir="ltr"><<a href="mailto:zkabelac@redhat.com" target="_blank">zkabelac@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 3.5.2016 08:59, Bhasker C V wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does this mean the ext4 is showing wrong information. The file is reported<br>
being 90+MB but in actuality the size is less in the FS ?<br>
This is quite ok because it is just that file system being affected. I was<br>
however concerned that the file in this FS might have overwritten other LV<br>
data since the file is showing bigger than the volume size.<br>
<br>
</blockquote>
<br></span>
I've no idea what 'ext4' is showing you, but if you have i.e. 100M filesystem size, you could still have there e.g. 1TB file. Experience the magic:<br>
<br>
'truncate -s 1T myfirst1TBfile'<br>
<br>
As you can see 'ext4' is doing it's own over-provisioning with 'hole' files.<br>
The only important bits are:<br>
- is the filesystem consistent ?<br>
- is 'fsck' not reporting any error ?<br>
<br>
What's the 'real' size you get with 'du  myfirst1TBfile' or your wrong file ?<br>
<br>
Somehow I don't believe you can get  i.e.  90+MB 'du' size with 10MB filesystem size and 'fsck' would not report any problem.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I will try this using BTRFS.<br>
</blockquote>
<br></span>
For what exactly ??<br>
<br>
Regard<br>
<br>
Zdenek<br>
<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
<br>
On Fri, Apr 29, 2016 at 10:13 AM, Zdenek Kabelac <<a href="mailto:zkabelac@redhat.com" target="_blank">zkabelac@redhat.com</a><br></span><div><div class="h5">
<mailto:<a href="mailto:zkabelac@redhat.com" target="_blank">zkabelac@redhat.com</a>>> wrote:<br>
<br>
    On 28.4.2016 16:36, Bhasker C V wrote:<br>
<br>
        Zdenek,<br>
           Thanks. Here I am just filling it up with random data and so I am not<br>
        concerned about data integrity<br>
           You are right, I did get page lost during write errors in the kernel<br>
<br>
        The question however is even after reboot and doing several fsck of<br>
        the ext4fs<br>
        the file size "occupied" is more than the pool size. How is this ?<br>
        I agree that data may be corrupted, but there *is* some data and this<br>
        must be<br>
        saved somewhere. Why is this "somewhere" exceeding the pool size ?<br>
<br>
<br>
    Hi<br>
<br>
    Few key principles -<br>
<br>
<br>
    1. You should always mount extX fs with  errors=remount-ro  (tune2fs,mount)<br>
<br>
    2. There are few data={} modes ensuring various degree of data integrity,<br>
        An case you really care about data integrity here - switch to 'journal'<br>
        mode at price of lower speed. Default ordered mode might show this.<br>
        (i.e. it's the very same behavior as you would have seen with failing hdd)<br>
<br>
    3. Do not continue using thin-pool when it's full :)<br>
<br>
    4. We do miss more configurable policies with thin-pools.<br>
        i.e. do plan to instantiate 'error' target for writes in the case<br>
        pool gets full - so ALL writes will be errored - as of now - writes<br>
        to provisioned blocks may cause further filesystem confusion - that's<br>
        why  'remount-ro' is rather mandatory - xfs is recently being enhanced<br>
        to provide similar logic.<br>
<br>
<br>
<br>
    Regards<br>
<br>
<br>
    Zdenek<br>
<br>
    _______________________________________________<br>
    linux-lvm mailing list<br></div></div>
    <a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a> <mailto:<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a>><span class=""><br>
    <a href="https://www.redhat.com/mailman/listinfo/linux-lvm" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/linux-lvm</a><br>
    read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" rel="noreferrer" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-lvm" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" rel="noreferrer" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br>
<br>
</span></blockquote><div class="HOEnZb"><div class="h5">
<br>
_______________________________________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-lvm" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" rel="noreferrer" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br>
</div></div></blockquote></div><br></div>