As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [inode]

For question pertaining to the inode (index node), a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Use this tag for questions about the inode data structure itself or questions about issues arising from querying or managing inodes in the scope of a filesystem.

Filter by
Sorted by
Tagged with
0 votes
3 answers
56 views

Is '..' really a hard link?

This is a bit of a theoretical question, but it's important to use proper names for things. In UNIX/Linux file systems, .. points to the parent directory. However, we know that hard links cannot point ...
dr_'s user avatar
  • 28k
0 votes
2 answers
63 views

Why is an open inode system call a security risk?

According to the accepted answer here, it is simply because you would not make the access checks at the directories leading up to that file. For example, with a call to openinode(inode #, flags). My ...
user129393192's user avatar
1 vote
0 answers
18 views

In btrfs-check, how to automatically or manually fix the error "errors 2000, link count wrong"

I run btrfs-check and got the following errors: $ sudo btrfs check --progress --force /dev/nvme0n1p7 Opening filesystem to check... WARNING: filesystem mounted, continuing because of --force Checking ...
tribbloid's user avatar
  • 143
0 votes
0 answers
10 views

Direct admin, Debian server - Inodes per user check

df -i prints inode usage per file system. How can I find out what is the inode usage per user created in Direct Admin?
Zis's user avatar
  • 1
15 votes
4 answers
1k views

Why doesn't read permission on directories reveal inode numbers?

As far as I understand, the "read" permission on directories allows one to list all names under that directory, and no more than that. Based on common understanding of FS design, if a ...
iBug's user avatar
  • 3,379
0 votes
1 answer
48 views

What exactly happens in the OneFS (FreeBSD) files system if I move files from one directory to another?

If I do an mv command from the command line in OneFS (Isilon, FreeBSD based), what exactly happens in the background and on the disks? Will the data be physically moved from sectors to other sectors ...
Root Loop's user avatar
  • 103
0 votes
0 answers
13 views

debugfs mi output shows different block count than the number of block references!

I have a file for which the the mi (modify inode) option gives different block count and block references : debugfs: mi <4762313> Mode [0100644] ...
Sam's user avatar
  • 1
1 vote
0 answers
50 views

dentry/inode caching on multi-cpu machines / memory allocator configuration

While doing performance benchmarking on CPLEX, I ran across a strange issue. The details are posted in a blog: https://community.ibm.com/community/user/ai-datascience/blogs/xavier-nodet1/2021/07/08/...
LaszloLadanyi's user avatar
8 votes
1 answer
499 views

Deleting a hard link's tail file changes the change time of the head or vice versa. Why?

Note: Question although says vice versa but it really does not have any meaning since both of them point to the same inode and its not possible to say which is head and which is tail. Say I have a ...
Himanshuman's user avatar
0 votes
1 answer
224 views

How to find all hardlinks to a given inode? [duplicate]

Is there a way to list all hardlinks, by path/filename, or even just by file name alone, that point to a given inode? I have a file that ls -al reports has three hardlinks, but it should only have two....
DasKraut's user avatar
16 votes
4 answers
5k views

Does Linux support invoking a program directly via its inode number?

I’m asking because string comparisons are slow, but indexing is fast, and a lot of scripts I write are in bash, which to my knowledge performs a full string lookup for every executable call. All those ...
Jacob Valdez's user avatar
0 votes
0 answers
29 views

How to list orphaned inodes? [duplicate]

I have noticed that my hard drive space is being consumed by a long running process, but I was not able to find the file(s) that are consuming the space. I suspect the files are temporary files, using ...
Eljay's user avatar
  • 101
0 votes
0 answers
51 views

Found multiple files with the same name in the same directory on my Android phone

I just discovered the following interestingness (after some confused spelunking) when my backup script crashed after its "number of files indexed == number of files transferred" assertion ...
i336_'s user avatar
  • 967
0 votes
1 answer
65 views

How to determine which processes are running on outdated packages and needs restarting?

So, I know that it is possible to view or recover deleted files that are currently being used by a process. I've found out that this also applies to packages that were updated. So, let's say we update ...
nixvega's user avatar
2 votes
0 answers
174 views

Inode size 512 and 1024 bytes functions in ext4 and its pros and cons? (Need a official reference)

When i first trying and installing openSUSE tumbleweed, i see when formatting a ext4 i can choose the inode size 128, 256, 512, or 1024 bytes. Typically it is 256. I am thinking a larger inode size ...
hateindirection's user avatar
0 votes
1 answer
81 views

How can you list a directory using the inode not the directory name? I have the same directory name appearing twice with different inodes

When I do a directory listing of a python installation the include directory appears twice and each one has a different inode. ╰─○ ls -i1 2282047 bin 2641630 include 2642559 include 2282048 lib ...
vfclists's user avatar
  • 7,125
0 votes
0 answers
37 views

Inode structure in the kernel

I'm trying to understand the generic Inode structure definition in the kernel source code. Is there a good documentation that explains these fields and helps in understanding them. Specifically, I'm ...
Noisy_Botnet's user avatar
1 vote
1 answer
151 views

Access files inside a directory that has corrupt inode

I have an ext2 filesystem with corrupted/deleted inodes. The data I need does not appear to have corrupt inodes but the directory that the data is in does. $ ls -l ls: cannot access 'data_dir': ...
chaugen1's user avatar
1 vote
1 answer
194 views

Ext4 "unused inodes" "free inodes" diffrence?

When I use the dumpe2fs command to look at the Block Group of the ext4 filesystem, I see "free inodes" and "unused inodes". I want to know the difference between them ? Why do they ...
Samuel's user avatar
  • 13
0 votes
1 answer
168 views

linux + list inode information show 100% used

we notices about some of our RHEL machines that inode information show 100% the following for example show that /dev/sdb is 100% df -i Filesystem Inodes IUsed IFree IUse% ...
yael's user avatar
  • 12.4k
0 votes
0 answers
75 views

ntfsundelete not reading entire partition

To avoid XY problem, here's the background of the problem I am facing... I have an external hard drive which should have hundreds of files and suddenly, all of them disappeared (I have no idea why). I ...
nicolasbk's user avatar
0 votes
1 answer
206 views

Changing file permissions in inodes while a user has the file open

According to this SO question, when we open a file to read it we only check permissions once when we open it. And if we change the permissions of the file and say the user is no longer allowed to read ...
Ariel Yael's user avatar
8 votes
2 answers
3k views

How Linux kernel sees the filesystems

I'm still confused about the concept of kernel and filesystem. Filesystems contain a table of inodes used to retrieve the different files and directories in different memories. Is this inode table ...
bouqbouq's user avatar
  • 623
0 votes
1 answer
175 views

How does "Inodes per group" and "lazy_itable_init" flag relate to the "Inode count" value in an ext4 filesystem?

I am trying to root cause a customer case where 2 Identical drives, formatted with the same command, led to a difference of ~55GB in total disk space due to additional Inode overhead. I want to ...
RuMAN S's user avatar
  • 19
0 votes
1 answer
283 views

What's the difference between structures "cdev" and "inode" in the context of device driver programming?

I am currently studying device drivers in an operating systems course and am getting confused regarding the difference between the "inode" structs and "cdev" structs. Could someone ...
Izzo's user avatar
  • 969
1 vote
0 answers
113 views

ls displays no files even though folder contains files

This question is actually derived from a problem I have with a python library which deletes a file tree and then recreates the content, but on attempt of execution of a file inside the directory, the ...
PrivateOmega's user avatar
4 votes
1 answer
336 views

mv on ext4 is doing copy-and-remove instead of inode relocation

I am under the belief that if you mv a file from an ext4 partition to itself, this is done instantly in constant time by updating directory entries and keeping the inode the same. Instead, sometimes I ...
spraff's user avatar
  • 891
1 vote
0 answers
23 views

Is there a system / btrfs tool whick will provide me with the record location for a specific inode number in a btrfs volume?

I want to find the location of the record data for a specific inode. Is there a system tool or a btrfs tool which will provide me with at least it's bloc number ?
Camion's user avatar
  • 274
1 vote
0 answers
213 views

Restore damaged folder inodes in ddrescue image

I restored my failing external ntfs hdd using ddrescue, around 80% of the data is restored, the rest seems to be bad blocks. I can mount the created image file and ubuntu detects it and shows the ...
Leon5x's user avatar
  • 11
0 votes
0 answers
501 views

what are the causes for "checksum does not match inode" HD problem, even if it says the inode check passed?

Root became RO after some minutes using the PC. On reboot it required manual fsck. Then this problem happened: it said the inode check passed fine ok, but said this problem: "checksum does not ...
Aquarius Power's user avatar
15 votes
6 answers
2k views

Reset ext4 filesystem without changing the filesystem UUID

I have a filesystem with many small files that I erase regularly (the files are a cache that can easily be regenerated). It's much faster to simply create a new filesystem rather than run rm -rf or ...
davidvandebunte's user avatar
7 votes
2 answers
2k views

How to copy a file by using its inode number?

This problem is related to Samba and inodes are not necessary. I have a problem handling a certain file that has some special characters in it. If I search it by its inode it will list the file: $ ...
bomben's user avatar
  • 417
1 vote
0 answers
1k views

inode based file system, What is the maximum size of a file in the file system

could someone explain how to tackle this questions? 1. **What is the maximum size of a file that could be handled by single indirect and double indirect?** Block size is 2K Address size is 4 Bytes 12 ...
portahelle's user avatar
0 votes
1 answer
27 views

Changing rights and owner in one command to safe resources

I have a backup script with the following function: function change_rights() { chown -R ${OWNER}:${GROUP} ${DIR} find ${DIR} -type f -exec chmod 0640 {} \; find ${DIR} -type d -exec chmod ...
manifestor's user avatar
  • 2,423
6 votes
1 answer
799 views

ncdu - Rank by File-Count instead of Size

I like the navigation and features of ncdu, but instead of ranking folders by size, I want to rank them by file-count. For example, folders containing more files are listed first, and you can navigate ...
Lonnie Best's user avatar
  • 4,815
0 votes
1 answer
357 views

prevent inode reuse

We are using Logstash to ingest our logs and we are facing some issues due inodes being reused. We tried all possible options on Logstash side so we are exploring the OS side. As far as I can see, if ...
sickfear's user avatar
1 vote
1 answer
235 views

What‘s different between inode->i_rwsem and i_flctx?

When I trace the function graph when calling write(), I find that within function ext4_file_write_iter() it locks the inode->i_rwsem by calling inode_lock(inode) at the beginning. After that call ...
user503990's user avatar
0 votes
1 answer
386 views

How to minimize filesystem overhead

I have an application that uses a lot of space as essentially cache data. The more cache available the better the application performs. We're talking hundreds to thousands of TB. The application can ...
David Cowden's user avatar
1 vote
0 answers
95 views

How do directories with inode number 2 in different file systems know that they need to go back to the root directory?

I know that the same inode can be used in different file systems. For example, home run dev boot and / directory have inode number 2 because they are the first directories in file systems. $ ls -li ...
testter's user avatar
  • 1,260
3 votes
0 answers
42 views

inode count via df ~5000x larger than number reported by df

I've been dealing with an issue whereby df is reporting a much larger usage of a partition mounted onto my system from a USB drive. df -h gives: /dev/sdb3 4.6T 4.2T 396G 92% /media/smb ...
Jesal Rajdev's user avatar
1 vote
1 answer
423 views

Why can't I symlink a preexisting file to a target file? [duplicate]

I have an example to better illustrate what I'm talking about: $ touch tas $ ln -s /etc/leviathan_pass/leviathan3 /tmp/l2/tas ln: failed to create symbolic link '/tmp/l2/tas': File exists Basically I ...
arpg's user avatar
  • 13
0 votes
0 answers
1k views

why EIO Error(Input/Output Error) appears frequently and is mostly solved with e2fsck

We have prepared a customized Linux system (ISO image with 15 GB size and all the packages we need are installed inside it) and we copy this image into different PCs with Different Intel Processors ...
PsP's user avatar
  • 115
1 vote
2 answers
117 views

Comparing two directories based on inodes

A bit of context that I think is relevant for the appropriate solution: I have a server that has two folders; one is ingest, the other is sorted. The source of the sorted folder is the ingest folder, ...
Ieuan's user avatar
  • 111
0 votes
1 answer
1k views

debugfs not working | file not found by ext2_lookup

$sudo blkid /dev/sda1: UUID="F959-61DE" TYPE="vfat" PARTUUID="950b18a0-1501-48b4-92ef-ba1dd15aaf21" /dev/sda2: UUID="6dfcfc23-b076-4eeb-8fba-a1261b4ea399" TYPE=&...
Milad Bazi Saz's user avatar
3 votes
0 answers
191 views

How to Open a file in the kernel using only the inode

I am currently trying to open, read, write to a specific file in the (Linux) kernel space. I know that filp_open, kernel_write functions could be used to perform the same effects as open, write in the ...
Telemore's user avatar
1 vote
1 answer
186 views

No inodes information in `du -i`

Although df reports there is still plenty of space, I encountered 'No space left on device' problem while running processes that tend to create loads of small files. I thought it might be a problem of ...
Maciek's user avatar
  • 111
3 votes
3 answers
1k views

How inodes numbers are assigned

Two known facts: In linux, moving a file from one location to another on the same file system doesn't change the inode (the file remains at "the same place", only the directories involved ...
Omer Dagan's user avatar
1 vote
1 answer
249 views

Why . and .. are hard links to directories while in *nix systems hard links are not allowed for directories?

I know how hard links and symlinks work and I know why hard links can't be used for directories but in this case, is it some kind of exception? For example I do: ls -al Documents total 8 drwxr-xr-x ...
pjk's user avatar
  • 193
2 votes
2 answers
440 views

what is this “first inode” reported by dumpe2fs?

using dumpe2fs on some ext4 partition, I get in the initial data, that the first inode is #11. However, if I ls -i on this disk root partition, I get that it's inode number is #2 (as expected). So... ...
Camion's user avatar
  • 274
1 vote
2 answers
421 views

Rebuilding directory tree (and/or inodes)

Problem My Armbian based Orange Pi webserver crashed (probably because of a power loss). I thought it would be fine since ext4 is more resilient and it usually has been in the past, but for some ...
Synetech's user avatar
  • 153

1
2 3 4 5
7