du on ecryptfs reports incorrect file sizes
Bug #390833 reported by
Dominic Sacré
This bug affects 11 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eCryptfs |
Fix Released
|
Medium
|
Tyler Hicks | ||
ecryptfs-utils (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
Lucid |
Invalid
|
Medium
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Medium
|
Andy Whitcroft | ||
Lucid |
Fix Released
|
Medium
|
Andy Whitcroft |
Bug Description
I'm using an encrypted home directory on Ubuntu Jaunty. When I create a new file in my home directory or copy and existing file/folder, du shows its size as zero bytes:
das@serenity ~ > dd if=/dev/zero of=test bs=1024 count=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.114302 s, 9.2 MB/s
das@serenity ~ > du test
0 test
das@serenity ~ > ll test
-rw-r--r-- 1 das das 1048576 2009-06-22 22:14 test
du keeps reporting a size of zero bytes until the encrypted directory is remounted. After that, the output seems to be correct.
Changed in ecryptfs: | |
assignee: | nobody → Tyler Hicks (tyhicks) |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: kernel |
Changed in ecryptfs: | |
status: | Confirmed → In Progress |
Changed in ecryptfs-utils (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
summary: |
- du reports newly created files on ecryptfs as empty + du on ecryptfs reports incorrect file sizes |
To post a comment you must log in.
Hello, thanks for the bug report.
I'll leave the definitive answer to Tyler Hicks, the upstream kernel maintainer, but I'll try to field this question as best as I can.
Basically, there is a bit of time where the new file exists only in kernel memory, before it gets synced to disk. You might try running "sync", and seeing if it gets flushed.
Tyler, can you provide some more information?
:-Dustin