From: Gionatan Danti <g.danti@assyoma.it>
To: Zdenek Kabelac <zkabelac@redhat.com>
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Snapshot behavior on classic LVM vs ThinLVM
Date: Wed, 26 Apr 2017 15:37:37 +0200 [thread overview]
Message-ID: <c5bee073-7871-fbb9-370d-8a1b322bbd86@assyoma.it> (raw)
In-Reply-To: <20ddda25-dacf-f4e2-8df4-f9bed1c62fe7@redhat.com>
On 26/04/2017 13:23, Zdenek Kabelac wrote:
>
> You need to use 'direct' write more - otherwise you are just witnessing
> issues related with 'page-cache' flushing.
>
> Every update of file means update of journal - so you surely can lose
> some data in-flight - but every good software needs to the flush before
> doing next transaction - so with correctly working transaction software
> no data could be lost.
I used "oflag=sync" for this very reason - to avoid async writes,
However, let's retry with "oflat=direct,sync".
This is the thinpool before filling:
[root@blackhole mnt]# lvs
LV VG Attr LSize Pool Origin Data% Meta%
Move Log Cpy%Sync Convert
thinpool vg_kvm twi-aot--- 1.00g 87.66 12.01
thinvol vg_kvm Vwi-aot--- 2.00g thinpool 43.83
root vg_system -wi-ao---- 50.00g
swap vg_system -wi-ao---- 7.62g
[root@blackhole storage]# mount | grep thinvol
/dev/mapper/vg_kvm-thinvol on /mnt/storage type ext4
(rw,relatime,seclabel,errors=remount-ro,stripe=32,data=ordered)
Fill the thin volume (note that errors are raised immediately due to
--errorwhenfull=y):
[root@blackhole mnt]# dd if=/dev/zero of=/mnt/storage/test.2 bs=1M
count=300 oflag=direct,sync
dd: error writing ‘/mnt/storage/test.2’: Input/output error
127+0 records in
126+0 records out
132120576 bytes (132 MB) copied, 14.2165 s, 9.3 MB/s
From syslog:
Apr 26 15:26:24 localhost lvm[897]: WARNING: Thin pool
vg_kvm-thinpool-tpool data is now 96.84% full.
Apr 26 15:26:27 localhost kernel: device-mapper: thin: 253:4: reached
low water mark for data device: sending event.
Apr 26 15:26:27 localhost kernel: device-mapper: thin: 253:4: switching
pool to out-of-data-space (error IO) mode
Apr 26 15:26:34 localhost lvm[897]: WARNING: Thin pool
vg_kvm-thinpool-tpool data is now 100.00% full.
Despite write errors, the filesystem is not in read-only mode:
[root@blackhole mnt]# touch /mnt/storage/test.txt; sync; ls -al
/mnt/storage
total 948248
drwxr-xr-x. 3 root root 4096 26 apr 15.27 .
drwxr-xr-x. 6 root root 51 20 apr 15.23 ..
drwx------. 2 root root 16384 26 apr 15.24 lost+found
-rw-r--r--. 1 root root 838860800 26 apr 15.25 test.1
-rw-r--r--. 1 root root 132120576 26 apr 15.26 test.2
-rw-r--r--. 1 root root 0 26 apr 15.27 test.txt
I can even recover free space via fstrim:
[root@blackhole mnt]# rm /mnt/storage/test.1; sync
rm: remove regular file ‘/mnt/storage/test.1’? y
[root@blackhole mnt]# fstrim -v /mnt/storage/
/mnt/storage/: 828 MiB (868204544 bytes) trimmed
[root@blackhole mnt]# lvs
LV VG Attr LSize Pool Origin Data% Meta%
Move Log Cpy%Sync Convert
thinpool vg_kvm twi-aot--- 1.00g 21.83 3.71
thinvol vg_kvm Vwi-aot--- 2.00g thinpool 10.92
root vg_system -wi-ao---- 50.00g
swap vg_system -wi-ao---- 7.62g
From syslog:
Apr 26 15:34:15 localhost kernel: device-mapper: thin: 253:4: switching
pool to write mode
To me, it seems that metadata updates completed because they hit the
already-allocated disk space, not triggering the remount-ro code. I am
missing something?
Regards.
--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti@assyoma.it - info@assyoma.it
GPG public key ID: FF5F32A8
next prev parent reply other threads:[~2017-04-26 13:37 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 14:31 [linux-lvm] Snapshot behavior on classic LVM vs ThinLVM Gionatan Danti
2017-04-07 8:19 ` Mark Mielke
2017-04-07 9:12 ` Gionatan Danti
2017-04-07 13:50 ` L A Walsh
2017-04-07 16:33 ` Gionatan Danti
2017-04-13 12:59 ` Stuart Gathman
2017-04-13 13:52 ` Xen
2017-04-13 14:33 ` Zdenek Kabelac
2017-04-13 14:47 ` Xen
2017-04-13 15:29 ` Stuart Gathman
2017-04-13 15:43 ` Xen
2017-04-13 17:26 ` Stuart D. Gathman
2017-04-13 17:32 ` Stuart D. Gathman
2017-04-14 15:17 ` Xen
2017-04-14 7:27 ` Gionatan Danti
2017-04-14 7:23 ` Gionatan Danti
2017-04-14 15:23 ` Xen
2017-04-14 15:53 ` Gionatan Danti
2017-04-14 16:08 ` Stuart Gathman
2017-04-14 17:36 ` Xen
2017-04-14 18:59 ` Gionatan Danti
2017-04-14 19:20 ` Xen
2017-04-15 8:27 ` Xen
2017-04-15 23:35 ` Xen
2017-04-17 12:33 ` Xen
2017-04-15 21:22 ` Xen
2017-04-15 21:49 ` Xen
2017-04-15 21:48 ` Xen
2017-04-18 10:17 ` Zdenek Kabelac
2017-04-18 13:23 ` Gionatan Danti
2017-04-18 14:32 ` Stuart D. Gathman
2017-04-19 7:22 ` Xen
2017-04-07 22:24 ` Mark Mielke
2017-04-08 11:56 ` Gionatan Danti
2017-04-07 18:21 ` Tomas Dalebjörk
2017-04-13 10:20 ` Gionatan Danti
2017-04-13 12:41 ` Xen
2017-04-14 7:20 ` Gionatan Danti
2017-04-14 8:24 ` Zdenek Kabelac
2017-04-14 9:07 ` Gionatan Danti
2017-04-14 9:37 ` Zdenek Kabelac
2017-04-14 9:55 ` Gionatan Danti
2017-04-22 7:14 ` Gionatan Danti
2017-04-22 16:32 ` Xen
2017-04-22 20:58 ` Gionatan Danti
2017-04-22 21:17 ` Zdenek Kabelac
2017-04-23 5:29 ` Xen
2017-04-23 9:26 ` Zdenek Kabelac
2017-04-24 21:02 ` Xen
2017-04-24 21:59 ` Zdenek Kabelac
2017-04-26 7:26 ` Gionatan Danti
2017-04-26 7:42 ` Zdenek Kabelac
2017-04-26 8:10 ` Gionatan Danti
2017-04-26 11:23 ` Zdenek Kabelac
2017-04-26 13:37 ` Gionatan Danti [this message]
2017-04-26 14:33 ` Zdenek Kabelac
2017-04-26 16:37 ` Gionatan Danti
2017-04-26 18:32 ` Stuart Gathman
2017-04-26 19:24 ` Stuart Gathman
2017-05-02 11:00 ` Gionatan Danti
2017-05-12 13:02 ` Gionatan Danti
2017-05-12 13:42 ` Joe Thornber
2017-05-14 20:39 ` Gionatan Danti
2017-05-15 12:50 ` Zdenek Kabelac
2017-05-15 14:48 ` Gionatan Danti
2017-05-15 15:33 ` Zdenek Kabelac
2017-05-16 7:53 ` Gionatan Danti
2017-05-16 10:54 ` Zdenek Kabelac
2017-05-16 13:38 ` Gionatan Danti
2018-02-27 18:39 ` Xen
2018-02-28 9:26 ` Zdenek Kabelac
2018-02-28 19:07 ` Gionatan Danti
2018-02-28 21:43 ` Zdenek Kabelac
2018-03-01 7:14 ` Gionatan Danti
2018-03-01 8:31 ` Zdenek Kabelac
2018-03-01 9:43 ` Gianluca Cecchi
2018-03-01 11:10 ` Zdenek Kabelac
2018-03-01 9:52 ` Gionatan Danti
2018-03-01 11:23 ` Zdenek Kabelac
2018-03-01 12:48 ` Gionatan Danti
2018-03-01 16:00 ` Zdenek Kabelac
2018-03-01 16:26 ` Gionatan Danti
2018-03-03 18:32 ` Xen
2018-03-04 20:34 ` Zdenek Kabelac
2018-03-03 18:17 ` Xen
2018-03-04 20:53 ` Zdenek Kabelac
2018-03-05 9:42 ` Gionatan Danti
2018-03-05 10:18 ` Zdenek Kabelac
2018-03-05 14:27 ` Gionatan Danti
2018-03-03 17:52 ` Xen
2018-03-04 23:27 ` Zdenek Kabelac
2017-04-22 21:22 ` Zdenek Kabelac
2017-04-24 13:49 ` Gionatan Danti
2017-04-24 14:48 ` Zdenek Kabelac
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=c5bee073-7871-fbb9-370d-8a1b322bbd86@assyoma.it \
--to=g.danti@assyoma.it \
--cc=linux-lvm@redhat.com \
--cc=zkabelac@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).