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]
967
questions
1
vote
0
answers
17
views
Is it safe to write to file's extents directly while the FS is r/w?
Given any file on an ext4 filesystem, it is possible (using filefrag -v) to get the list of real offsets+lengths where that file is located on the underlying block device.
Is it safe to open the ...
3
votes
1
answer
304
views
Why a filesystem is unmounted but still in use?
I was using ext4 filesystems for a long time, and it's the first time I see a weird behavior of ext4 filesystem.
There is ext4 filesystem in /dev/dm-2
An I/O error happened in the underlying device, ...
0
votes
0
answers
23
views
reconstructing ext4 inode structure after folder deletion
My ext4 partition that had my whatsapp data had its entire folder deleted ( that is file / folder delete - no partition ).
As I understand inodes have the metadata tree for files including their ...
0
votes
1
answer
37
views
How to remove a file with Extents attribute, from Linux [closed]
in CentOS, ext4 filesystem, I have a file that has the "extents" attribute, but I can't remove that file
-------------e-- index.php
rm -f does nothing (nor I get an error message)
tried to ...
0
votes
1
answer
51
views
Inode limit reached with free space available
Let's assume I was very unlucky and ran out of inodes in my ext4 filesystem but left with enough free space.
Inode usage is 100%, but it has 50% disk free space.
How can I resolve it?
1
vote
1
answer
60
views
How do I rescue an encrypted LUKS partition after failed shrink
I had an encrypted ext4 partition on a Samsung T7 1TB USB drive. It was LUKS (I believe this may be called a LUKS container?) The partition was 850GB. It had about 130GB in use. I also had an ...
0
votes
2
answers
82
views
Setting up ext4 filesystem to accomodate 100,000,000 files iNode issues
I have a RHEL 9 with an ext4 fs
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1258291199 1258289152 600G 83 Linux
it has been requested it be ext4 with Inodes for ...
0
votes
2
answers
60
views
ext4 separate files into subdirectories VS one big directory
Will organizing files into subfolders enhance read access performance on an ext4 filesystem compared to storing them all in a single large directory?
We currently have a single large directory ...
6
votes
2
answers
2k
views
How does EXT4 handle sudden lack of space in the underlying storage?
Usually, block device drivers report correct size of the device, and it is possible to actually use all the "available" blocks. So, the filesystem knows how much it can write to such device ...
0
votes
1
answer
36
views
Debian file corruption bug possible without reboot after unattended kernel update?
Today I learned that there had been a faulty Debian kernel version which caused ext4 data corruption (bug 1057843) in December 2023.
Searching through the /var/log/aptitude and /var/log/apt logs, I ...
0
votes
1
answer
86
views
Need full access to ext4 file system from Windows 10
I am looking for a method to read/write an ext4 partition from a Windows 10. Both partitions are on the same physical hard drive on a dual boot system. That means, that NFS wouldn't be sufficient. Are ...
0
votes
1
answer
38
views
Why does `du` report that my `rsync` backup is not the same size as the original?
I'm creating a backup of my $HOME directory on an external storage drive using rsync, using the following options:
--archive --xattrs --hard-links
After a fresh backup, du reports that the sizes of ...
1
vote
2
answers
40
views
Each file gets one inode block
A question was given to us by a lecturer:
How many data blocks are needed to collect all the data in an EXT4
file system using inodes if the file size is 54 KB and there is a
block size of 4KB.
...
0
votes
0
answers
15
views
dmesg shows nvme errors but smartctrl shows no errors
I keep seeing messages scroll in dmesg
Jan 27 12:56:11 localhost smartd[1191]: Device: /dev/nvme0, number of Error Log entries increased from 316 to 321
But I ran smartctrl tests on all the ...
0
votes
0
answers
54
views
Linux rootfs on iSCSI: Cannot remount read-write
I have a Linux server with an ext4 rootfs on iSCSI.
The iSCSI server rebooted and this interrupted the communication, which is usually not a big deal because the server is quick to restart.
However, ...
5
votes
2
answers
140
views
What can cause “multiply claimed blocks” on an ext4 drive?
“Multiply claimed blocks” is an error reported by fsck when blocks appear to belong to more than one file. This causes data corruption since both files change when one of the files are written.
But ...
2
votes
3
answers
197
views
EXT4 for very large (>1GB) files : increase block size, use block clusters, or both?
I'd like to format a 12 TB HDD (not SSD) with EXT4, in order to store large video files (each file being at least 1 GiB in size).
I am working with an x86-64 (a.k.a. x64 or amd64) processor.
There's ...
2
votes
0
answers
37
views
"No space left on device" depending on alphanumeric filename, adding or removing a character works [duplicate]
I just encountered this most curious of errors:
$ touch 3a59199733b83a8dba88b48c3f3c6fac05699ea8f1dd5ef7540ee57d64896d6d
touch: cannot touch '...
3
votes
1
answer
118
views
Are there downsides to enabling the "inline data" feature of EXT4?
I just read about the "inline data" feature in EXT4, and more specifically about that answer on how to enable it.
What are the reasons why this feature isn't enabled by default in EXT4 ? I ...
4
votes
1
answer
194
views
How many files in a directory is too many for ext4?
I wrote a Golang program to measure how long it takes to create 100 new files and read 100 existing files in a directory with 2k files vs a directory with 200k files:
// Create 200k files in one ...
3
votes
0
answers
99
views
What is "external fragmentation" in a file system?
I'm using EXT4, but I think my question concerns all Unix/Linux file systems.
This 2022 answer to "Difference between fragment and extent in ext4" states that:
External fragmentation occurs ...
0
votes
0
answers
23
views
Enable fs-verity at root directory
Can fs-verity be enabled on the root directory of a filesystem or the root directory of a subvolume in btrfs?
0
votes
0
answers
42
views
Any performance benefits of large inode sizes (ext4)
We have a video editing server split into two partitions. One for video footage and one for projects. On the projects partition there is totally 7TB of data and 250,000 files. Of these, 50,000 of them ...
1
vote
2
answers
36
views
Scan online EXT4 using LVM snapshot?
Can you make a trustworthy EXT4 filesystem-scan of an online filesystem, e.g. root, by taking a LVM snapshot and then do a scan on the snapshot, something like:
Make a snapshot:
lvcreate --snapshot --...
0
votes
0
answers
32
views
Fuzzy Search for filenames with synonyms and tags (auto generated)
Filesystem: Ext4
I create separate files for each topic.
I have thousands of files segregated into 2 or 3 levels of hierarchical broad categories. I would like to search for these files efficiently.
...
0
votes
0
answers
29
views
Additional log partition with buildroot
I made my Linux with Buildroot, and I would like to add an additional partition what can be mounted and store log files on it.
I use
pc_x86_64_efi_defconfig
and my
genimage-efi.cfg
is the ...
0
votes
0
answers
45
views
Is it possible for a filesystem type to be recognized differently or changed without reformatting a drive?
When running sudo fdisk -l my EXT4 formatted SamsungQVO USB SSD now identifies as APFS.
Device Start End Sectors Size Type
/dev/sda2 409640 3907029127 3906619488 1.8T Apple APFS
The ...
1
vote
2
answers
305
views
SSD initially mounts correctly, but disappears from lsblk after a few days
I am a Linux beginner, and am having a problem with a drive which disappears from lsblk periodically, and am stuck with how to proceed. The drive is an 240GB external USB SSD.
Mounting the Drive Works
...
2
votes
1
answer
133
views
In EXT4, are "extent" and "block group" the same thing?
TLDR;
In EXT4 terminology, are "block groups" and "extents" the same thing ?
[EDIT]
The suggested What do "extents" feature do in ext4 filesystem in linux? discussion ...
0
votes
1
answer
86
views
First 32GB of a 4TB ext4 filesystem overwritten. How to recover?
Due to an accident specifying a block device, the first 32GB of a 4TB ext4 filesystem on a SATA disk was overwritten by the dd command with the contents of a USB flash drive.
fdisk -l /dev/sda reports ...
0
votes
1
answer
172
views
Is there some universally recommended Reserved block count (for root) for large Ext4 drives?
By the following question:
Is there some universally recommended Reserved block count (for root) for large Ext4 drives?
I specifically mean the following:
Let us consider (almost) everyone has a ...
0
votes
2
answers
114
views
Is using the SysRQ Emergency Remount an acceptable way to clone hard disk?
I'm using Linux (Ubuntu) and I was told that I can use the method described below to clone the system's hard drive to another one - to plug into a new machine. (Without booting from a Live CD)
It ...
0
votes
0
answers
49
views
How unformat ext4 SSD formatted to ntfs
In my dual boot PC (win 10 - Ubuntu 20.04) I have an 1TB SSD. It was meant as storage for the Ubuntu OS in ext4 Filesystem. Unfortunately by mistake I formatted it with windows to NTFS. The Format was ...
0
votes
1
answer
59
views
fstab mount doesn't find device
I have a problem with mounting a simple ext4 USB device with sync option and defaults.
This is my fstab entry:
UUID=233b8055-d596-48a7-a666-1e10b8860d9c /USBSSD sync 0 0
when I use mount -a, it says:
...
1
vote
1
answer
633
views
"structure needs cleaning", hardware failure?
The drive that my /home folder lives on is showing signs of failing,
and I'm trying to migrate to a new drive.
I purchased a 4TB SSD, formatted it with ext4, mounted it as an external drive with a ...
3
votes
1
answer
415
views
Debian Bookworm, systemd, and how EXT4 quota works?
I have a fresh Debian 12 system and I'm trying to turn on and enforce EXT4 filesystem quota. I read a lot of man and some other sources, for example this one from Red Hat: https://access.redhat.com/...
0
votes
1
answer
142
views
"Bad Jump in FAT partition" and "Bad number of sectors per cluster" right before ext4 offset
TL;DR partition table (?) potentially messed up by windows disk management on drive containing both NTFS data partition and EXT4 filesystem. Fairly certain zero or almost zero data was lost. testdisk ...
0
votes
1
answer
158
views
Recovering an ext4 partition
I have an external drive with an ext4 partition /dev/sda1 I use for my local borg backups.
It is simply plugged in via usb port, and, mounted with an fstab generated systemd automount entry. I ran a ...
0
votes
0
answers
35
views
How to reclaim SSD space during formating
I've got a "1000GB SSD"
after creating partition (aligned to 2048) I'm down to
sdd 8:48 0 931.5G 0 disk
└─sdd1 8:49 0 931.5G 0 part
which is fine, because 1GB means 1000bytes ...
1
vote
1
answer
984
views
Mounting a VHDX ext4 partition in linux
I'm wondering how terrible an idea the following is or is not...
I want to share an ext4 fs between WSL2 and linux using a fixed-size .vhdx image created in windows (residing on NTFS partition). ...
0
votes
1
answer
457
views
How to resize partition in-between other partitions (CLI)?
How can I resize some partitions on a disk where there are other partitions before and after it?
I've found plenty of guides on the Internet about how to resize a partition (eg with parted), but they ...
0
votes
1
answer
80
views
Formatting the same drive with gparted: original NTFS=232.28MB used | Ext4= 1.92 GB used Why?
I'm formatting an external hard drive with gparted.
The original NTFS read 232.28 MB used.
Now, with Ext4, it reads 1.92 GB used.
Questions:
Why?
Is there a better file system I should use for ...
0
votes
0
answers
63
views
Unable to mount Raid 5+0 EXT4 partition
My server has a raid 5+0 configuration which is a raid 0 device made up of 2 x raid 5 devices.
md1 is made up of md10 and md11.
md1 : active raid0 md10[0] md11[1]
15627286528 blocks super 1.2 ...
0
votes
1
answer
64
views
Upgrading from ext3/4 to BTFS vs fresh install?
According to Debian
Ext2/3/4 filesystems are upgradeable to Btrfs; however, upstream recommends backing up the data, creating a pristine btrfs filesystem with wipefs -a and mkfs.btrfs, and restoring ...
9
votes
3
answers
3k
views
Minimalistic ext4 filesystem without journal and other advanced features
I have a small "rescue" system (16 MB) that I boot into RAM as ramdisk. The initrd disk that I am preparing needs to be formatted. I think ext4 will do fine, but obviously, it doesn't make ...
1
vote
1
answer
60
views
Almost empty disk after some actions on arch
I have an arch linux with ext4 partition
I had a working system and decided to make some backups
Here's what I've did:
Installed timeshift
After opening it I've decided to install btrfs-progs (I was ...
0
votes
0
answers
53
views
Why is my drive showing almost 1TB usage when I just now created the partition? [duplicate]
I just now got done wiping an 18TB drive, formatting it, making a new partition, and creating the filesystem on it. Below is the output of df -h on another machine that's connected via Samba.
//192....
0
votes
1
answer
528
views
How to enable data=journal ext4 fs mode?
Preface (my 1st attempt ended badly): Fstab adding data=journal crashed my Linux' ext4 upon boot, how to fix?
I can't find some reliable step-by-step instructions on How to enable data=journal ...
0
votes
1
answer
170
views
Fstab adding data=journal crashed my Linux' ext4 upon boot, how to fix?
I changed my /etc/fstab from:
UUID=f1fc7345-be7a-4c6b-9559-fc6e2d445bfa / ext4 errors=remount-ro 0 1
UUID=4966-E925 /boot/efi vfat umask=0077 ...
0
votes
0
answers
106
views
Mount a Luks Container on different devices at the same time
My scenario:
I have a 50GB luks container (ext4) stored on a NAS. I can mount and work with this device on a Debian Machine, no problems.
Now I need to work on the same container on two other devices, ...