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]

ext4 (fourth extended filesystem) is a journalling file system for Linux, developed as the successor to ext3.

Ext4 information on wikipedia includes hostoric information.

Ext4 is supported on Windows and OSX by commercial software.

929 questions
138
votes
11 answers

How do I know if a partition is ext2, ext3, or ext4?

I just formatted stuff. One disk I format as ext2. The other I want to format as ext4. I want to test how they perform. Now, how do I know the kind of file system in a partition?
user4951
  • 10,329
  • 28
  • 71
  • 92
111
votes
6 answers

Birth is empty on ext4

I was just reading up on the Birth section of stat and it appears ext4 should support it, but even a file I just created leaves it empty. ~ % touch test slave-iv ~ % stat test.pl …
xenoterracide
  • 57,918
  • 74
  • 184
  • 250
77
votes
7 answers

Can overwritten files be recovered?

I am not talking about recovering deleted files, but overwritten files. Namely by the following methods: # move mv new_file old_file # copy cp new_file old_file # edit vi existing_file > D > i new_content > :x Is it possible to retrieve anything…
Question Overflow
  • 4,568
  • 19
  • 57
  • 84
76
votes
7 answers

Tell fs to free space from deleted files NOW

Is there a way to tell the kernel to give back the free disk space now? Like a write to something in /proc/ ? Using Ubuntu 11.10 with ext4. This is probably an old and very repeated theme. After hitting 0 space only noticed when my editor couldn't…
Marcos
  • 2,275
  • 2
  • 23
  • 32
64
votes
5 answers

Recovering ext4 superblocks

Recently, my external hard drive enclosure failed (the hard drive itself powers up in another enclosure). However, as a result, it appears its EXT4 file system is corrupt. The drive has a single partition and uses a GPT partition table (with the…
tlvince
  • 1,156
  • 1
  • 8
  • 11
48
votes
2 answers

What happens if the limit of 4 billion files was exceeded in an ext4 partition?

What happens if the limit of 4 billion files was exceeded in an ext4 partition, with a transfer of 5 billion files for example?
Bensuperpc
  • 601
  • 5
  • 9
48
votes
2 answers

Is data=journal safer for Ext4 as opposed to data=ordered?

The default journal mode for Ext4 is data=ordered, which, per the documentation, means that "All data are forced directly out to the main file system prior to its metadata being committed to the journal." However, there is also the data=journal…
Tim
  • 707
  • 1
  • 6
  • 9
46
votes
8 answers

Cannot remove file: "Structure needs cleaning"

I have an external hard drive which is encrypted via LUKS. It contains an ext4 fs. I just got an error from rsync for a file which is located on this drive: rsync: readlink_stat("/home/some/dir/items.json") failed: Structure needs cleaning (117) If…
Rotareti
  • 843
  • 2
  • 9
  • 18
44
votes
2 answers

Why does "ls" take extremely long in a small directory that used to be big? How to fix this?

I'm running Arch Linux, and use ext4 filesystems. When I run ls in a directory that is actually small now, but used to be huge - it hangs for a while. But the next time I run it, it's almost instantaneous. I tried doing: strace ls but I honestly…
Belen
  • 551
  • 4
  • 7
35
votes
3 answers

Why doesn't my exactly 100 MiB partition at 1 KiB block size have the corresponding available blocks/space?

I have a very high density virtualized environment with containers, so I'm trying to make each container really small. "Really small" means 87 MB on base Ubuntu 14.04 (Trusty Tahr) without breaking up the package manager compatibility. So I use LVM…
maniaque
  • 498
  • 4
  • 7
30
votes
1 answer

Why is ext4 only recommended up to 16 TB?

In the ext4 wiki article I've seen that ext4 can be used up to 1 EiB, but is only recommended up to 16 TiB. Why is that the case? Why is XFS recommended for larger file systems? (ELICS: Explain me like I'm a CS student, but without much knowledge in…
Martin Thoma
  • 2,802
  • 5
  • 34
  • 45
29
votes
5 answers

fsck won't fsck (unable to set superblock flags)

Following an unclean shutdown on an SD card based device, I took the SD card out to fsck the root filesystem. This led to variations on the following: e2fsck 1.43.1 (08-Jun-2016) /dev/sdc2: recovering journal Superblock needs_recovery flag is…
goldilocks
  • 86,451
  • 30
  • 200
  • 258
29
votes
3 answers

How can I mount a filesystem, mapping userids?

I can successfully mount an ext4 partition, the problem is that all the files on the partition are owned by the user with userid 1000. On one machine, my userid is 1000, but on another it's 1010. My username is the same on both machines, but I…
Flimm
  • 3,970
  • 7
  • 28
  • 36
28
votes
1 answer

How do I determine the new size for resize2fs?

I want to shrink an ext4 filesystem to make room for a new partition and came across the resize2fs program. The command looks like this: resize2fs -p /dev/mapper/ExistingExt4 $size How should I determine $size if I want to substract exactly 15 GiB…
Lekensteyn
  • 20,173
  • 18
  • 71
  • 111
27
votes
1 answer

Filesystem copied to new server is 60% bigger - why

I'm migrating a server from an Ubuntu Server 18.02 instance ("saturn") to a newly-built Debian Buster 10 system ("enceladus"). I have copied a complete filesystem across the network using sudo rsync --progress -au --delete --rsync-path="sudo rsync"…
Henry Law
  • 395
  • 3
  • 4
1
2 3
61 62