Skip to main content
80 votes
Accepted

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

Presumably, you'll be seeing some flavor of "No space left on device" error: # truncate -s 100M foobar.img # mkfs.ext4 foobar.img Creating filesystem with 102400 1k blocks and 25688 inodes ---> ...
frostschutz's user avatar
  • 49.6k
80 votes
Accepted

Filesystem copied to new server is 60% bigger - why

I can think of two things offhand: you didn't use -H, so hardlinks are lost. you didn't use -S, so sparse files may have been expanded
mattdm's user avatar
  • 40.5k
63 votes
Accepted

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

A directory that used to be huge may still have a lot of blocks allocated for directory entries (= names and inode numbers of files and sub-directories in that directory), although almost all of them ...
telcoM's user avatar
  • 101k
52 votes

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

Once the limit is reached, subsequent attempts to create files will fail with ENOSPC, indicating that the target file system has no room for new files. In the scenario you describe, this will ...
Stephen Kitt's user avatar
51 votes
Accepted

When is ext5 coming or when will ext4 be updated to support large (huge) SSDs?

64-bit ext4 file systems can be up to 64ZiB in size with 4KiB blocks, and up to 1YiB in size with 64KiB blocks, no need for an ext5 to handle large volumes. 1 YiB, one yobibyte, is 10248 bytes. There ...
Stephen Kitt's user avatar
48 votes
Accepted

Cannot remove file: "Structure needs cleaning"

That is strongly indicative of file-system corruption. You should unmount, make a sector-level backup of your disk, and then run e2fsck to see what is up. If there is major corruption, you may later ...
DepressedDaniel's user avatar
45 votes

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

Out of curiosity, let's try to reproduce this: $ mkdir test $ cd test $ time ls # Check initial speed of ls real 0m0,002s $ stat . # Check initial size of directory File: . Size: 4096 ...
jpa's user avatar
  • 1,269
43 votes
Accepted

How to make an ext4 formatted usb drive with full RW permissions for any linux machine?

Like any unix-style filesystem, ext4 includes standard Unix file ownership and permission conventions. That is, the user is identified by an UID number, and each user will belong to one or more groups,...
telcoM's user avatar
  • 101k
38 votes
Accepted

Why is ext4 only recommended up to 16 TB?

The exact quote from the ext4 Wikipedia entry is However, Red Hat recommends using XFS instead of ext4 for volumes larger than 100 TB. The ext4 howto mentions that The code to create file ...
Stephen Kitt's user avatar
35 votes
Accepted

"inode extent tree (at level 1) could be shorter IGNORED"

They mean that e2fsck determined that an extent tree (a data structure used to point to data in the file system) could be restructured to have less depth (presumably because it tracked extents in the ...
Stephen Kitt's user avatar
34 votes

Birth is empty on ext4

The xstat function never got merged into mainline. However, a new statx call was proposed later on, and was merged in Linux 4.11. The new statx(2) system call does include a creation time in its ...
muru's user avatar
  • 73.9k
32 votes
Accepted

How to delete a file named "filen/ame" (with slash) on an ext4 filesystem in debugfs?

If you want a fix and are not just trying out debugfs, you can have fsck do the work for you. Mark the filesystem as dirty and run fsck -y to get the filename changed: $ debugfs -w -R "dirty" /tmp/...
meuh's user avatar
  • 51.9k
32 votes
Accepted

What ext4 functionality does btrfs not support?

Disadvantages of btrfs compared to ext4: btrfs doesn't support badblocks This means that if you've run out of spare non-addressable sectors that the HDD firmware keeps to cover for a limited number ...
Tom Hale's user avatar
  • 31.2k
30 votes

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

I just ran into this same problem. After debugging the issue with the e2fsck maintainer, we realised that the SD card was broken. It was accepting writes without error, but it wasn't actually ...
Malvineous's user avatar
  • 6,983
26 votes

How to create a hard link to an inode (ext4)?

AFAIK, not with the kernel API. If such an interface existed, it would have to be limited to the super-user as otherwise that would let anyone access files in directories they don't have search access ...
Stéphane Chazelas's user avatar
25 votes
Accepted

What happens when I kill 'cp'? Is it safe and does it have any consequences?

This is safe to do, but naturally you may not have finished the copy. When the cp command is run, it makes syscalls that instruct the kernel to make copies of the file. A syscall, or system call, is a ...
forest's user avatar
  • 2,695
25 votes
Accepted

mount ext4 disk: cannot mount /dev/sdc read-only

I had a similar problem with a USB thumb drive which was down to the ext4 journal recovery not working. dmesg confirmed this: [1455125.992721] EXT4-fs (sdh1): INFO: recovery required on readonly ...
Andrew Martin's user avatar
23 votes

What happens when I kill 'cp'? Is it safe and does it have any consequences?

Since cp is a userspace command, this does not affect filesystem integrity. You of course need to be prepared that at least one file will not have been copied completely if you kill a runnning cp ...
schily's user avatar
  • 19.3k
23 votes
Accepted

Should I answer yes to "Clone multiply-claimed blocks<y>?" when running e2fsck?

Multiply-claimed blocks are blocks which are used by multiple files, when they shouldn’t be. One consequence of that is that changes to one of those files, in one of the affected blocks, will also ...
Stephen Kitt's user avatar
22 votes

What does the 'barrier' mount flag mean in Linux?

Most modern file systems are journaling file systems, which means that they keep track of changes that have not yet been written to disk in an internal data structure called a journal. In the event ...
remmy's user avatar
  • 5,065
22 votes

Does any file system implement Copy on Write mechanism for CP?

From cp man page: When --reflink[=always] is specified, perform a lightweight copy, where the data blocks are copied only when modified. If this is not possible the copy fails, or if --reflink=...
sebasth's user avatar
  • 15.1k
22 votes
Accepted

What should I do to force the root filesystem check (and optionally a fix) at boot?

ext4 filesystem check during boot Tested on OS: Linux Mint 18.x in a Virtual Machine Basic information /etc/fstab has the fsck order as the last (6th) column, for instance: <file system> &...
jc__'s user avatar
  • 2,655
22 votes
Accepted

Reset ext4 filesystem without changing the filesystem UUID

Since you're using ext4 you could format the filesystem and the set the UUID to a known value afterwards. man tune2fs writes, -U UUID Set the universally unique identifier (UUID) of the filesystem to ...
Chris Davies's user avatar
22 votes

When is ext5 coming or when will ext4 be updated to support large (huge) SSDs?

The 64bit ext4 filesystem feature removes the 232 block limit. If this feature was not enabled when your filesystem was created, you can add it to the superblock using tune2fs(8): tune2fs -O 64bit /...
forest's user avatar
  • 2,695
21 votes

Does umount calls sync to complete any pending writes

No, you don't need to run sync before umount. umount will complete all pending writes before it actually unmounts the filesystem. It will also refuse to unmount if some process is still using the ...
dirkt's user avatar
  • 32.6k
20 votes

What do "extents" feature do in ext4 filesystem in linux?

Extents reduce the amount of metadata needed to keep track of the data blocks for large files. Instead of storing a list of every individual block which makes up the file, the idea is to store just ...
sengi's user avatar
  • 301
20 votes
Accepted

Does inode number determine what files were created earlier than others?

Lower inode number doesn't prove older. A simple case that would change that sequence is deleting a file which would free the inode. That inode therefore becomes available for future use.
Julie Pelletier's user avatar
20 votes
Accepted

Why do I have "errors=remount-ro" option in my ext4 partition in my Linux?

It is perfectly valid for ext4, and is defined in the ext4 manpage: errors={continue|remount-ro|panic} Define the behavior when an error is encountered. (Either ignore errors ...
Stephen Kitt's user avatar
20 votes
Accepted

Why directory with large amounts of entries does not shrink in size after entries are removed?

Quoting a developer (in a linux kernel thread ext3/ext4 directories don't shrink after deleting lots of files): On Thu, May 14, 2009 at 08:45:38PM -0400, Timo Sirainen wrote: > > I was rather ...
Thomas Dickey's user avatar
20 votes
Accepted

Minimalistic ext4 filesystem without journal and other advanced features

Or you could simply use ext2 For ext4: mke2fs -t ext4 -O ^has_journal,^uninit_bg,^ext_attr,^huge_file,^64bit [/dev/device or /path/to/file] man ext4 contains a whole lot of features you can disable (...
Artem S. Tashkinov's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible