Questions tagged [ext4]
ext4 (fourth extended filesystem) is a journalling file system for Linux, developed as the successor to ext3. Use this tag for question that are ext4 specific, generic file system related questions should use tag [filesystem]
1,020 questions
4
votes
2
answers
113
views
How to resize ext4 without adding more inodes?
On this filesystem, there are enough inodes already, I only need more filesystem size:
# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/spinning-backup ...
9
votes
2
answers
2k
views
Which Linux file system should I use for compatibility with Windows programs?
I'm new to Linux, yet am now committing to Linux, probably formatting HDDs to run the ext4 file-system, for (almost) all work. I need to keep one Windows machine running an NTFS file-system for a few ...
0
votes
0
answers
37
views
Does ext4 allow partial update of unwritten to written extents in O_DIRECT case
O_DIRECT allows writes on a file to proceed with i_rwsem in read mode.
Let's say I have allocated 100 fs blocks(4K) for a file with posix_fallocate(). This now becomes an unwritten extent for the file....
2
votes
1
answer
119
views
Is it possible to recover deleted files from a qcow2 disk in Proxmox using extundelete or ext4magic?
I’m running a Proxmox VM with a qcow2 disk (Ubuntu guest, ext4 filesystem). I tried to recover a recently deleted file using extundelete and ext4magic, but both tools failed to find the file, even ...
1
vote
2
answers
164
views
Does badblock "fix" blocks on an SD card?
I have an old 16GB SD card that started giving I/O errors, known it's gone bad, I dumped all the content to an image file to see what I could restore, and the Disk manager alerted me that 16.1MB were ...
0
votes
1
answer
114
views
ext4 block allocation
I'm trying to understand how ext4 does some things. I have a small ext4 partition with block size 1024 (not the default 4096). I create a directory there and delete lost+found, just to get it out of ...
-5
votes
1
answer
82
views
Why does the Use% shown by the df command not reflect the correct value? [closed]
On our RHEL 7.9 systems, we have noticed some strange behavior.
Each machine has 4 disks, each with an 8TB capacity, but we are only using about 1.9TB on a partition.
What doesn’t make sense is that ...
0
votes
0
answers
89
views
Not able to modify inode metadata
I am working on a ext4 file-system tool that aims to delete files such that they are not recoverable later on. My goal is to clear the inode metadata of a deleted file, but despite my efforts, the ...
0
votes
1
answer
300
views
Journaling block device (jbd2) hammering my SSD
Ubuntu MATE 24.04 LTS
System monitor in panel shows something like all day long. Hovering the mouse over the image shows disk usage hitting 83.3% at those peaks.
When I run sudo iotop, an item that ...
2
votes
1
answer
122
views
Why does inode usage go from 1% to 100% on a single file creation?
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/
...
1
vote
1
answer
80
views
How to calculate the checksum of a ext4 (eg. superblock or inode)
I have an image-file of an ext4 file system (filesystem.img). I am extracting sections sections of the filsystem. Is there a way to manually calculate the the checksum of the sections just with a ...
0
votes
0
answers
50
views
How many Group Descriptor is there in GDT of Ext4?
GDT = Group Descriptor Table ; GD = Group Descriptor. I'm trying to figure out how many bytes I need to read after the superblock to extract the entire GDT, because it's needed for a program I'm ...
0
votes
0
answers
51
views
Does nautilus warn before starting copy/move of files into ext4 partition which is too small?
As a user with non root privileges, when copy/moving a bounch of folders and files, in one batch, from some device into another different partition which is ext4 and too small (space allocated to user)...
2
votes
1
answer
580
views
How do I actually fix a badly corrupted (but with hardware OK) ext4 system?
While creating an install USB disk, I made the trivial error of indicating the wrong device, and ended up overwriting the initial few hundred megabytes of a 230 GB disk.
The data was not extremely ...
1
vote
1
answer
83
views
Recover mis-gzipped folder / directory & files
I needed to compress/archive a folder, so I ran the following command:
gzip -v --rsyncable --fast -r myFolder/ -c > myFolderArchive.gz
...foolishly thinking this was going to do just what I ...
1
vote
1
answer
272
views
Linux extract .zip and preserve all original files timestamps (created/modified/accessed)
It's possible to restore original file timestamps during extraction on linux? I'm tested .zip extraction using 7z, unzip, unar, but only modification date is restored.
Environment:
Linux Mint 22
...
1
vote
0
answers
224
views
Ext4 formatted External HDD is corrupt, need to find backup superblocks
I have an external HDD drive formatted as Ext4 connected to my Raspberry Pi server. The server has been crashing lately and as a consequence the HDD is corrupt. When I plug to my computer and run sudo ...
0
votes
1
answer
85
views
How do I empty the Kernel Keyring Buffer withouta restart?
I'm planning on using the Ext4 file encryption ability. Everything works fine, but there is one problem left. After removing the PASSWORD via keyctl, i still can see the content of the encrypted ...
0
votes
1
answer
247
views
Determine bytes per inode ratio of existing ext4 filesystem
I created a filesystem following this guide: https://wiki.archlinux.org/title/Ext4#Create_a_new_ext4_filesystem
However it looks like I made a mistake because the ratio for /dev/sdc doesn't add up:
...
2
votes
2
answers
567
views
How is it possible to create >65000 entries in an ext4 directory despite the large_dir flag not being present?
So, I'm trying to understand FileSystem feature flags a little bit better.
For what I could find, according to man ext4 a single directory in a ext4 FS can host up to 64,998 subdirectories.
Normally, ...
2
votes
1
answer
333
views
Should I care about ext4 free block/inode/orphan count being wrong?
I have my system to fsck all fs at all reboots. And forced fsck just now. Yet I still get:
$ sudo fsck -vn /dev/lvmroot/root
fsck from util-linux 2.40.2
e2fsck 1.47.1 (20-May-2024)
Warning! /dev/...
6
votes
2
answers
2k
views
Is ext4 and xfs only for usage with internal file systems?
I am attempting to store some large files and I thought an encrypted ext4 partition would be excellent. However the GNOME Disk Utility appears to state ext4 as for internal disks and xfs only for ...
0
votes
1
answer
189
views
ext4 and chattr ( change attributes ) 's - undo ( u ) option
This is an microsd ext4 card on a rooted Android, where I want to use
busybox chattr -R +u /mypath
I know what +u means but does anyone have an idea about how the undo option is implemented for ext4 ...
0
votes
0
answers
76
views
Very large discrepancy between du and df
OS is Debian. I have a few systems that seem to not be freeing disk space correctly.
On a normal system:
du --max-depth 1 / --exclude=/proc -h -x
Seems to almost exactly agree with:
df -h /
ie, ~800 ...
-1
votes
3
answers
282
views
ext4 filesystem on RHEL 7
I have a RHEL 7 ext4 type filesystem and because of the lack of funding and no backups available I am trying to see if I can import ext4 filesystem from RHEL 7 into RHEL 8.
I have a RHEL 7 with 2 ...