Max hard link per file on ext4
Hi,
I would like to know if there is a limit for a file to be hard linked on a ext4 system. Example : /root/test.txt. How many times could I hardlink it in different folder across the whole system before it starts to complain ? I read some figures saying approx 65000 but it was on the same folder. My case is different since the folders are different ones. Any thoughts ? Thanks, LeHibou2 |
I do not think there is a limit on this. probably the struct inode can hold only 32bit int. Also may depend on the os version.
http://lxr.free-electrons.com/source/include/linux/fs.h line 550 |
The kernel's compiled-in EXT4_LINK_MAX is 65000 (file ext4.h in the kernel source). It's the same for an ordinary file or a directory.
|
https://ext4.wiki.kernel.org/index.p...ut#Inode_Table
The indicated limit on hard link count is 16 bits - 65534 (2^16 -1, as 0 indicates an unused inode) |
Quote:
Code:
/var/tmp $ cat ltest.sh |
Does appear to be an ext4 internal limit. Not sure why they imposed that, the comments don't say.
|
All times are GMT -5. The time now is 07:06 PM. |