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]
968
questions
1
vote
2
answers
346
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
150
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
90
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 ...
138
votes
12
answers
214k
views
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?
0
votes
1
answer
196
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
119
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
54
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 ...
1
vote
1
answer
761
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 ...
0
votes
1
answer
65
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:
...
3
votes
1
answer
468
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
162
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 ...
10
votes
4
answers
10k
views
Why is mount failing silently for me?
I'm trying to mount a device but without success.
The strange thing is that the mount command succeeds and return exit code 0, but the device is not mounted.
Any idea on why this happens or how to ...
0
votes
2
answers
2k
views
How to erase/wipe all ext4 metadata, not just the filesystem signature 53 ef?
I want to make zero all bits of a partition where an ext4 filesystem structure existed (superblocks, metadata, journal, etc), not just the filesystem signature deleted by wipefs.
I can quickly zero ...
0
votes
1
answer
173
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 ...
4
votes
4
answers
13k
views
How to use zerofree on a whole disk?
My VirtualBox filesystem looks like:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 29799396 5467616 22795012 20% /
devtmpfs 1929980 0 1929980 0% /...
1
vote
1
answer
1k
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
523
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
0
answers
36
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 ...
0
votes
1
answer
81
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 ...
1
vote
2
answers
685
views
Debian fails to boot. Goes to intramfs shell. Matrix numbers on running of fsck
So in essence there appears to be a problem of some sort that is causing my laptop to be unable to boot.
As can be seen there is an error in /Dev/mapper/debian--vg-root requiring a manual fsck check ...
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 ...
3
votes
1
answer
607
views
Is ext4 fast_commit really stable? (Linux 6.3)
It seems I've been too quick to enable fast_commit on most my ext4 file systems and since then I often experienced FS corruptions. I've never ever had this kind of issues with ext4 that has been rock ...
9
votes
3
answers
4k
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 ...
0
votes
1
answer
67
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 ...
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 ...
1
vote
2
answers
772
views
ext4 free blocks or overhead clusters
When I create an ext4 file system on a sparse 16GB file without reserving root space, the actual free size is 15.58GB. Why does this happen?
Commands I use:
fallocate -l 16G test.img
mkfs -t ext4 -m 0 ...
0
votes
0
answers
54
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
620
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 ...
20
votes
2
answers
31k
views
What should I do to force the root filesystem check (and optionally a fix) at boot?
Yesterday, one of our computers dropped to grub shell or honestly, I am unsure what shell it was when we turned on the machine.
It showed that it can't mount the root filesystem or something in this ...
0
votes
1
answer
186
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
115
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, ...
12
votes
4
answers
49k
views
mount ext4 disk: cannot mount /dev/sdc read-only
I have an SSD disk with an ext4 filesystem on it:
$ lsblk -f /dev/sdc
NAME FSTYPE LABEL UUID MOUNTPOINT
sdc ext4 142b28fd-c886-4182-892d-67fdc34b522a
I am ...
0
votes
1
answer
197
views
Is there a case where Applications need to do it's own File corruption checks with file systems like EXT4 and XFS and recent Linux OS like Red-Hat 8
What I presumed is
File systems like EXT4 and XFS. Writes blocks to disk (Could be a Hard Disk or a SSD) along with a checksum.
When Reading back, if checksum fails, read operation will NOT return ...
0
votes
0
answers
109
views
Corrupted EXT4 filesystem on embedded Linux (A20 Olimex Lime 2) with clean poweroff
Context
I'm here to talk to you about an EXT4 filesystem issue that I don't understand.
In my company, we are working on embedded Linux system.
We use the board Olimex Lime 2.
T2-OLinuXino-LIME2-...
0
votes
1
answer
869
views
Find command very slow in directory with tons of files and subdirectories
For about a week I've been waiting for the following command to complete
find -type d -empty -print -delete >> empty-folder-deletion-log.txt
but it is still going and it seems like it has a lot ...
34
votes
1
answer
22k
views
"inode extent tree (at level 1) could be shorter IGNORED"
I have a Debian system here. fsck runs from time to time while booting (on an ext4 file system).
I get messages like this:
inode extent tree (at level 1) could be shorter IGNORED
What do they mean?
1
vote
1
answer
182
views
external HDD drive become Read-only file system with wrong file system type
I have a Toshiba HDD with an ext4 file system that I have been using extensively until yesterday. Suddenly, it has become a read-only file system, and when I run fdisk -l, it shows the type as HPFS/...
7
votes
3
answers
2k
views
How to change the casefold ext4 filesystem option of the root partition, if I only have ssh access
I need to enable the case insensitive filesystem feature (casefold) on ext4 of a Debian 11 server with a backported 6.1 linux kernel with the required options compiled in.
The server has a swap ...
5
votes
1
answer
5k
views
How to enable new in kernel 5.2 case-insensitivity for ext4 on a given directory?
I saw that kernel 5.2 got handling of ext4 case-insensitivity per directory by flipping a +F bit in inode.
This EXT4 case-insensitive file-name lookup feature works on a
per-directory basis when ...
1
vote
1
answer
329
views
Mount a LUKS encrypted EXT4 formated image file when mount folder is accessed (using autofs)
Here's what I'd like to do. Use autofs to automount an encrypted luks image file when the target directory is accessed.
I've been playing with both fstab and crypttab, but to no luck.
I do NOT want to ...
2
votes
2
answers
2k
views
How to atomically defragment ext4 directories
Fragmentation seems to create a lot of unnecessary seeks when traversing a directory tree on a HDD:
# stat -c %F 00 01 02
directory
directory
directory
# filefrag -v 00 01 02
Filesystem type is: ...
64
votes
5
answers
270k
views
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 ...
17
votes
1
answer
12k
views
Should I answer yes to "Clone multiply-claimed blocks<y>?" when running e2fsck?
When running
e2fsck -cck /dev/mapper/xxx
I am prompted with
has 487 multiply-claimed block(s), shared with 84 file(s):
... (inode #221446306, mod time Tue Feb 20 19:48:38 2018)
... (inode #...
2
votes
1
answer
414
views
Restore Rsync Backup Of System On Any Linux Distribution
I used the following alias to back up my root directory on Ubuntu 22.04 LTS to an external flash drive
alias backup='sudo rsync -aAXHS --info=progress2 --delete --exclude={"/dev/*","/...
1
vote
1
answer
254
views
RAID6 unable to mount EXT4-fs: bad geometry: block count exceeds size of device
On my server, I had an SSD as the boot drive with 11 6TB HDDs in a RAID6 setup as additional storage. However, after running into some issues with the motherboard, I switched the motherboard to one ...
0
votes
1
answer
100
views
Shrink part of disk to a new virtual disk
I have a Linux system (Debian 11) on a disk. Partition is 100GB, system only needs 10GB of data.
If I get all the disk (dd) and use it for as a disk of a virutual system (qemu, kvm) all is fine.
How ...
25
votes
2
answers
61k
views
What's the meaning of output of lsattr
I'm wondering what the output of lsattr means.It prints so oddly as follows,when I have tried: lsattr /usr.
$ lsattr /usr
-----------------e- /usr/local
-----------------e- /usr/src
-----------------...
3
votes
2
answers
201
views
How to refresh decoy data on a plausible deniability dm-crypt scheme?
I just read this discussion between Linus Torvalds and (among others) Milan Broz, one of dm-crypt's maintainers.
I am intrigued by the the following part of the discussion :
Linus Torvalds:
I thought ...
2
votes
2
answers
6k
views
Use testdisk and gpart information to mount ext4 partition
I am trying to recover the ext4 partition table of a 2TB disk, where I have 900.000 files. I have cloned the original HD and now I am working on the cloned HD. And I am running Parted Magic Live CD.
...
2
votes
2
answers
4k
views
How to check progress of an already running lvresize command?
First, filesystem was backed up and unmounted succesfully.
Then, an lvresize was executed, and is already running:
lvresize --resizefs --size 1024G /dev/dbdrp/db
And shows the output:
fsck from ...