Hi, My setup is: mail_attachment_dir = /var/mail/attachments mail_attachment_hash = %{sha512} mail_attachment_min_size = 64k mail_attachment_fs = sis posix
Something works - but I expected that is one instance of file, and this file is linked to messages. But here in folder I have got this:
sudo ls -la /var/mail/attachments/8b/67/
-rw-rw-rw- 3 buser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-0258913a92f2f45f0d700000035f3f08 -rw-rw-rw- 1 cuser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-28571b018ff2f45f0c700000035f3f08 -rw-rw-rw- 3 buser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-50315d3a8ef2f45f0a700000035f3f08 -rw-rw-rw- 1 auser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-586cdb378ef2f45f07700000035f3f08 drwxrwsrwx 2 buser dovecot 4096 Jan 5 23:13 hashes
sudo ls -la /var/mail/attachments/8b/67/hashes/
-rw-rw-rw- 3 buser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258
What is wrog? How to setup SIS to get one instance of file? Regards Michal
Hi Michal,
On 06.01.21 00:18, Michał Kiljański wrote:
Hi, My setup is: mail_attachment_dir = /var/mail/attachments mail_attachment_hash = %{sha512} mail_attachment_min_size = 64k mail_attachment_fs = sis posix
Something works - but I expected that is one instance of file, and this file is linked to messages. But here in folder I have got this:
sudo ls -la /var/mail/attachments/8b/67/
-rw-rw-rw- 3 buser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-0258913a92f2f45f0d700000035f3f08 -rw-rw-rw- 1 cuser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-28571b018ff2f45f0c700000035f3f08 -rw-rw-rw- 3 buser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-50315d3a8ef2f45f0a700000035f3f08 -rw-rw-rw- 1 auser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-586cdb378ef2f45f07700000035f3f08 drwxrwsrwx 2 buser dovecot 4096 Jan 5 23:13 hashes
sudo ls -la /var/mail/attachments/8b/67/hashes/
-rw-rw-rw- 3 buser dovecot 5425280 Jan 5 23:13 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258
What is wrog? How to setup SIS to get one instance of file?
SIS uses hard links. In your example the attachment in 8b/67/hashes/ is referenced in 2 other files (aka attached in 2 mails) in the 8b/67/ directory. So the data is stored only once on disk but referenced in 3 directory entries. You can see the refcount in column 3 of ls -l.
Best,
Patrick Cernko pcernko@mpi-klsb.mpg.de +49 681 9325 5815 Joint Administration: Information Services and Technology Max-Planck-Institute für Informatik & Softwaresysteme
Ok, thanks. But :) What is strange for me is disk usage.
du -s -h /var/mail/attachments/8b/67/
16M /var/mail/attachments/8b/67/
check indes ls -i /var/mail/attachments/8b/67/ 662975 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-28571b018ff2f45f0c700000035f3f08 662974 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-50315d3a8ef2f45f0a700000035f3f08 662973 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-586cdb378ef2f45f07700000035f3f08
ls -i /var/mail/attachments/8b/67/hashes/ 662974 8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258
Is this correct? As I read about hard link - links should point to the same inode, each link.
So how to get real disk usage for the folder with attachments?
śr., 6 sty 2021 o 10:43 Patrick Cernko pcernko@mpi-klsb.mpg.de napisał(a):
Hi Michal,
On 06.01.21 00:18, Michał Kiljański wrote:
Hi, My setup is: mail_attachment_dir = /var/mail/attachments mail_attachment_hash = %{sha512} mail_attachment_min_size = 64k mail_attachment_fs = sis posix
Something works - but I expected that is one instance of file, and this file is linked to messages. But here in folder I have got this:
sudo ls -la /var/mail/attachments/8b/67/
-rw-rw-rw- 3 buser dovecot 5425280 Jan 5 23:13
8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-0258913a92f2f45f0d700000035f3f08
-rw-rw-rw- 1 cuser dovecot 5425280 Jan 5 23:13
8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-28571b018ff2f45f0c700000035f3f08
-rw-rw-rw- 3 buser dovecot 5425280 Jan 5 23:13
8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-50315d3a8ef2f45f0a700000035f3f08
-rw-rw-rw- 1 auser dovecot 5425280 Jan 5 23:13
8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258-586cdb378ef2f45f07700000035f3f08
drwxrwsrwx 2 buser dovecot 4096 Jan 5 23:13 hashes
sudo ls -la /var/mail/attachments/8b/67/hashes/
-rw-rw-rw- 3 buser dovecot 5425280 Jan 5 23:13
8b67b29a73b74ecf48e17e789051602cec13aa78cc01c06c8eee1ca4be7c8e07f700cdc9e9ca0381fa3541bdd4e26289de1d7eee763233dfaa0a200a264e5258
What is wrog? How to setup SIS to get one instance of file?
SIS uses hard links. In your example the attachment in 8b/67/hashes/ is referenced in 2 other files (aka attached in 2 mails) in the 8b/67/ directory. So the data is stored only once on disk but referenced in 3 directory entries. You can see the refcount in column 3 of ls -l.
Best,
Patrick Cernko pcernko@mpi-klsb.mpg.de +49 681 9325 5815 Joint Administration: Information Services and Technology Max-Planck-Institute für Informatik & Softwaresysteme
participants (2)
-
Michał Kiljański
-
Patrick Cernko