Sample Header Ad - 728x90

Why does inode usage go from 1% to 100% on a single file creation?

2 votes
1 answer
111 views
Inode usage go from 1 to 100% on a single file creation in a raid array on Debian. First, clean boot, then:
sudo cryptsetup luksOpen /dev/RaidVG/LVMVol CVol
sudo mount /dev/mapper/CVol /mnt/raid/
Checking inode usage
$ df -ih
Filesystem           Inodes IUsed IFree IUse% Mounted on
/dev/mapper/CVol   117M    11  117M    1% /mnt/raid
Then, doing any touch on /mnt/raid, it failed saying disk is full. My inode usage ramped up at 100% :
$ df -ih
Filesystem           Inodes IUsed IFree IUse% Mounted on
/dev/mapper/CVol   117M  117M     0  100% /mnt/raid
Counting files inside /mnt/raid returns :
$ find | cut -d/ -f2 | uniq -c | sort -n
      1 .
   6033 d1
  14070 d2
  31211 d3
 145866 d4
 184352 d5
fsck can't seems to finish
$ sudo fsck /dev/mapper/CVol
fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
/dev/mapper/CVol contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create? no
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Signal (6) SIGABRT si_code=SI_TKILL
Also df -h return wrong values : there is more than 1T in use in reality:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/CVol  1.8T   77M  1.7T   1% /mnt/raid
I don't really know what to do or where to look at. My file system is "read only" but is there a risk of losing data here? How to fix the problem and be able to write on this disk again? **EDIT** smartctl -a
=== START OF INFORMATION SECTION ===
Vendor:               WD
Product:              My Passport
Revision:             1028
Compliance:           SPC-4
User Capacity:        2,000,365,289,472 bytes [2.00 TB]
Logical block size:   512 bytes
LU is resource provisioned, LBPRZ=0
Rotation Rate:        5400 rpm
Serial number:        WX22A30FX287
Device type:          disk
Local Time is:        Fri Mar 28 12:10:55 2025 GMT
SMART support is:     Unavailable - device lacks SMART capability.

=== START OF READ SMART DATA SECTION ===
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Error Counter logging not supported

No self-tests have been logged
mdadm --examine-badblocks
Bad-blocks list is empty in /dev/sda1
Bad-blocks list is empty in /dev/sdb1
fdisk -l /dev/sda /dev/sdb
Disk /dev/sda: 1.8 TiB, 2000365289472 bytes, 3906963456 sectors
Disk model: My Passport 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1dfd4f21

Device     Boot Start        End    Sectors  Size Id Type
/dev/sda1        2048 3906963455 3906961408  1.8T fd Linux raid autodetect


Disk /dev/sdb: 1.8 TiB, 2000365289472 bytes, 3906963456 sectors
Disk model: My Passport 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9f2cb37d

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 3906963455 3906961408  1.8T fd Linux raid autodetect
pvs
PV         VG     Fmt  Attr PSize  PFree
  /dev/md0   RaidVG lvm2 a--
Asked by Alicya Ambre (21 rep)
Mar 28, 2025, 09:03 AM
Last activity: Mar 29, 2025, 07:44 AM