Linux inodes Explained

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 95

  • @bearforceone7295
    @bearforceone7295 4 роки тому +55

    I applied for a job as a Junior RedHat Sysadmin this week and they asked me how I can see the Linux version running on a machine. I knew this by watching your video on regular devops interview questions, it's one of the questions you talked about. Just so you know, your videos are helping people out there in the real world! I am sure this video will also come in handy when actually running live environments. Thanks for doing this! :)

    • @scooby7877
      @scooby7877 2 роки тому +1

      What is that cat/etc/os?

    • @cc4405
      @cc4405 2 роки тому

      @@scooby7877 assuming linux version means the kernel version, uname -r would be a better answer imo

    • @massmedia6516
      @massmedia6516 2 роки тому +2

      cat etc/os-release

    • @ywahab25
      @ywahab25 Рік тому

      cat /etc/redhat-release

    • @NonPressure
      @NonPressure 5 місяців тому +1

      hostnamectl

  • @tutoriaLinux
    @tutoriaLinux  4 роки тому +14

    0:00 Intro
    1:47 Directories as filename-inode number pairs
    2:30 How are inodes structured?
    3:33 inspecting a real inode
    3:42 what is a syscall?
    4:57 practical inode-related Linux commands
    5:24 common inode-related Linux problems and troubleshooting
    6:30 how inodes are created in Linux (depends on filesystem)

    • @HP-sf1my
      @HP-sf1my 4 роки тому +2

      add the intro at 0:00 in the description to enable chapters in the video timeline

    • @tutoriaLinux
      @tutoriaLinux  4 роки тому

      You are a genius; thank you!

    • @beron_the_colossus
      @beron_the_colossus 4 роки тому +1

      Could you also update the description?
      Thank you for the video

    • @HP-sf1my
      @HP-sf1my 4 роки тому +1

      Yea, actually the description is what matters, not the comment :)

    • @tutoriaLinux
      @tutoriaLinux  4 роки тому +1

      @@HP-sf1my lmao d'oh. I'm an engineer, not an SEO expert!

  • @manny8717
    @manny8717 3 роки тому +15

    Great video. Thank you!
    Only addition/correction in my opinion is at 2:48. You said the hard links count wasn’t shown with the ls -l command but it IS listed. It’s the second column after the file permissions. Says 1 for the files you listed.

  • @seannewcomb7594
    @seannewcomb7594 4 роки тому +21

    I never knew about this, thanks for the walk through!

  • @DimaEvoc
    @DimaEvoc 3 роки тому +1

    Thank you! I'm watching this video after a terrible interview ))

    • @tutoriaLinux
      @tutoriaLinux  3 роки тому +2

      Hang in there! Some interviews just go badly no matter what. You’re probably dodging a bullet.

  • @fhujf
    @fhujf 4 роки тому +2

    I already knew about inodes, but watched the video regardless :)
    Thanks for all the videos, especially the Linux administration playlist. I've always been a Windows guy, but a year ago I started watching these, installed Ubuntu on VM and guess what, on Monday I'm starting a job in Unix infrastructure administration :D This channel is where it all began. Can't wait for new challenges ahead.

    • @tutoriaLinux
      @tutoriaLinux  4 роки тому +2

      That’s amazing to hear; congratulations! That’s literally why this channel exists. Appreciate it.

    • @j_thom
      @j_thom 3 роки тому

      Migrating from Caladan to Arrakis, eh? Good luck... Careful tho.. it didnt go so smoothly the last time, erm..well..a time to come.

  • @Hackenbaker
    @Hackenbaker 3 роки тому

    Thanks a lot for the easy to consume explanation!!! Easy to understand. Inodes was a question in my past working interview. Now, thanks to you I have a better answer for the next time somebody ask me about this. :)

  • @vesok
    @vesok 4 роки тому +8

    Thanks, great video! I'd really love it if you made a series on zfs too :D

  • @jerweiyeoh7096
    @jerweiyeoh7096 4 роки тому

    Just here to drop an appreciation for the explanation!
    Stay awesome!

  • @Nagashadow9669
    @Nagashadow9669 4 роки тому +2

    Good to know that ZFS has more advantages than whats usually advertised. I knew about zfs and inodes but never connected this together

  • @Flankymanga
    @Flankymanga 4 роки тому

    Huh... every video i see from you shows me how much i have to learn. Thank you for the explanation!

  • @aleksandrshkraba5061
    @aleksandrshkraba5061 4 роки тому

    It was great! I was asked about inodes on my previous interview. And unfortunately I have some difficulties with explanation!( Now I can do it))) Thank you!

  • @__Patrick
    @__Patrick Місяць тому

    Super interested in ZFS. I know it's still an experimental feature during setup of Debs based distros, but the on-the-fly inode creation is pretty cool. I will have to check it out.

  • @martina8527
    @martina8527 4 роки тому +1

    Love these!
    Thanks for your great work!

  • @wojt4spes
    @wojt4spes 3 роки тому

    Thanks, dude. Just starting a new year, new me, you know. Learning Unix, stuff.

  • @vijaiharihar9410
    @vijaiharihar9410 3 роки тому +1

    Very insightful! Thank you!

  • @Matthew-tl2ng
    @Matthew-tl2ng 3 роки тому

    Its crazy I just did a phone screen for a company and you touched on 2 of them in this video. Hard/soft links and syscalls.

  • @ruiztulio
    @ruiztulio 4 роки тому

    Great video man, I'm just playing with zfs and is great so far

  • @Achrononmaster
    @Achrononmaster 2 роки тому

    Searching your channel content there's no vdo on ZFS. @7:40 kinda' begs for a ZFS tutorial. There are RAM chew-up and licencing issues right?

  • @HarryLowtonIT
    @HarryLowtonIT 4 роки тому +1

    Thank you - Great video and explanation!

  • @robertbatista50
    @robertbatista50 3 місяці тому

    Can a file have more than 1 soft link or more than 2 hard links? For every additional hard link does the disk storage space go up by the size of the original file?

  • @qsmfoui
    @qsmfoui 7 місяців тому

    for my taste this was scratching a little bit on the surface. there is a little more to it to get a better understanding of the filesystem. i wish you would make a video with some visualized hierarchy of how the superblock, group descriptors and inodes work together with the memory blocks. anyways it was a great video

  • @kocho4242
    @kocho4242 3 роки тому +1

    So that is basically flaw of the specific filesystem? If I understand correctly, architect of the filesystem didn't predict such case. I think it is something wrong with filesystem design if there is still a space on the storage, but inodes limit has been exceeded. Only ZFS is free it?

    • @tutoriaLinux
      @tutoriaLinux  3 роки тому

      I wouldn’t necessarily call it a flaw, just a design tradeoff that was made, combined with poor defaults on most Linux distributions.

  • @mhenimerzouki1285
    @mhenimerzouki1285 4 роки тому +2

    great video, yes ZFS please :)

  • @MegaAadhar
    @MegaAadhar 4 роки тому +1

    This was very simple and clear; thanks mate!
    ZFS Please!

  • @TheGruselmops
    @TheGruselmops 4 роки тому +2

    Thanks Dave, great explanation! I really missed this type of videos!
    btw. How do you like BtrFS?

    • @tutoriaLinux
      @tutoriaLinux  4 роки тому +1

      Hey, good to see you here! I played with btrfs several years ago and it felt like an early beta. There were a ton of missing features and some unreliability (although it did engineer around a few zfs limitations). I haven’t really kept up with it especially because now there’s kernel support for openZFS in linux.

    • @TheGruselmops
      @TheGruselmops 4 роки тому

      @@tutoriaLinux Yeah, I'm really interested in both filesystems. I like BtrFS so far, haven't used ZFS yet. Maybe an Idea for a video?! Keep it up! Peace!

    • @owenstrange7630
      @owenstrange7630 4 роки тому

      @@tutoriaLinux dave sorry.
      Can you help me a little bit?
      I couldn't find system.log file.
      It's usual stay in inside /var/log/apt/history.log in Ubuntu
      But i couldn't find it anywhere in the same location in Centos 8 :
      cd /var/log
      cd dnf
      bash: cd: dnf: No such file or directory.
      thank.

  • @Toccobass13
    @Toccobass13 2 роки тому

    literally amazing. thank you so much

  • @Yerttle
    @Yerttle 4 роки тому

    Loved this content!

  • @bowboycode2114
    @bowboycode2114 3 роки тому

    You make great video's!👍

  • @aussierule
    @aussierule 2 роки тому

    I installed Debian Bullseye on a fresh HDD , chose auto install with swap, and it chose the btrfs filesystem. I was just analyzing my disk in gparted after boot and noticed my hard drive is not mounted but instead my home directory is the only thing mounted called file system and when I view the path its a path to an inode which I assume is on the unmounted HDD. My question is if its not mounted how does it write the data and save in between powering it off? Does it write the files before shutdown?

  • @humayunakhtar2116
    @humayunakhtar2116 2 роки тому

    Thanks for great explanation

  • @ZTsarmadOne
    @ZTsarmadOne 3 роки тому

    Thanks 😊, This video very Useful for me.

  • @9Steff99
    @9Steff99 3 роки тому

    so are all the inodes created when the file system is installed or does it just allocate a fixed amount of memory for later storing inodes?

  • @keratishvili
    @keratishvili 4 роки тому

    Great video thanks Dave

  • @programminginterviewsprepa7710
    @programminginterviewsprepa7710 2 роки тому

    So it the data structure behind the file system would that explain it in one sentence?

    • @tutoriaLinux
      @tutoriaLinux  2 роки тому

      Well, it’s part of the kernel data structure that represents individual nodes of the filesystem tree. I don’t know if there’s a one-sentence explanation that captures everything about the linux filesystem, including implementation details like inodes. Once you start digging, things get a bit complicated.

  • @zorrzoor
    @zorrzoor 4 роки тому +1

    When working in ops, please! Always monitor inodes and not just used/free space. And please, always use a monitoring system! ;) information is power

    • @_sl3600
      @_sl3600 4 роки тому

      Heh, I once had to troubleshoot centreon (nagios) just dying on a friday - turns out it had run out of inodes due to some network equipment flooding it with traps. Of course, inodes on the monitoring server were not monitored ;) (or even... anywhere, now I think of it).

  • @albertovillacorta8045
    @albertovillacorta8045 4 роки тому +1

    Hit me with that ZedFS knowledge! I just like how the British say it.

  • @stevefiorito5379
    @stevefiorito5379 6 місяців тому

    Great video! But, it is just one more thing that I need to learn ... to use Linux ... I always just wanted to just be a user, but that isn't really possible, unless you have and can afford a Linux tech ... which are few, and far between ... pretty much none existent in my neck of the woods. With videos like this, I can plod through my day to day activities on Linux (I'm on it almost all day long). I often try to humor the situation with an analogy: If you had to do to your car's CAN network what you have to do with Linux, ... before you could really use it, you'd never get out of the driveway.

    • @tutoriaLinux
      @tutoriaLinux  5 місяців тому

      Interesting comment, thanks -- as a desktop OS, Linux is definitely a tinkerer's system (i.e. I tinker with it and then break stuff). But I promise you that as a regular user, you don't *need* to know about inodes. There are basically zero situations where you're going to run out of inodes (or even need to know what they are).
      You already know this, but it bears repeating that most of the videos I make here are for people who are going to be professional Linux system engineers, devops engineers, SREs, infrastructure people -- at companies with huge systems. Easy-to-use distros like Mint + co. are good enough that my parents were happy Linux users, without knowing it.

    • @MartianPink
      @MartianPink 3 місяці тому

      I started using linux knowing nothing except it's free. I'm poor and can only afford the lowest of low used craigslist laptops. I didn't want to pay for Windows license and really windows seemed like it was getting annoying after Win7.
      I knew how to download an iso (easy to do once u are told u need to do that). Use the software that says "clikck here ot make this usb stick bootable with this iso file". In that software, clicking the buttons that say "do the thing" anyone can do. Just following the prompts. Then change bios to boot from usb drive first, or use F12 or similar to get boot menu to boot from usb this one time.
      Then that distro is live, already useable. Now click the intaller button, click continue following prompts, it does all the intalling.
      If ur using somethingn like MXLinux or Mint or Ubuntu, it's all made for anyone who can use Windows. Once u have it installed, it works like Windows. U don't have to understand any more than u need to undertstand yr car. The legend of having to understand linux is a legend. this video maker's tutorials aren't for casual desktop users. They're for specifically computer professoinals, or those who like to do what they do on thier own time. So don't be afraid to try. And u get to try a distro out risk free by running it form the usb drive without installing. MXLinux even allows u to make changes and they'll remain next time u boot from the USB.

  • @mk-gc4fj
    @mk-gc4fj 3 роки тому

    if you're using a happy, lucky, wonderful, futuristic, filesystem like zfs *dance music starts*

  • @berrywin
    @berrywin 2 роки тому

    Very interesting and useful! I would push the like button if you turned of the music. So distracting, especially if you don't have English as your native language!

  • @venc0r
    @venc0r 4 роки тому

    Do you have any oppinion or advice, werther its good or rubbish to use zfs on vmware vmdks?

    • @tutoriaLinux
      @tutoriaLinux  4 роки тому

      I'm not a storage expert -- maybe someone else can chime in?

  • @Funnybone_FB
    @Funnybone_FB 2 роки тому

    Brilliant. Thank you

  • @inaciopaiva1536
    @inaciopaiva1536 4 роки тому

    I didn't understand why the system would run out of numbers as inodes before run out of storage.

    • @tutoriaLinux
      @tutoriaLinux  4 роки тому +3

      If you have a system that gets filled up with tiny files, it can happen that you run out of inodes before you run out of disk space. Inodes are usually calculated from “average filesize” (or a default number like 4096bytes), divided into filesystem size. If, when the system is in production, you have a huge influx of files smaller than this “average” you can end up with inode exhaustion. The example in the video was of a hacked server hosting hundreds of static sites with lots of tiny files, which I’ve seen in the wild. I hope that helps!

  • @killaken2000
    @killaken2000 4 роки тому

    with `ls -l` the second column is the link count

  • @antoniabroscheta7470
    @antoniabroscheta7470 3 роки тому +2

    i cant read blue on purple!

  • @Leo_de_janeiro
    @Leo_de_janeiro 2 роки тому

    where is the filename stored ?

  • @islandcave8738
    @islandcave8738 3 роки тому

    This inode exhaustion is the problem I just ran into.

  • @GrandpasPlace
    @GrandpasPlace 4 роки тому

    I was wrong, trying to pull it from my memory of 30 years ago. (Removed so as not to confuse others)

    • @tutoriaLinux
      @tutoriaLinux  4 роки тому

      Maybe I'm misunderstanding what you're saying, but aren't you describing block size? I think inodes are a fixed-size operating system datastructure (just a C struct, I think) that gets populated as needed. The file data itself isn't written into inodes, only a reference to the disk blocks that store the actual data. And the data written onto those blocks can be in whatever blocksize you specified when creating your filesystem.

    • @GrandpasPlace
      @GrandpasPlace 4 роки тому

      @@tutoriaLinux You are right, I was thinking of block size and balancing the inodes for the smaller block size. That is what I get for trying to do it from 30 year memory. lol

  • @DineshKumarVellore
    @DineshKumarVellore 2 роки тому

    Files having the inode number 9077

  • @Felipe-53
    @Felipe-53 2 роки тому

    Awesome!

  • @david2358
    @david2358 9 місяців тому

    Subscribed 🎉

  • @davidwilliss5555
    @davidwilliss5555 4 роки тому

    ls -l does tell you how many hard-links there are. It's between the permissions and the owner name.

    • @tutoriaLinux
      @tutoriaLinux  4 роки тому

      In retrospect I honestly don't know how I missed that.

  • @karankhatter
    @karankhatter Рік тому

    real talk it happens

  • @aminebouaita9202
    @aminebouaita9202 4 роки тому

    Thank you !!

  • @luiscosme1154
    @luiscosme1154 3 роки тому

    Could you please re-upload this video without the music in the background?

    • @luiscosme1154
      @luiscosme1154 3 роки тому

      Oh great I just noticed that it stops at about 4 1/2 minutes, it was so distracting in the background that I couldn’t concentrate on what you were saying

  • @VikasYadav-wi7zu
    @VikasYadav-wi7zu 3 роки тому

    I love you dude

  • @captainhaxs
    @captainhaxs 3 роки тому

    lol im checking all my machines now to make sure i didnt run out.

  • @IvanZupancic
    @IvanZupancic 4 роки тому

    nice background music :)
    no really, .. it's fine

  • @philspaghet
    @philspaghet 3 роки тому

    5:45 LOL I nearly spat out my water XD

  • @catharperfect7036
    @catharperfect7036 Рік тому

    i-nodes? More like i-modes! L.O.L!

  • @pswalia2u
    @pswalia2u 4 роки тому

    Nice info. Why do you think, somebody will hack server for hosting porn site 😂?

    • @tutoriaLinux
      @tutoriaLinux  4 роки тому

      I saw it a bunch of times when I was working in web security! Crazy things.

  • @hailedagemawi2108
    @hailedagemawi2108 Місяць тому

    No wonder ppl say using Linux helps you understand the hardware and the os more throughly and also how shitty windows is.