1 |
On Thursday 28 May 2009 23:43:19 Maxim Wexler wrote: |
2 |
> > My advice: Save everything to another disk and then reformat the |
3 |
> > partition with a higher amount of inodes. |
4 |
> |
5 |
> Everything? Won't that copy over the extraneous inodes? |
6 |
|
7 |
You appear to not understand what an inode is. |
8 |
|
9 |
The inode IS THE FILE. It's a specially formatted block on disk, the |
10 |
filesystem knows how to interpret it, and it contains all known information |
11 |
(except one piece) about the file - as in, everything that ls can display. |
12 |
|
13 |
The missing bit of information is the name you call it by, that is stored in |
14 |
the directory (which is really just a special file and contains file names and |
15 |
their corresponding inode numbers - this is how the fs driver finds files). |
16 |
|
17 |
When you copy a file, the inode is read and a new one initialized in the new |
18 |
location. Then the disk blocks are read from the original and copied to the |
19 |
destination. As the destination does this, the fs driver knows how to keep |
20 |
it's inode accounting intact. |
21 |
|
22 |
So, there is no such thing as an extraneous inode. It's either being used (and |
23 |
thus gets copied) or it is not used (and does not get copied). You cannot copy |
24 |
a file without copying it's inode, and you cannot copy an inode without |
25 |
copying the file (special exception - files of zero length). |
26 |
|
27 |
> > This will create a file system with three times as many indoes as you |
28 |
> > had before. |
29 |
> |
30 |
> Is 3x enough? I haven't even gotten off the ground yet, 28 lines in |
31 |
> /var/db/pkg/world and my alotted inodes have been already used up? No |
32 |
> gnome, kde, gimp, office etc etc. |
33 |
|
34 |
You will need approx 500,000 inodes on an average machine total, split that up |
35 |
amongst your mounted volumes as appropriate. Use "find -x | wc" on an existing |
36 |
machine per mount point to get a rough idea of the scale. |
37 |
|
38 |
> FWIW, I thought I'd chroot in and do an emerge -C mozilla-firefox but |
39 |
> it hadn't even been installed yet! It choked on dev-java/jdk. So, did |
40 |
> emerge mozilla-firefox. Same thing: |
41 |
> |
42 |
> IOError: [Errno 28] No space left on device: |
43 |
> '/var/db/pkg/dev-java/-MERGING-sun-jdk-1.6.0.13/CFLAGS' |
44 |
|
45 |
Well, what did you expect? You have used up all the "index entries" for files, |
46 |
and you are trying to create more files. What else could it do apart from |
47 |
fail? |
48 |
|
49 |
Log onto the machine and delete some stuff. Then try unmerge to free up more |
50 |
space. Then backup, reformat, restore. |
51 |
|
52 |
-- |
53 |
alan dot mckinnon at gmail dot com |