Hi, Thank you for additional info.
Francois Goudal: > You can find below all the strace related to /var/spool while starting=20 > squid, up to the error caused by aufs : > > root@wheezy:~# strace squid -D -YC -N 2>&1 | grep spool ::: > open("/var/spool/squid/swap.state",=20 > O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0644) =3D 18 ::: > open("/var/spool/squid/swap.state.new",=20 > O_WRONLY|O_CREAT|O_TRUNC|O_APPEND|O_LARGEFILE, 0644) =3D -1 EIO=20 > (Input/output error) Ok. First open(2) doesn't specify O_TRUNC, so copyup doesn't happen. But next open(2) has O_TRUNC and aufs starts copyup. > You can find attached the debug trace. It's the output of the dmesg=20 > command right after booting my system (squid is auto-started by init=20 > scripts). > I hope it helps. The debug log tells that the error happend in copying-up "spool". By the recent change, aufs copyup issues "rename" operation internally, which is - copyup a file from the lower layer to upper as a temporary hidden name. - sets various attributes to the file on the upper layer. - rename the file to the correct name. This is similar to these commands. $ cp ro/fileA rw/tmp_fileA $ chmod, chown brabra rw/tmp_fileA $ mv rw/tmp_fileA rw/fileA And the debug output shows the error happened in the last rename (mv) operation. Also it shows the root dir of the upper layer has a sticky bit set. Is this intentional? Did aufs produce a warning about the ownership and the bits at the mount-time? Or did you specify the "noverbose" option or something? While it may not be a problem, it looks weird to me. As you might know, the sticky bit of a dir restricts a delete operation, and the rename contains the delete operation semantically. But also the capability feature affects this behaviour. The debug log doesn't print anything about the capability, so I am not sure whether the sticky bit is the cause of the problem. Before I develop and send you more debug patch, it is worth to try dropping the sticky bit from your upper layer. Would you try? Of course as long as the sticky bit is intentinally set, we should go another debugging way. In this case, I'd ask you why the sticky bit is necessary. On the other hand, aufs copyup may have to support such case I am afraid... Still thinking... J. R. Okajima ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may