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
14k 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?
19
votes
4answers
31k 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 ...
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 ...
14
votes
2answers
4k 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 ...
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
43k 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
1k 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
3k 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 :).. ...
8
votes
3answers
11k 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
1answer
466 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
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
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
20k 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
1k 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 ...
7
votes
1answer
310 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 ...
6
votes
1answer
586 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
376 views

Defragging an ext partition?

Why don't ext2/3/4 need to be defragmented? Is there no fragmentation at all?
6
votes
4answers
293 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
405 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
684 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
360 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
5k 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
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?
5
votes
2answers
3k 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
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
3k 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
559 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
759 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
983 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
116 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
5k 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
126 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
237 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
147 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
137 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 ...
4
votes
2answers
1k 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 ...
4
votes
1answer
274 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 ...
4
votes
1answer
1k views

Unable to mount a second hard drive in Ubuntu Server

I am adding a second drive to my Ubuntu Server. It was previously in a FreeNas system, but I got rid of the XFS partition and created an ext4 partition (in an older Ubuntu system). I then backed up ...
4
votes
2answers
4k views

ext4 formatting weirdness

Just got a new 2TB hardrive for my Debian Squeeze Box. Trying to format it in ext4 after creating a Primary partition using cfdisk. I just did this exact process with a 120GB drive on the same ...
4
votes
1answer
500 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 ...