Hi,
some manual tests:
HOST:admin@8386hd51145:[~]: sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used; sudo vserver wheezy642 exec bash -c 'for i in {0001..1000}; do echo "some text2" > "/root/test/file_${i}.txt"; done;';sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used
inodes_used=366426
inodes_used=367426
HOST:admin@8386hd51145:[~]: sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used; sudo vserver wheezy642 exec bash -c 'for i in {0001..1000}; do echo "some text2" > "/root/test/file_${i}.txt"; done;';sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used
inodes_used=367426
inodes_used=368426
> overwrite increase inode usage dlimits and it is not normal
HOST:admin@8386hd51145:[~]: sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used; sudo vserver wheezy642 exec bash -c 'for i in {0001..1000}; do echo "some text2" >> "/root/test/file_${i}.txt"; done;';sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used
inodes_used=368426
inodes_used=368426
HOST:admin@8386hd51145:[~]: sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used; sudo vserver wheezy642 exec bash -c 'for i in {0001..1000}; do echo "some text2" >> "/root/test/file_${i}.txt"; done;';sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used
inodes_used=368426
inodes_used=368426
> Adding text to files do not change inodes so ok
HOST:admin@8386hd51145:[~]: sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used; sudo vserver wheezy642 exec bash -c 'for i in {0001..1000}; do echo "some text2" > "/root/test/file_${i}.txt"; done;';sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used
inodes_used=368426
inodes_used=369426
HOST:admin@8386hd51145:[~]: sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used; sudo vserver wheezy642 exec bash -c 'for i in {0001..1000}; do rm -f "/root/test/file_${i}.txt"; done;';sudo vdlimit --xid wheezy642 /vservers/wheezy642/|grep inodes_used
inodes_used=369426
inodes_used=368426
> removing the files revover inodes.
So the inode count is bad when files are overwritten.
Versions:
Kernel: 3.18.17-vs2.3.7.4
VS-API: 0x00020308
VCI: 0x0000000013013f11
util-vserver: 0.30.216-pre3117; Apr 2 2015, 18:02:34
Features:
CC: gcc, gcc (Debian 4.7.2-5) 4.7.2
CPPFLAGS: '-D_FORTIFY_SOURCE=2'
CFLAGS: '-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -std=c99 -Wall -pedantic -W -funit-at-a-time'
build/host: x86_64-pc-linux-gnu/x86_64-pc-linux-gnu
Use dietlibc: yes
Build C++ programs:
Build C99 programs: yes
Available APIs: compat,v11,fscompat,v13,net,v21,v22,v23,netv2
ext2fs Source: e2fsprogs
syscall(2) invocation: alternative
vserver(2) syscall#: 236/glibc
crypto api: nss
python bindings: yes
use library versioning: yes
Paths:
prefix: /usr
sysconf-Directory: /etc
cfg-Directory: /etc/vservers
initrd-Directory: /etc/init.d
pkgstate-Directory: /var/run/vservers
vserver-Rootdir: /vservers
best regards,
Ghislain.
Received on Wed Jul 8 14:50:27 2015