[TriLUG] Reclaiming inodes

Sean Korb via TriLUG trilug at trilug.org
Thu Sep 28 14:26:09 EDT 2017


I really like that solution!  I was using a loop to execute find with
wc -l.  Not efficient at all.

1M files is a lot and I always worry that someone is using a
filesystem as a database, albeit a very inefficient one.  You see this
a lot in life science where each segment of molecule chain is split
off into its own named file and if you don't keep them in a hash you
can lose track or just forget to remove them.  Marching through inodes
is very hard on the CPU if you have a lot of files so use caution when
you are building your program and it sstarrts to look like a database
would be a better choice, even if it's BSD or SQLite.

sean

On Thu, Sep 28, 2017 at 9:57 AM, Robert Dale via TriLUG
<trilug at trilug.org> wrote:
> Where have my inodes gone??
>
> du -s --inodes /*
>
> Just walk it down paths with large numbers until you find the source.
>
> Robert Dale
>
> On Thu, Sep 28, 2017 at 9:56 AM, Brian Henning via TriLUG <trilug at trilug.org
>> wrote:
>
>> I'd go on a hunt for huge numbers of tiny files.  Maybe there are some
>> things you can either delete, or tar up for safekeeping.
>>
>> Probably not as likely a culprit, but I'm pretty sure symlinks occupy
>> inodes so you could hunt for broken and/or unnecessary ones.
>>
>> -B
>>
>> -----Original Message-----
>> From: TriLUG [mailto:trilug-bounces+bhenning=pineresearch.com at trilug.org]
>> On Behalf Of Thomas Delrue via TriLUG
>> Sent: Thursday, September 28, 2017 9:49 AM
>> To: Triangle Linux <trilug at trilug.org>
>> Subject: [TriLUG] Reclaiming inodes
>>
>> I'm in a bit of a bind and have never seen this before so if anyone can
>> explain to me what is happening, that would be great:
>>
>> I have a machine that keeps reporting that it's run out of disk space.
>> So I do the usual "df -h" and get this:
>> username at host ~ $ df -h
>> Filesystem      Size  Used Avail Use% Mounted on
>> /dev/root        12G  3.9G  7.1G  36% /
>> devtmpfs        997M     0  997M   0% /dev
>> tmpfs           999M     0  999M   0% /dev/shm
>> tmpfs           999M  9.5M  990M   1% /run
>> tmpfs           5.0M     0  5.0M   0% /run/lock
>> tmpfs           999M     0  999M   0% /sys/fs/cgroup
>>
>> But it reports that it has no more disk space, so I dig a little deeper
>> and I find that I could also run df with the -i (inodes) flag, which gives
>> me this:
>>
>> username at host ~ $ df -hi
>> Filesystem     Inodes IUsed IFree IUse% Mounted on
>> /dev/root        735K  735K     0  100% /
>> devtmpfs         250K  1.4K  248K    1% /dev
>> tmpfs            250K     1  250K    1% /dev/shm
>> tmpfs            250K  1.2K  249K    1% /run
>> tmpfs            250K     3  250K    1% /run/lock
>> tmpfs            250K    16  250K    1% /sys/fs/cgroup
>>
>> I appear to have "run out of inodes"? Is there a way to reclaim them?
>>
>> Thanks
>> Thomas
>> --
>> This message was sent to: Robert Dale <robdale at gmail.com>
>> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
>> address.
>> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
>> Unsubscribe or edit options on the web  : https://www.trilug.org/
>> mailman/options/trilug/robdale%40gmail.com
>> Welcome to TriLUG: http://trilug.org/welcome
>>
> --
> This message was sent to: Sean Korb <spkorb at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  : https://www.trilug.org/mailman/options/trilug/spkorb%40gmail.com
> Welcome to TriLUG: http://trilug.org/welcome



-- 
Sean Korb spkorb at spkorb.org http://www.spkorb.org
'65 Suprang,'68 Cougar,'78 R100/7,'60 Metro,'59 A35,'71 Pantera #1382
"The more you drive, the less intelligent you get" --Miller
"Computers are useless.  They can only give you answers." -P. Picasso


More information about the TriLUG mailing list