diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-09-16T12·13+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-09-16T12·13+0200 |
commit | f0ef6b74b93344798e44c6dc527f88a78b75a32f (patch) | |
tree | 8975a82b25a4410e2fc36e80cc042d74675396d7 /doc/manual/troubleshooting/links-nix-store.xml | |
parent | 67e5dd3ce9f46f810c06e16671e98f8e56b4e25c (diff) | |
parent | 8901acc97664aa8ebf687ee904428aa57a5192be (diff) |
Merge branch 'master' of github.com:thatdocslady/nix
Conflicts: doc/manual/release-notes.xml doc/manual/writing-nix-expressions.xml
Diffstat (limited to 'doc/manual/troubleshooting/links-nix-store.xml')
-rw-r--r-- | doc/manual/troubleshooting/links-nix-store.xml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/manual/troubleshooting/links-nix-store.xml b/doc/manual/troubleshooting/links-nix-store.xml new file mode 100644 index 000000000000..5efec8e8bc53 --- /dev/null +++ b/doc/manual/troubleshooting/links-nix-store.xml @@ -0,0 +1,43 @@ +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + version="5.0" + xml:id="ch-links-nix-store"> + +<title><quote>Too many links</quote> Error in the Nix store</title> + + +<para>Symptom: when building something, you get an error message such as + +<screen> +... +<literal>mkdir: cannot create directory `/nix/store/<replaceable>name</replaceable>': Too many links</literal></screen> + +</para> + +<para>This is usually because you have more than 32,000 subdirectories +in <filename>/nix/store</filename>, as can be seen using <command>ls +-l</command>: + +<screen> +$ ls -l /nix/store +drwxrwxrwt 32000 nix nix 4620288 Sep 8 15:08 store</screen> + +The <literal>ext2</literal> file system is limited to an inode link +count of 32,000 (each subdirectory increasing the count by one). +Furthermore, the <literal>st_nlink</literal> field of the +<function>stat</function> system call is a 16-bit value.</para> + +<para>This only happens on very large Nix installations (such as build +machines).</para> + +<para>Quick solution: run the garbage collector. You may want to use +the <option>--max-links</option> option.</para> + +<para>Real solution: put the Nix store on a file system that supports +more than 32,000 subdirectories per directory, such as ReiserFS. +(This doesn’t solve the <literal>st_nlink</literal> limit, but +ReiserFS lies to the kernel by reporting a link count of 1 if it +exceeds the limit.)</para> + +</chapter> \ No newline at end of file |