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
---> ...
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
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 ...
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 ...
50
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 ...
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 ...
44
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 ...
42
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,...
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 ...
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 ...
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/...
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 ...
31
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 ...
29
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 ...
26
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 ...
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 ...
24
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 ...
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 ...
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 ...
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 ...
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 /...
21
votes
Accepted
mkfs.ext4 command not found in Debian (Jessie)
Do you have /sbin in your path?
Most likely you are trying to run mkfs.ext4 as a normal user.
Unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin ...
20
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 ...
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.
20
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=...
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 ...
19
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 ...
19
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 ...
19
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> &...
19
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ext4 × 941filesystems × 316
linux × 191
data-recovery × 88
partition × 78
mount × 66
debian × 55
ubuntu × 53
fsck × 50
hard-disk × 47
inode × 47
ext3 × 44
lvm × 35
ntfs × 34
btrfs × 30
files × 29
permissions × 26
luks × 25
xfs × 25
ext2 × 25
journaling × 24
ssd × 23
mkfs × 23
disk-usage × 22
disk × 22