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

learn more… | top users | synonyms

3
votes
1answer
29 views

Where does ext4 store directory sizes?

Where does ext4 store directory sizes? Are they stored in the directory inode? For example, when I run du -h, it returns directories' size instantly, so I don't believe it calculates it at that time. ...
1
vote
3answers
32 views

How much storage overhead comes along with cryptsetup and ext4?

I want to encrypt the content of a directory in a container with an ext4 filesystem using cryptsetup. The size of the container should be as small as possible and as big as necessary, because I only ...
2
votes
1answer
29 views

Why does fstrim trim all of the free space on my mdraid mirror after a reboot? [duplicate]

I have a server with 2 SSDs: Model Family: Intel 520 Series SSDs Device Model: INTEL SSDSC2BW240A3F Firmware Version: 400i User Capacity: 240,057,409,536 bytes [240 GB] Sector Size: ...
0
votes
2answers
21 views

I accidentally formatted the wrong volume - is it possible to restore the previous Ext4 filesystem?

I know that a similar question has already been asked. This morning I accidentally formatted the wrong volume, containing mostly video files (about 30GB each). I am currently trying to restore the ...
1
vote
1answer
35 views

Best parameters for ext4 filesystem to handle virtualbox disk images

I have ext4 partition, which holds disk image files VirtualBox works with. They all are fixed-size images (i.e. files never change their size). They are defragmented as much as possible (with ...
2
votes
0answers
12 views

ext4 flags to specify “extents” mode?

I've formatted a new filesystem with and without extents feature just to understand how this feature works. However, when I look at the inode field i_flags I see that this field always has zero value ...
4
votes
2answers
51 views

Reliable way to detect ext2 or ext3 or ext4?

I need to detect a filesystem type from a C/C++ program using the filesystem superblock. However, I don't see much differences between superblocks for ext2 and ext4. The s_rev_level field is the same ...
3
votes
1answer
23 views

ext4 inode size, shown by dumpe2fs

Manpage about mke2fs says "mke2fs creates 256-byte inodes by default". I've formatted my small (320MB) test partition with command: sudo mkfs -t ext4 /dev/sdc1 The defaults for the mke2fs are ...
4
votes
1answer
180 views

chmod does not change permissions of certain directories

System file: ext4 I changed the owner of files to apache: with the command: chown -R apache: wp.localhost Then, I could not change the permissions of directories in wp.localhost nor the ...
1
vote
1answer
44 views

Why is it impossible to change the inode count of an ext filesystem?

I know that it isn't possible to change the inode count of an ext filesystem after its creation, but I haven't been able to find any explanation on why it isn't. Can anyone enlighten me?
3
votes
1answer
51 views

ext4, why 70k file takes 88 blocks

[root@xx]# cat -n create_extents.sh 1 #!/bin/bash 2 3 if [ $# -ne 2 ] 4 then 5 echo "$0 [filename] [size in kb]" 6 exit 1 7 fi 8 9 ...
0
votes
1answer
27 views

Are there any tools to recover files from a previously formatted WinNT drive?

I scratched the previous Windows NT filesystem, now I'm running Ubuntu. I've created the whole disk as EXT4. Are there any tools to locate and save some previous Windows files from the original ...
2
votes
0answers
54 views

How to find orphan directory entries in a ext4 disk

This comes from a long story of trying to recovering a TrueCrypt volume from a hardware failure (thanks, WD). I ended up with an unencrypted 3TB image that had the files that I want to recover. ...
1
vote
4answers
33 views

targeting a specific block with e2fsck to shorten wait

Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking: /dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not ...
0
votes
1answer
41 views

Recovering truncated file

I'm in a peculiar situation. While editing a Perl program I accidentally truncated the file to zero length (using an Emacs lisp code I was developing). I need to recover that program... How do I that ...
1
vote
1answer
17 views

recovering /home folder from faulty drive

I was going to try ddrescue to recover data from a faulty (beeping) laptop drive and a primary ext4 partition. Reducing the number of reads from the disk should reduce the recovery time and increase ...
3
votes
2answers
325 views

Fix EXT4-fs bad geometry (block count exceeds size of device)

I have a micro SD card which has a FAT32 partition and an EXT4 partition. The EXT4 partition will no longer mount. dmesg shows the following error: EXT4-fs (sdb2): bad geometry: block count ...
1
vote
0answers
39 views

Optimization for an SSD?

I am running Fedora 20 on a Laptop ( Lenovo Ideapad Yoga 2 Pro ) with an SSD. My filesystem is LVM with ext4 as the format option. I am now running Fedora as the only OS on the system with Legacy BIOS ...
0
votes
1answer
16 views

mke2fs difference between -i and -I options

sudo mke2fs Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size] [-i bytes-per-inode] [-I inode-size] [-J journal-options] [-G flex-group-size] [-N number-of-inodes] [-m ...
2
votes
0answers
40 views

Do ext(4?) filesystems intrinsically store newer data in a fashion that is more prone to corruption?

I recently had a corrupted ext4 filesystem throwing these errors: kubuntu@kubuntu:~$ sudo mount -t ext4 /dev/sdc2 c1 mount: wrong fs type, bad option, bad superblock on /dev/sdc2, missing codepage ...
3
votes
1answer
158 views

Short read while trying to open partition

On my personal home computer running Kubuntu Linux 13.04 I'm having trouble mounting a partition that is very dear to me. My backup policy is to perform a backup about monthly, so I do have a backup ...
0
votes
0answers
48 views

e2fsck -y /dev/sda changed my 6TB disk into 1.8TB

After problems with mount I run e2fsck -y -b BLOCK /dev/sda and it was running for 3 days on 6TB raid 0, when it completed this was the output: /dev/sda: ***** FILE SYSTEM WAS MODIFIED ***** ...
2
votes
1answer
67 views

Same file with different content on every read [closed]

I have a problem with a filesystem here on a storage machine. We noticed, that many of the data that comes out of the systems seams to be corrupt, but only with minor problems like CRC errors with ...
3
votes
3answers
71 views

Ext4 - How to enable extra sanity, checksums, validations, tests of any kind?

I'm running Ext4 on a harddrive, and to be perfectly honest, I don't really trust the drive because it's old and has a few badblocks. I have nonessential data on the drive, so if it died tomorrow, ...
3
votes
1answer
56 views

File containing ext filesystem

Let's suppose I create a file, map it to /dev/loop0, and create a LUKS partition inside dd if=/dev/zero of=myfile bs=1M count=1000 losetup /dev/loop0 myfile cryptsetup -c aes-cbc-essiv:sha256 -s 256 ...
1
vote
1answer
111 views

Why is my ext4 filesystem recognizable only on the machine it was formatted on?

Xubuntu liveCD 11.04 running on "bad machine" with mdadm RAID1 array with an unrecognizable ext4 filesystem: To rescue some files, I installed a new hard drive and formatted it to ext4. I copied ...
3
votes
1answer
58 views

Something like VMware “Changed Block Tracking” (CBT) in linux

I'm wondering if is there any possibility to track changed blocks in linux with an ext3/ext4 filesystem (or a specific one supporting it). I mean a feture like the Changed Block Tracking (CBT) ...
2
votes
2answers
226 views

How to clean journals in ext3/ext4 filesystem? [closed]

Some preamble: I'm taking bitwise copy of disk devices (via dd command) from twin hosts (i.e. with the same virtualized hardware layout and software packages, but with different history of usage). To ...
2
votes
1answer
63 views

zerofree verbose returns what?

zerofree -v /dev/sda1 returned 123642/1860888/3327744. The man page does not explain what those numbers are: http://manpages.ubuntu.com/manpages/natty/man8/zerofree.8.html I found some code on ...
3
votes
1answer
92 views

“unknown partition table” - misconfigured kernel

I was compiling a custom linux kernel for a newly installed machine, and after booting into the new kernel (3.12), the init process fails to find a root device, which I traced to the system getting an ...
0
votes
1answer
47 views

e2fsck giving some error

I am playing with LVM and while doing lvreduce. I now get this error: [root@localhost raja]# e2fsck -f /dev/vg1/lvol2 e2fsck 1.41.12 (17-May-2010) e2fsck: Superblock invalid, trying backup blocks... ...
4
votes
1answer
101 views

How can I dump the contents of a filesystem's superblock?

I understand that I can list the location of a filesystem's superblocks using the following commands. Example First get the device handle for the current directory. $ df -h . Filesystem ...
2
votes
0answers
69 views

jbd2 journal constant i/o

iotop reports a constant i/o about 3% of [jbd2/vda1-8], I think this is the journal manager for ext4. my fstab is: UUID=X / ext4 defaults,noatime,nodiratime 1 1 tmpfs /dev/shm ...
2
votes
4answers
261 views

How do I find the offset of an ext4 filesystem?

I have a failing hard drive that is unable to write or read the first sectors of the disk. It just gives I/O errors and that is all there is. There are other areas on the disk that seem (mostly) fine. ...
2
votes
2answers
448 views

After crash, e2fsck fails with weirdly high block numbers/sizes

After a breaker trip a Raspberry Pi of mine started to halt boot with kernel panic (same message as here). This is a Raspberry Pi running Raspbian, so it runs from a SD card, from a main ext4 ...
-2
votes
2answers
191 views

How can I fill the free space with zeroes in Ubuntu 12.04 (ext4)?

I use windows server 2008r2 with role Hyper-V. The guest system is Ubuntu 12.04 LTC. It is situated on the dynamic virtual hard disk (2TB). The size of this vhd is 360 GB. But the real size is about ...
0
votes
0answers
54 views

livecd-tools - ext4 errors

I'm using livecd tools to build an ISO image customized to my liking. It appears to build fine, but after booting up, I get a bunch of ext4fs errors indicating referenced inodes were deleted. My ...
1
vote
0answers
91 views

Formatting external USB Harddrive ext4

What is the best way to format a non-ssd harddrive with ext4, for as fast as possible usage with a very low performance computer? I mean, options like disabling things (journaling, ...) that slow ...
1
vote
1answer
118 views

fsck ext4 on ssd: max mountcount and checkinterval

I'm using an ssd as the only drive in my laptop (Debian stable). It seems that SuSE sets mountcount to -1, disabling fsck at boot. The thread linked says that ext4 needn't be fsck'd anyway. Is that ...
1
vote
0answers
37 views

Restored VG has shifted volumes

I'm recovering a PV on a mdadm RAID 1 with a single VG containing several LVs. The underlying devices have several bad sectors (one just a few, the other really much) and a silly typo made it ...
2
votes
1answer
55 views

relocate ext4 structures to survive truncation

I have a 6Gb raw disk image with 1 ext4 partition on it. I have only 1Gb worth of data on it Is there a way to reposition/adjust ext4 datastructures such that I can truncate the disk at 1 GB or 1.2Gb ...
3
votes
4answers
156 views

How can I partition a volume in a regular file without loop?

I'm trying to play around with OS development, and I started with a boot loader, where phase 0 loads phase 1 from a file (specified by inode) on an ext4 partition (specified by first LBA). Of course, ...
6
votes
1answer
287 views

how to make malware file readable with “No read permission on file” on linux ext-4?

There is an ongoing campaign of sending virus/trojans in e-mail messages faked as being from HSBC Bank, Lloyds TSB, Amazon etc. The trojan/virus is sent in a application/zip attachment. I've saved ...
2
votes
1answer
350 views

Decrease time to shrink ext4 filesystem

I need to shrink a large ext4 volume, and I would like to do it with as little downtime as possible. With the testing I've done so far it looks like it could be unmounted for the resize for up to a ...
1
vote
1answer
81 views

How does my partition (ext4) know its size of used/free space?

I ran df, and the output appears almost instantly: (FS Size Used Avail Use%) /dev/sda1 145G 8.4G 130G 7% sda1 is an ext4 partition. Without summing the size of all files, how can ...
1
vote
2answers
1k views

Disk problems prevent me from booting, or set the disk to read-only. How do I fix the disk?

Problem: Since about one week ago, my Ubuntu system encounters various severe and strange problems. Sometimes the whole system suddenly freezes. I have to push the power button to shut down the ...
1
vote
1answer
192 views

Linux EXT 4: How to list files that occupy a block group?

Linux EXT 4: How to list files that occupy a block group? I believe a file can span multiple block groups. Given a block group, how do i enumerate the paths of all files contained in it?
6
votes
4answers
258 views

Are short-lived files flushed to disk?

My program creates many small short-lived files. They are typically deleted within a second after creation. The files are in an ext4 file system backed by a real hard disk. I know that Linux ...
1
vote
4answers
3k views

What does “mounting fs with errors” mean in dmesg and what to do after that?

I run dmesg and this is what I see: EXT4-fs (sda1): warning: mounting fs with errors, running e2fsck is recommended EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: Here is the ...
5
votes
1answer
371 views

Why is this empty directory 3.5MB?

I've just read this question: What does size of a directory mean in output of 'ls -l' command? ...which doesn't quite answer my question. Basically, I'm moving files onto a NAS. The folders ...