The tag has no usage guidance, but it has a tag wiki.

learn more… | top users | synonyms

70
votes
6answers
62k views

What is a Superblock, Inode, Dentry and a File?

From the article Anatomy of the Linux file system by M. Tim Jones, I read that Linux views all the file systems from the perspective of a common set of objects and these objects are superblock, inode, ...
28
votes
8answers
60k views

How do I count all the files recursively through directories

I want to see how many files are in subdirectories to find out where all the inode usage is on the system. Kind of like I would do this for space usage du -sh /* which will give me the space used ...
0
votes
1answer
24 views

realization about performance filesystems and Inode

I have a hard drive when i execute "mkfs.ext3 /dev/sdb" filesystem makes if i have a file and it takes full of capacity of that hard drive 1-only one Inode i use for this file? 2-other ...
4
votes
1answer
168 views

Where is information about hard/soft links stored?

Where does the *nix system store information about number of hard links to a specific inode? I can't find any information about that. Everywhere what a hard link is but rarely a bit more advanced ...
2
votes
3answers
108 views

What is an orphaned inode? [closed]

I understand what an inode is but what is the exact definition of an orphaned inode? I don't really get what that means. UPDATE There was a time that a server I was managing ran out of inodes but ...
2
votes
1answer
71 views

Understanding sparse files, dd, seek, inode block structure

At work we use sparse files as part of out Oracle VM environment for the guest disk images. After some questions from a colleague (which have since been answered) I am left with more questions about ...
0
votes
0answers
24 views

Recover content of a directory when the block where directory file is located is corrupted?

A user has a Personal folder in it's /home/user folder. Bad sectors appeared on the hard drive. If I vi the Personal folder file it's empty and if I go into it and I do an ls, the system gets stuck ...
1
vote
1answer
54 views

Filesystem: How to find block of file represented by inode? [closed]

I am writing a file system for my operating system and am doing research on existing file systems before I start designing my own. I came across some slides about the System Five File System and am ...
3
votes
1answer
58 views

Partition Errors and Remounts Read-Only when Accessing Specific File

I have a pretty basic system running Ubuntu 16.04 (this question is not specific to Ubuntu, but rather ext4 partitions), 1 HDD, running a few partitions: sda1 - EXT4 - 100G - / sda2 - EXT4 - 723....
0
votes
2answers
51 views

How to see information inside inode data structure

I can do an ls -li to see a file's inode number, but how can I list information inside a particular inode by using that inode number.
6
votes
1answer
315 views

Limit the inode cache used by a command

I want to run a task with limits on the kernel objects that they will indirectly trigger. Note that this is not about the memory, threads, etc. used by the application, but about memory used by the ...
0
votes
2answers
68 views

Files with no attributes, owner, group and inodes

Yesterday we started having problems with our emails. Investigating this, I found that there some files on our system that show all the attributes including inode, owner, group, permissions, size and ...
0
votes
1answer
47 views

How to find the parent of a file by inode

I want to use ntfsundelete to maintain the directory structure of the recovered files. The output of ntfsundelete is like this: Inode Flags %age Date Size Filename 191321 FN.. ...
4
votes
1answer
92 views

What is using trillions of inodes on my almost empty server? [closed]

I have 18446744069923968593 inodes (which seem really too much) and much more problematic: I have 18446744069414835186 used so the system won't create any other file (even if the disk is almost empty)....
1
vote
0answers
55 views

Does a file move operation over SAMBA preserve the inode number?

If I have a directory exposed over a SAMBA share and a user, from either a Linux or Windows system, moves a file from one place to another on that share, does SAMBA know to ask the operating system ...
2
votes
2answers
272 views

why Inode file size is different than actual size

I noticed one log file having less size than what's mentioned in inode. $ ls -lhtr /var/log/test/fk-3p-kafka/kafkaServer-gc.log -rw-r--r-- 1 fk-3p-kafka fk-3p 11G Apr 10 18:27 /var/log/test/fk-3p-...
1
vote
0answers
37 views

Selinux inode security struct allocation

i'm trying to understand allocation of inode_security_struct in Selinux. I looked for a source code of selinux and there is only one allocation of this struct on line 230 in hooks.c file. This ...
5
votes
3answers
15k views

How do I find the inode of any directory?

There is literally nothing on google that I can find that will help me answer this question. I presume it is passing some other parameter to ls -i?
2
votes
2answers
137 views

Why debugfs doesn't show crtime in nanoseconds?

I am using: debugfs -R 'stat <7473635>' /dev/sda7 to get the file creation time (crtime). Inode: 7473635 Type: regular Mode: 0664 Flags: 0x80000 Generation: 1874934325 Version: ...
4
votes
1answer
53 views

Is there a tool to create a hard link to an unlinked inode?

Assume you have a filename/directory name, whatever, which is hard linked to inode 6400. Alas, the file/directory actually exists (completely intact, and maybe it only lives in a single data block, ...
2
votes
1answer
74 views

Does adding the content at the start of file result in updating all the data blocks?

In the Unix File system (UFS), the file is represented as an inode structure which has 15 pointers that reference the direct blocks or indirect blocks. Taking the below images is an example. Each ...
16
votes
3answers
5k views

Can a file be retrieved by its inode?

I ran following commands in the order specified: $ln a b $ls -i a b 523669 a 523669 b $rm -f a $ls -i b 523669 b I concluded from this test that the command rm actually removes only the filename (a ...
1
vote
0answers
19 views

How much control do concrete file systems have over the VFS inode cache and the buffer cache?

I want to make sure I'm understanding how VFS inodes and file system inodes working together. A file system's inodes are stored on the block device and that is where they live. When an operation is ...
2
votes
1answer
51 views

Is an inode number a non-changeable id of an inode?

I am trying to understand the concept of the inode number of an inode. Is an inode number an/the id of an inode? Does an inode have exactly one inode number? or can an inode have zero or more than ...
31
votes
5answers
56k views

How can I increase the number of inodes in an ext4 filesystem?

I had a problem (new to me) last week. I have a ext4 (Fedora 15) filesystem. The application that runs on the server suddenly stopped. I couldn't find the problem at first look. df showed 50% ...
4
votes
2answers
366 views

Is there an inode for a directory?

Each file has an inode. Is there an inode for every directory ? If not, how does Linux manage directories.
18
votes
3answers
13k views

List all files with the same inode number?

Lets say, when I do ls -li inside a directory, I get this: 12353538 -rw-r--r-- 6 me me 1650 2013-01-10 16:33 fun.txt As the output shows, the file fun.txt has 6 hard links; and the inode number is ...
3
votes
1answer
53 views

If I grow an ext4 partition, will it increase the number of inodes available?

If I create a small filesystem, and grow it when I need to, will the number of inodes increase proportionally? I want to use Docker with the overlay storage driver. This can be very inode hungry ...
2
votes
1answer
55 views

size of directory reported by ls [duplicate]

I understand the size reported by ls corresponds with number of inodes inside the directory, not their actual size. I have noticed peculiar behavior, when displaying directory size with ls. Here is ...
71
votes
5answers
117k views

Find where inodes are being used

So I received a warning from our monitoring system on one of our boxes that the number of free inodes on a filesystem was getting low. df -i output shows this: Filesystem Inodes IUsed ...
3
votes
1answer
42 views

Can I create a file on ext4 with a depth > 1 for testing purposes?

In order to test an analysis tool, I need a file where the depth (eh.eh_depth) is greater than 1. I've tried a couple of things: A large file (1GiB) Creating hundreds of smaller files (1MiB), ...
0
votes
0answers
222 views

why my mobile HDD can not mount on the opensuse 42.1?

I want to mount my usb mobile HDD(mobile hard disk drive) to /mnt. I tried the following command sudo mount -t ntfs /dev/sdb1 /mnt/usbhd1 but I get the error message: Failed to open index ...
0
votes
0answers
44 views

How does inode work on ntfs partition?

I am using a multi OS computer. I have one hard drive with three major partitions, namely Windows, Ubuntu and Data(ntfs). And the ntfs Data Drive is mounted on Ubuntu. Suprisingly, when i call ll -i [...
1
vote
0answers
27 views

Are the links between the inode and data blocks of a file removed when deleting the file?

Suppose there is only one hard link to a file. When rm the hard link, the inode and data blocks of the file will be marked as unused. But are the links from the inode to the data blocks of the file ...
0
votes
0answers
17 views

How are the sizes of Linux directories determined? [duplicate]

The results of ls -lh provides, among other things, a listing of subdirectories and their sizes. As the directories' sizes are not determined by the sum of the files within them, how are they ...
1
vote
2answers
107 views

How to delete corrupted directory

While copying music to the sd card of my android phone, the laptop froze so I had to reboot it using sysrq magic. Now any file manager on my Ubuntu or Android shows a directory 0 bytes big, and ...
-1
votes
1answer
796 views

Linux folder size limit

We are using below code to create folder in Linux server. File dir = new File(filePath); if(!dir.isDirectory()) dir.mkdirs(); After that creating files inside that ...
7
votes
2answers
675 views

what does a “deleted file” entry look like in the journal

I hope I've got this right: A file's inode contains data such as inode number, time of last modification, ownership etc. – and also the entry: »deletion time«. Which made me curious: ...
1
vote
1answer
69 views

Why are the first inode of the `/` mounted partition and inode of `/` different?

[~]$ stat -c %i / 2 As you can see in above, the inode for / is 2. But the First inode of /dev/sda2 is 11. [~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 ...
1
vote
0answers
182 views

Recovering files with directory structure

EDIT: I am using Debian 8.1.0 So I somehow deleted my /etc directory. While I have not been able to recover the complete /etc directory hierarchy with all files, I have received different parts from ...
0
votes
3answers
134 views

How to influence the inode number, e.g., at filesystem restore?

Files in *nix filesystems almost always have an associated inode number. In most cases users seem not to deal very much with those inode numbers, as they use filenames (i.e. a hierarchical pathnames-...
1
vote
0answers
37 views

How to increase inode size in Debian [duplicate]

I have VPS of following configuration. RAM : 4GB Swapped RAM : 4GB Disk : 500GB I'm unable to start any service it's showing No Space is available. df -i Filesystem ...
4
votes
3answers
1k views

“mv” file with garbled name by inode number?

I have several files with encoding issues in their file names (German umlauts, burned on CD with Windows, read by Windows and synced to Linux with Seafile. Something, somewhere went wrong...). Bash ...
1
vote
2answers
211 views

Number of files does not match inodes

I notice that the number of used inodes on the OCFS2 partition is around 28 million. I moved a folder that contained 518K files and the number became 22 million. The following script finds the number ...
9
votes
2answers
566 views

Is it possible to rename a file or directory using the inode?

I changed the /home directory to a different partition and couldn't access the files from it, something I have been able to solve from this question - How do you access the contents of a previous ...
1
vote
2answers
79 views

Why do I not see inode data in a hexdump or dd?

I'm not quite familiar with filesystem layers in the Linux kernel but I suppose that dd and hexdump do not get the inode information since they only do open() and read() syscalls, but I might be ...
1
vote
2answers
113 views

Two hard linked files share inode

I'm working on an assignment for my college course, and one of the questions asks for the command used to create a hard link from one file to another so that they point to the same inode. We were ...
3
votes
1answer
182 views

Where are my inodes going?

My root filesystem is running out of inodes. If this were an issue of disk space, I'd use du -s to get a top-level overview of where the space is going, then head down the directory tree to find ...
-2
votes
1answer
101 views

Create five copies of file with the same inode number

How can I create five copies of /etc/profile with the same inode number?
0
votes
1answer
98 views

Kernel current working directory and inode information placement

I'm reading some doc about UNIX but I don't understand two things: Why is important for the kernel to know the current working directory of the running process? Why not keeping the inode information ...