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

learn more… | top users | synonyms

32
votes
6answers
17k 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?
22
votes
4answers
35k 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 ...
15
votes
2answers
5k views

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 ...
14
votes
2answers
2k views

Can the same ext4 disk be mounted from two hosts, one readonly?

I know that mounting the same disk with an ext4 filesystem from two different servers (it's an iSCSI vloume) will likely corrupt data on the disk. My question is will it make any difference if one of ...
13
votes
1answer
2k views

Is disabling barriers for ext4 safe on a laptop with battery?

The manual page says about the barrier option for ext4: Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write caches safe to use, at some performance ...
11
votes
7answers
47k views

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 ...
10
votes
2answers
4k views

Is it possible to change Inode count on an ext4 filesystem? [duplicate]

Possible Duplicate: How can I increase the number of inodes in an ext4 filesystem? I have a homemade NAS with Debian Wheezy 64bit. It has three disks - 2x2TB and 1.5TB, pooled together ...
10
votes
1answer
2k views

Different UID/GID when using an ext4 formatted USB drive with another computer

The problem of using a filesystem like ext4 on a USB stick or memory card is that when it's mounted into another system the disk's UID/GID might not be present. Can this be fixed with a mount option? ...
10
votes
1answer
4k views

What does fsck -p (preen) do on ext4?

I was reading a blog post about filesystem repair and the author posted a good question… fsck -p is supposed to fix minor errors automatically without human intervention. But what exactly will it fix ...
10
votes
2answers
3k views

Why is deleting files by name painfully slow and also exceptionally fast?

Faux pas: The "fast" method I mention below, is not 60 times faster than the slow one. It is 30 times faster. I'll blame the mistake on the hour (3AM is not my best time of day for clear thinking :).. ...
9
votes
1answer
717 views

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 ...
8
votes
3answers
12k views

How to make ext4 filesystem sparse?

I am using Linux as guest OS in VirtualBox. I deleted huge number of files from its filesystem. Now i want to shrink the filesystem image file (vdi). The shrinking works by compressing filesystem ...
8
votes
2answers
4k views

largefile feature at creating file-system

Is useful to use -T largefile flag at creating a file-system for a partition with big files like video, and audio in flac format? I tested the same partition with that flag and without it, and using ...
8
votes
1answer
467 views

Can I convert an ext3 partition into ext4 without formatting?

my home directory is on a separate partition which still uses ext3. Is there a way to convert this partition into ext4 in a non-destructive way?
8
votes
1answer
4k views

How can I mount filesystems with > 4KB block sizes?

I have a 3TB hard disk pulled out of a WD Mybook Live NAS. The partition table is as follows: Model: ATA WDC WD30EZRS-11J (scsi) Disk /dev/sdb: 3001GB Sector size (logical/physical): 512B/4096B ...
8
votes
4answers
21k views

How can I fsck a partition when the device reads as busy (but has been confirmed otherwise)?

I'm attempting to run fsck -p /dev/sda5 to repair errors on an ext4 partition, however the command outputs fsck from util-linux-ng 2.17.2 fsck.ext4: Device or resource busy while trying to open ...
7
votes
6answers
3k views

Sync writes very slow. Ubuntu 10.10, 32 bits, ext4

I am running ActiveMQ on my Macbook Pro that runs Ubuntu 10.10, 32 bits with an ext4 partition. Linux iker-laptop 2.6.35-23-generic-pae #40-Ubuntu SMP Wed Nov 17 22:32:51 UTC 2010 i686 GNU/Linux If ...
7
votes
1answer
1k views

ext4: where did my free space go?

I just upgraded my Mageia 2 64bits VM to Mageia 3, and now my virtual disk free space is almost nil, even though less than 100% of the space is used. I am not an ext4 filesystem expert but I have ...
7
votes
1answer
2k views

ext4 overrides my commit=100 mount option with commit=0

Here is the relevant line from my /etc/fstab file: UUID=f51aa298-9ce4-4a19-a323-10df333f34f5 / ext4 data=writeback,noatime,barrier=0,errors=remount-ro,commit=100,nobh,nouser_xattr ...
6
votes
3answers
1k views

ext2/3/4 reserved blocks percentage purpose

I know that this feature dates back 20 years but I still would like to find out What is the purpose of the reserved blocks in ext2/3/4 filesystems?
6
votes
1answer
643 views

Why could the size of the “dot” file “.” exceed 4096?

Today I found an "empty" directory with a size of 4MB. It had no visible contents, so I tried ls -lah. This showed me some hidden files (not very large). Searching for the reason why the directory ...
6
votes
2answers
386 views

Defragging an ext partition?

Why don't ext2/3/4 need to be defragmented? Is there no fragmentation at all?
6
votes
4answers
317 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 ...
6
votes
1answer
1k views

Significant difference in speed between fsck using ext3 and ext4 on Debian Squeeze

Recently I installed Debian Squeeze, first using ext3 and then again using ext4 on the same machine. The automatic fsck done after a certain number of mounts is much faster using ext4 (about 1 min) ...
6
votes
1answer
643 views

“Converting” a filesystem from ext3 to ext4

I've read on some Q&A on this website that one can "convert" an ext3 filesystem to ext4 without formatting, by issuing tune2fs -O extents,uninit_bg,dir_index /dev/dev-name And then running ...
6
votes
1answer
709 views

How are files laid out in ext2/ext3/ext4?

A few days ago all my metadata on a ext4 format flash card was overwritten. I am now going to speculate on how this happened. This is pure speculation. It happened just after I used a different ...
6
votes
3answers
7k views

Backup or snaphot tool for ext4

I'm looking for a backup tool for ext4, which can take a copy from a running FS like /var with no collisions in system after recover such FS. I know BSD dump has an '-L' option, which tells him to ...
6
votes
1answer
391 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 ...
6
votes
1answer
6k views

How to configure a filesystem+LVM for effective usage of SSD?

ext4 is one of the filesystems recommended for using on SSDs (with a number of built-in techniques and advices how to tune it for better performance and wear-levelling of SSDs). I want to install a ...
5
votes
2answers
4k views

Why is (free_space + used_space) != total_size in df? [duplicate]

Possible Duplicate: ext4: How to account for the filesystem space? I have a ~2TB ext4 USB external disk which is about half full: $ df Filesystem 1K-blocks Used Available ...
5
votes
1answer
221 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 ...
5
votes
3answers
3k views

Recovering an ext4 filesystem with corrupt journal

I have a hard drive that seems to have developed some kind of hardware problem in the journal. This prevents the drive from being loaded. Running mount -r -t ext4 /dev/sda5 /mnt/root results in the ...
5
votes
2answers
4k 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 ...
5
votes
1answer
3k views

Is there any difference between e2fsck and e4fsck on CentOS / RHEL systems?

ext4.wiki.kernel.org makes it sound like e2fsck was simply renamed to e4fsck so that e4fsprogs and e2fsprogs could coexist without overlapping. However, there is no mention of any difference in the ...
5
votes
1answer
646 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 ...
5
votes
1answer
945 views

Is it possible to disable file permissions on a ext3 or ext4 file-system?

Is it possible to disable file permissions on an ext3/4 file-system? Just wondering if it's possible to completely disable or ignore file permissions on a ext3 or ext4 file system. Perhaps a mounting ...
5
votes
1answer
4k views

Find which files are affected by bad blocks on ext4 filesystem

I have an ext4 filesystem that recently developed some bad sectors. Running fsck.ext4 -c finds and remembers the bad blocks. How can I find which files (if any) included these bad blocks so I can ...
5
votes
1answer
543 views

What are EXT4 Security Labels?

During Gentoo installation of Gnome keyring, I am told to switch on EXT4 Security Labels, which is described in the kernel documentation by: Security labels support alternative access control ...
5
votes
1answer
1k views

Fragmentation and ext4

Suppose I have a sparse file F on a Linux ext4 filesystem, and process P1 is writing to a disjoint 50% subset of F while P2 writes to the other 50% of F. I would like to minimize fragmentation while ...
5
votes
3answers
162 views

What filesystem metadata operations are actually journaled in ext4 & xfs?

I can't find a simple, straight answer about which filesystem metadata operations are actually persisted to the ext4 & xfs filesystem journals. Note that I am not inquiring about what POSIX ...
4
votes
2answers
4k views

ext4: How to account for the filesystem space?

I've recently formated a 1.5 TB drive with the intention of replacing ntfs with ext4. Then I noticed that the files I saved don't fit on the new partition. df: ext4 (ext3 & ext2 show the same ...
4
votes
2answers
6k views

Should a laptop user switch from ext4 to btrfs?

Related to this. I'd like to take advantage of an OS switch to upgrade to BTRFS. BTRFS claims to offer a lot (data-loss resiliency, self-healing if RAID, checksumming of metadata and data, ...
4
votes
2answers
142 views

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 > ...
4
votes
2answers
1k views

External hard drive permissions - ext4

I have an external USB 3 disk drive (2TB capacity) that is most likely going to be moved from machine to machine. The disk has a GUID partition table and an ext4 partition. I am unable to write to the ...
4
votes
2answers
183 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 ...
4
votes
1answer
335 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 ...
4
votes
4answers
332 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, ...
4
votes
4answers
239 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, ...
4
votes
2answers
2k views

what is commit=0 for ext4? does mdadm not support it?

I see this in my dmesg log EXT4-fs (md1): re-mounted. Opts: commit=0 EXT4-fs (md2): re-mounted. Opts: commit=0 EXT4-fs (md3): re-mounted. Opts: commit=0 I think that means that dealloc is disabled? ...
4
votes
1answer
138 views

ext4 directory lists as a file

I'm working with a large (8TB) EXT4 filesystem in linux. After a power outage, the filesystem wouldn't mount. fsck is taking weeks to complete, but i ran testdisk and i'm able to see my partition ...