[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /var partition seems locked or read only





Le 29.07.2014 18:22, Paul E Condon a écrit :
On Tue, Jul 29, 2014 at 11:08:41AM +0200,
berenger.morel@neutralite.org wrote:


Le 28.07.2014 22:36, Andrei POPESCU a écrit :
>On Lu, 28 iul 14, 11:24:31, berenger.morel@neutralite.org wrote:
>>Le 27.07.2014 01:42, PaulNM a écrit :
>>
>>>Inodes are files/folders, files/folders are inodes. (1-to-1)
>>Anything
>>>that has a bunch of files/folders will use a bunch of inodes. Same
>>>number in fact.
>>
>>Hum... is it accurate?
>>Files can use more than one inode, with ln
>
>Are you talking about hard links? As far as I understand (but I'm
>sure
>someone will correct me if I'm wrong) the file itself is always
>just one
>inode, but there are one or more directory entries (links)
>pointing to
>it. If you remove all of them the file is deleted.
>
>>Folders can not, AFAIK, since
>>symlinks are simply pointers to inodes (which are themselves
>>pointers --with
>>reference counter I guess, std::shared_ptr in c++11?-- to data).
>>I'm simply asking, I might be completely wrong or inaccurate...
>
>Symbolic links, a.k.a. soft links, a.k.a. "symlinks" are files
>themselves (i.e. each using one inode) that contain a pointer to
>one of
>the directory entries of another file or directory.

That was what I thought, yesterday before trying to ask those
questions. While asking them, I did some quick research, because I
had doubt.
What I learned is that the kind of symlinks you speak about, is slow
(for various reasons. I've discovered that on the French version of
this article:
http://en.wikipedia.org/wiki/Symlink#Storage_of_symbolic_links), and
that there are now another kind of symlinks, much faster, which are
not files since they do not use clusters: all informations are
contained in the inode. So, less disk space, and it seems that it
avoid keeping open more than one inode, which was a problem of the
file approach.

I think, but not sure, that the situation is more complicated than
either/or :
If the path from the location of the symlink in the file system
is short enough to be contained in the 256char limit of file names,
there is no extra node (and the access to the target file is fast
because one less disk access). But if the path requires cross file
system path, or is to long to fit in a filename slot in a directory,
then another inode is allocated. Or maybe I have made a total botch
of describing what is actually happening. This amounts to a situation
dependent either/or instead of a simple design decision either/or
YMMV or not ;-)

You might be true, I have strictly no idea about how things work. I wish I would have good occasions to work on low level programs, that kind of stuff is so interesting to me, unlike just throwing random queries to a damned sgbdr...

It's hard for me to believe that symlinks could be so numerous as to
exhaust the supply, but maybe if there is a deamon running a script
that assigns synlinks and the script has a bug.

Well, this part of the discussion is totally out of topic, in facts. It is just some discussion about inodes, files, folders and sym/hard links. Only me trying to learn from other's knowledge and wisdom.


Reply to: