[Varnish] #1682: If file-storage pre-created and more than 50% of the file-system space, Varnish does not start.
Varnish
varnish-bugs at varnish-cache.org
Wed Sep 9 08:48:39 CEST 2015
#1682: If file-storage pre-created and more than 50% of the file-system space,
Varnish does not start.
----------------------+-----------------------
Reporter: xcir | Owner:
Type: defect | Status: reopened
Priority: normal | Milestone:
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: |
----------------------+-----------------------
Changes (by xcir):
* status: closed => reopened
* resolution: fixed =>
Comment:
Hi, I got an error message that "Error: (-sfile) allocation error: No
space left on device" at the time of varnish restart.
Environment
{{{
varnishd (varnish-4.1.0-beta1 revision 017ec21) and varnishd (varnish-
trunk revision ca88bce)
Linux cache03 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May 13 10:06:09 UTC
2015 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.1.1503 (Core)
filesystem is xfs.
}}}
The cause is to fail to fallocate in libvarnish/vfil.c (Even if
"(st.st_blocks * 512) + fsspace >= size")
--fail log
{{{
loggin
syslog(6,"VFIL:st_blocks*512:%ld st_size:%ld free-space:%ld require-
size:%ld",st.st_blocks * 512, st.st_size, fsspace ,size);
syslog:
Sep 9 13:38:45 cache03 varnishd: VFIL:st_blocks*512:46170902528
st_size:46170898432 free-space:3188826112 require-size:46170898432
stdout:
Error: (-sfile) allocation error: No space left on device
}}}
https://github.com/varnish/Varnish-
Cache/blob/117c2bdcfbb8c11f48bd9137e76edfc746dfbe71/lib/libvarnish/vfil.c#L188
I think, if "st_blocks * 512" is greater than st_size is not require
fallocate. (Because already allocated)
I send patch.
https://www.varnish-cache.org/trac/attachment/ticket/1682/0001-If-
st_blocks-512-is-greater-than-st_size-is-not-requ.patch
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1682#comment:3>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list