discard support

32 views
Skip to first unread message

Vasiliy Tolstov

unread,
Mar 25, 2015, 6:05:58 AM3/25/15
to coreos-dev
Hello, as i see you switched to ext4, why you not enable by default
discard option? For thin provisioned storage this is very useful
option.


--
Vasiliy Tolstov,
e-mail: v.to...@selfip.ru
jabber: va...@selfip.ru

Ilya Dmitrichenko

unread,
Mar 25, 2015, 6:23:26 AM3/25/15
to coreos-dev
Vasiliy, may be you could give some background with pros/cons of that ext4 feature, either in your own words or by pointing to some docs that you have read on this?

Vasiliy Tolstov

unread,
Mar 25, 2015, 6:26:01 AM3/25/15
to coreo...@googlegroups.com
2015-03-25 13:23 GMT+03:00 Ilya Dmitrichenko <errorde...@gmail.com>:
> Vasiliy, may be you could give some background with pros/cons of that ext4
> feature, either in your own words or by pointing to some docs that you have
> read on this?


You can google discard ssd thin provision and other things, In two
words - discard under virtual machines brings ability to free space on
host when file deleted inside vm.
Without this option used space does not freed when file deleted inside vm.

Ilya Dmitrichenko

unread,
Mar 25, 2015, 6:27:52 AM3/25/15
to coreo...@googlegroups.com
Ok, but does that work on all hypervisors?

Vasiliy Tolstov

unread,
Mar 25, 2015, 6:46:32 AM3/25/15
to coreo...@googlegroups.com
2015-03-25 13:27 GMT+03:00 Ilya Dmitrichenko <errorde...@gmail.com>:
> Ok, but does that work on all hypervisors?


If this is not supported by hypervisor it silently dropped.

Vasiliy Tolstov

unread,
Mar 25, 2015, 6:47:59 AM3/25/15
to Vasiliy Tolstov, coreo...@googlegroups.com
2015-03-25 13:46 GMT+03:00 Vasiliy Tolstov <v.to...@selfip.ru>:
> If this is not supported by hypervisor it silently dropped.


But if coreos team provide flags for enabling discard on all devices
this is very useful for me =)

Michael Marineau

unread,
Mar 25, 2015, 5:37:08 PM3/25/15
to coreos-dev
IIRC some implementations of discard/trim can impair performance if
done as part of normal filesystem operations. On those systems a
periodic call to fstrim to do the cleanup as a batch job is more
appropriate. If you wish to use the runtime discard feature in ext4
you can create a /etc/fstab that looks something like the following:

LABEL=ROOT / ext4 discard 0 1
Reply all
Reply to author
Forward
0 new messages