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]

Filter by
Sorted by
Tagged with
80
votes
5answers
37k 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 ...
15
votes
3answers
11k views

ext4: How to account for the filesystem space?

I've recently formatted 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 ...
41
votes
4answers
111k 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 > ...
8
votes
1answer
10k 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 ...
12
votes
2answers
24k views

How can I shrink a LUKS partition, what does `cryptsetup resize` do?

I am in progress of resizing a LUKS encrypted partition that contains a single ext4 filesystem (no LVM or something). The cryptsetup FAQ recommends to remove the old partition and recreate it, but ...
9
votes
6answers
15k 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. ...
15
votes
1answer
7k 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 I'...
3
votes
3answers
3k views

Data recovery from an accidental format on ext4 partition

When I was installing Mint Debian edition unlike the classic edition, the installation automatically formated my home partition when I did not specify to format. So the formatting previously was ext4 ...
47
votes
4answers
179k 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 ...
26
votes
3answers
2k views

How to delete a file named “filen/ame” (with slash) on an ext4 filesystem in debugfs?

Playing with e2fsprogs debugfs, by change/accident, a file named filen/ame was created. Obviously the forward slash character / serves as the special separator character in pathnames. Still using ...
16
votes
4answers
19k views

Can I port user permissions across computers for an ext4 external hard drive?

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 ...
21
votes
3answers
55k views

How to fix intermittant “No space left on device” errors during mv when device has plenty of space?

Ubuntu 14.04 on a desktop Source Drive: /dev/sda1: 5TB ext4 single drive volume Target Volume: /dev/mapper/archive-lvarchive: raid6 (mdadm) 18TB volume with lvm partition and ext4 There are ...
11
votes
1answer
10k 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 ...
8
votes
2answers
9k views

recovering ext4 partition after dd'ing over start of HD

I accidentally used dd and wrote over the first 208MB of my external disk. What I wrote over is a partition on its own (Debian nestinstaller) so what I see now is not my old (now damaged) ext4 ...
15
votes
2answers
14k 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 Use% ...
7
votes
1answer
179 views

Why directory with large amounts of entries does not shrink in size after entries are removed?

Close vote notice: While the linked duplicate asks same question, the comments and the only answer do not provide an answer which draws from authoritative source. The answer on my question by Thomas ...
20
votes
5answers
61k views

Cannot remove file: “Structure needs cleaning”

I have an external hard drive which is encrypted via LUKS. It contains an ext4 fs. I just got an error from rsync for a file which is located on this drive: rsync: readlink_stat("/home/some/dir/...
121
votes
10answers
159k 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?
73
votes
7answers
223k 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 ...
32
votes
2answers
30k 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 the ...
7
votes
1answer
5k views

Does umount calls sync to complete any pending writes

We have BBB based custom board with kernel 3.12 running on it. I have doubt regarding umount and & sync. Lets say a script is umounting a partition, Does it require to run sync command before ...
14
votes
2answers
6k views

How can I mount a filesystem, mapping userids?

I can successfully mount an ext4 partition, the problem is that all the files on the partition are owned by the user with userid 1000. On one machine, my userid is 1000, but on another it's 1010. My ...
7
votes
1answer
9k views

How to make an ext4 formatted usb drive with full RW permissions for any linux machine?

I want to format my USB stick to ext4 and just use as I would any other typical non-linux format drive (FAT32, exFAT, NTFS). That is to say, I want to be able to plug the usb stick into any of my ...
7
votes
1answer
4k 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 ...
6
votes
1answer
3k views

Can I find out if a given ext4 block is in the inode table, and if so, can I pick it out of a journal with no header by hand?

So en route from my old laptop to a new one my old laptop's hard drive got some physical damage. badblocks reports 64 bad sectors. I had a two-month-old Ubuntu GNOME setup with a split / and /home ...
5
votes
2answers
2k views

Does “recovering journal” prove an unclean shutdown/unmount?

Can we confirm the log message "recovering journal" from fsck should be interpreted as indicating the filesystem was not cleanly unmounted / shut down the last time? Or, are there other possible ...
2
votes
1answer
1k views

How to read/change SELinux context on mounted ext4 image from non-SELinux system?

I have a Linux system (Arch Linux) without SELinux support. I would not like to configure such support on my system. Now, I have an ext4 volume image which is known to have some SELinux context set on ...
9
votes
3answers
6k 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 ...
6
votes
1answer
375 views

Why does my file have multiple crtime entries?

Using ext4 filesystem I was able to read out the creation time of a file using the approach here. As a result I am indeed provided with a table featuring the crtime (creation time) of the inode(...
2
votes
1answer
185 views

Can ext4 filesystem withstand a bad sector (unreadable)?

If a hdd bad sector happens in the metadata for /home/user/me on an ext4 fs would that mean data loss for all subdirectories? Background: I know that many users are satisfied with the ext4 ...
2
votes
3answers
469 views

Why creating partitions in linux is a good solution for easy recovery?

I have heard if you don't make partitions in linux, it is so hard to recover the data. And if you make few partitions it would be easy to recover the data. for example if you make /par1 /part2 /part3 ...
13
votes
4answers
6k views

Does any file system implement Copy on Write Mechanism for CP

We have seen OS doing Copy on Write optimisation when forking a process. Reason being that most of the times fork is proceeded by exec , so we don't want to incur the cost of page allocations and ...
8
votes
1answer
2k 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 card....
8
votes
2answers
2k views

How to use the new Ext4 Inline Data feature ? (storing data directly in the inode)

If I read the Ext4 documentation correctly, starting from Linux 3.8 it should be possible to store data directly in the inode in the vase of a very small file. I was expecting such a file to have a ...
3
votes
2answers
2k views

Recover formatted ext3 partition

Suppose you have an ext3 partition which was unfortunately formated as ext4 partition (and where now are some but not a lot new files on it). Is there any way to recover (some) files from the old ext3 ...
3
votes
1answer
786 views

linux: touch date precision

On my linux system if I display the current date "t1", touch a file "f" then display the modification time "t2" of that "f" I would expect t1 < t2. But that's not what I always get when I execute ...
2
votes
2answers
5k views

Can't mount EXT4 hard drive after mounting it in windows

I have a 2TB Western external hard disk. Its original filesystem was NTFS but I formatted it to EXT4. I had no problem in Linux; but today after I mounted it using ext2fsd in a windows box, I can't ...
2
votes
1answer
625 views

is there a way to atomically move file and directory from tempfs to ext4 partition on eMMC

We have beaglebone black based custom board with 256MB RAM and 4GB eMMC. Board runs Linux kernel 4.9 we are running into a situation where we create a file in tempfs and then after validation, we ...
2
votes
1answer
86 views

Recover file system after overwriting first sectors

I have accidentally overwritten the first few GB of my external hard drive with dd. Previously the file system had a NTFS file system of about 3TB and at the end an 1 TB ext4 file system containing my ...
2
votes
3answers
20k views

how should I mount my ext4 partition in fstab

so that it appears in Thunar's sidebar under the name 'Schijf-2'? I am running linux mint13 xfce and this has been a headache causer for the last couple of days. the UUID of this partition is: this ...
1
vote
1answer
270 views

slow/frozen ext4 // task sync blocked on big mostly write only server

We have several 90TB servers (Areca RAID-6 partitioned into 10 ext4 partitions) The application is basically a ring buffer; continuously writing data and deleting old data. As such, each partition is ...
20
votes
1answer
38k views

How do I determine the new size for resize2fs?

I want to shrink an ext4 filesystem to make room for a new partition and came across the resize2fs program. The command looks like this: resize2fs -p /dev/mapper/ExistingExt4 $size How should I ...
16
votes
1answer
9k 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 ...
7
votes
2answers
39k 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 ...
21
votes
2answers
81k views

Why ext4 File System is better than NTFS? [closed]

For a presentation, I need to show ext4 File System is better than NTFS. I searched and got nice article on both ext4 and NTFS http://en.wikipedia.org/wiki/Ext4 http://en.wikipedia.org/wiki/NTFS But ...
3
votes
1answer
2k views

How to extract raw ext3 inode data from disk?

On an ext3 (or ext2/4, pick your flavor) filesystem, how would one extract raw byte data that corresponds to a particular inode directly from the hard drive? Is it possible given, say, an inode number ...
22
votes
5answers
41k 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 ...
11
votes
1answer
4k 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?
3
votes
3answers
3k 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 ...
18
votes
2answers
12k views

What does the 'barrier' mount flag mean in Linux?

The manual for the 'barrier' mount option is: barrier=0 / barrier=1 This disables / enables the use of write barriers in the jbd code.barrier=0 disables, barrier=1 enables (default). This ...