V
V
Vi2016-04-11 02:00:23
linux
Vi, 2016-04-11 02:00:23

How to understand Linux file systems?

Tell me if I understood correctly how the file systems are arranged, well, tell me how you can easily check yourself in this, since I have not yet found the console method.
1. If the directive and the file are just an inode with a different flag inside it, then how does VFS or the kernel know that conditionally there are all sorts of files (other inodes) in the /etc/ folder - I don’t understand this yet, I can’t find any internal links between files and directories?!
2. And the question of mount has also been of interest for a long time, how the hell does this thing work, I still can’t understand or trace this abstraction. Where is this creepy "/" stored? I still have the idea in my head that it's just the Linux kernel that offers this root, some kind of function or kernel variable ?!
PS question, as usual, life and death.
3. Well, if file(this is a bunch of blocks) , and this is also inode(the name of the same bunch that this ID points to), then what actually happens then when I do the following command mount -t xfs /dear/home1 /dev /hda1 , how is the inode modified and where does the inode from the home1 file now point to?!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
abcd0x00, 2016-04-11
@abcd0x00

There is a book on UNIX architecture, here you can find all the principles of the device in it.
"Architecture of the UNIX operating system." Bach Maurice
You can also look for some simplified books for superficial study.
1. If the directive and the file are just an inode with a different flag inside it, then how does VFS or the kernel know that conditionally there are all sorts of files (other inodes) in the /etc/ folder - I don’t understand this yet, I can’t find any internal links between files and directories?!
There is a start inode which points to a list of further inodes which point to lists of further inodes.
A directory is like a file that contains pairs (name, inode) of other directories and files.
The file system (in the header) contains the address on the disk where the very first inode begins. Then it is read and the addresses of subsequent inodes are obtained from it.
And the inode itself is metadata (data about data), where all sorts of flags and the address on the disk are indicated, where the contents of the file are already stored.

M
Maxim Moseychuk, 2016-04-11
@fshp

Inodes refer to the internal implementation of a particular fs, they have nothing to do with the kernel. For example, there are no inodes in FAT, but the kernel can work with it.

A
Alexander, 2015-03-11
Madzhugin @Suntechnic

Look here: promo.value1estates.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question