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]

learn more… | top users | synonyms

6
votes
2answers
13k 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 ...
7
votes
3answers
9k 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 ...
1
vote
0answers
18 views

Can skipping `fsck` on boot impact serial-port communication?

I have a bizarre serial-port (RS-232) communications issue (it appears that some data is being dropped, though I'm not sure if it's outgoing, incoming, or both) that I'm observing sporadically. I've ...
1
vote
0answers
10 views

selinux on squashfs with overlayfs

Is it possible to use SELinux on a system with a squashfs root with an overlayfs overlay for read-write operations? On funtoo (gentoo), I booted with SELinux enabled in permissive mode to see what ...
1
vote
0answers
20 views

what's the best filesystem for small files on mdadm RAID10? [closed]

I need to setup a RAID on my Linux server and I am looking for advise about which filesystem I shall use. These are the type of files I am going to be writing/storing into my system. File size ...
2
votes
1answer
43 views

'cd' complexity on ext4

In order to store attachments, a /path/to/atts/ directory will have numerous child-directories (product IDs) created (from 1 to ~10,000 or maybe more in the future), and in each of this subdir, 1 to ...
3
votes
1answer
32 views

Partition Errors and Remounts Read-Only when Accessing Specific File

I have a pretty basic system running Ubuntu 16.04 (this question is not specific to Ubuntu, but rather ext4 partitions), 1 HDD, running a few partitions: sda1 - EXT4 - 100G - / sda2 - EXT4 - ...
1
vote
0answers
23 views

Reclaiming disk space in Ubuntu

In VMWare the hard disks took 13.6 GB, But with df, only 5.8 GB is occupied I don't quite get it. This Virtual Machine has no snapshots, and I already clicked on refresh button in VMWare Fusion ...
3
votes
1answer
111 views

Recover formated ext4 partition with file structure

I'm trying to recover from an accidental format of ext4 1TB HDD. I tried virtually all linux tools (extundelete, ext3grep, ext4magic, testdisk, photorec, and others). Some that worked: testdisk, ...
5
votes
2answers
794 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 ...
1
vote
1answer
27 views

Is it reasonable to use a journaling FS on a filesystem image that is stored on a filsystem that already provides journaling?

I need a filesystem image to put 150k files there, so they should be easily relocatable, i.e. mounted as a folder, when in use, unmounted and copied somewhere when needed. Due to the large number of ...
1
vote
1answer
512 views

Backup Files on ext4 to external NTFS drive

Would there be any problems in copying files on my Linux system with ext4 filesystem to an external drive that is formatted in NTFS? I'm reinstalling my OS and intend to copy these files back to my ...
3
votes
1answer
29 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 ...
0
votes
0answers
190 views

Recovering accidentally deleted ext4 partition on DM-0 LVM2 volume spanning across physical drives

I have a setup with some LVM volumes, with following configurations. I accidentally formatted the LV "lvmedia" using the disks program in gnome(I know this was extremely stupid and frustrating) I ...
1
vote
2answers
28 views

Recover lost ntfs partition?

I made a live USB of ubuntu to install it on my hp pavilion running win 10. Was planning to do dual boot, but accidentally reformatted my main ntfs partition into an ext4. Is there any way I can ...
1
vote
1answer
45 views

Ext4 corrupted and unrecoverable after LVM resizing + power failure

I have a completely standard, single hard drive Fedora 23 desktop. The dual-boot installer set up the Linux partition as LVM, with root, swap and home logical volumes; root and home were both ext4. ...
1
vote
0answers
29 views

How to move an ext4 journal

I have an ext4 filesystem on an USB stick and after using it for some time I would like to move the journal to some other blocks, so that the stick lives longer. The journal is described by inode 8, ...
2
votes
1answer
59 views

mkfs.ext4 command not found in Debian (Jessie)

I have just installed Debian 8.4 (Jessie, MATE desktop). For some reason the following command is not recognized: mkfs.ext4 -L hdd_misha /dev/sdb1 The error I get: bash: mkfs.ext4: command not ...
0
votes
2answers
187 views

cp: cannot create directory 'ABC.DEF/G/H': Structure needs cleaning

What does it mean "Structure needs cleaning" ? I've never seen such error code before - and man cp is not that helpful. It has happened to me on ext4. I was trying to copy directory using: cp -arv ...
2
votes
1answer
55 views

Why this switch will effectively format disk to ext2 instead of ext4?

I'm new to linux, I'm formatting a disk with following command switches, I can format the disk to ext4. sudo mke2fs -F -E lazy_itable_init=0,lazy_journal_init=0,discard -t ext4 -b 4096 ... However, ...
1
vote
0answers
32 views

External USB drive fsck fails on boot

Yesterday I tried setting the fsck flag on fstab to 2 for the external USB HDD I use in my Raspberry Pi, so that it would be checked on boot, like: proc /proc ...
2
votes
1answer
52 views

Why is EXT4 filesystem mounted with both relatime and lazytime

I'm running Debian/Testing, with kernel 4.4: # uname -a Linux shaula 4.4.0-1-amd64 #1 SMP Debian 4.4.6-1 (2016-03-17) x86_64 GNU/Linux So I want to use the lazytime mount option, which is why I put ...
2
votes
1answer
46 views

Is it safe to mount same ext4 filesystem at different mount points?

I know there is option "--bind" for multiple mount operation to handle such case. But ext4 can be directly mounted at different mount points, without option "--bind". So, I wonder whether it is safe ...
2
votes
2answers
249 views

why Inode file size is different than actual size

I noticed one log file having less size than what's mentioned in inode. $ ls -lhtr /var/log/test/fk-3p-kafka/kafkaServer-gc.log -rw-r--r-- 1 fk-3p-kafka fk-3p 11G Apr 10 18:27 ...
0
votes
0answers
9 views

Why is EXT4 on LUKS on MD-RAID6 not detected by openSUSE's YaST

For maximum control over the storage configuration I've got two MD-RAID6 devices pre-configured as follows from openSUSE's Rescue system before rebooting the computer into openSUSE's installation ...
1
vote
2answers
100 views

Does Debian use GB or GiB for it's partition manager during installation?

I'd like to create a 5GB (1000) as one partition during the install of Debian. However, I'm not sure if if the partition manager uses Gib or GB. The version of Debian to be installed is 8.4 using the ...
11
votes
4answers
9k 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 ...
0
votes
1answer
75 views

Filesystem errors when restoring many files

I had an external hard drive that I mounted internally. It came formatted with NTFS, and I wanted to move to ext4. So I copied everything I wanted to keep onto other drives, created a brand new ...
3
votes
1answer
44 views

Dynamically resizable partition in a file.. possible?

I ran into the ecryptfs bug where files with long filenames don't get written (because of the prefix that ecryptfs adds to the original filenames, thus extending their length). So I was wondering if ...
0
votes
2answers
38 views

Is it safe to shrink beginning of partition?

I have got paritions that look like this: And I would like to shrink /sda2 (home) for 2gb to right to make space to resize sda1 into 12GB. Is it safe to do it with gparted from live cd? Will I not ...
-1
votes
1answer
76 views

Retrieve data from “erased” home partition while installing win7

I had a computer with a windows 7 and I installed lubuntu 14.04 on another partition (I think I shrinked the windows NTFS partition first). I installed lubuntu this way: -> NTFS boot -> NTFS ...
4
votes
4answers
5k 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. ...
3
votes
1answer
12k views

Creating an ext4 partition fails with “invalid blocks count”

Environment: - Virtual machine on VMWare ESX 4.0 - OS: fully up to date RHEL 5.8 After adding a new (virtual) disk I want to create an ext4 partition on LVM on this disk. Steps taken so far: $ sudo ...
0
votes
1answer
56 views

Recurring ext4 “bad header invalid magic” errors on a healty drive

I'm getting frequent and recurring ext4 "bad header invalid magic" errors on an apparently healthy, brand new (few months old) external USB drive (WD MyBook 1230) connected to a Raspberry Pi running ...
0
votes
2answers
73 views

Boot delay errors?

I continuously get these messages upon boot: [ 17.806441] EXT4-fs (sda1): re-mounted. Opts: (null) [ 157.196550] postgres (1297): /proc/1297/oom_adj is deprecated, please use ...
1
vote
1answer
31 views

How to mount HDD extracted from singledrive-ZyXEL NAS

Gparted Information and Warning: <i>Filesystem volume name: <none> Last mounted on: /i-data/f128dac5 Filesystem UUID: c2f55399-a8ab-400b-a144-d605ceb58c9d Filesystem ...
28
votes
4answers
81k 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 ...
1
vote
1answer
41 views

Recover files inside a folder which was replaced by an empty one. (openSUSE, Ext4)

Is there a way to restore a folder or better the containing files and folders of the folder which was replaced by a empty one with the same name? FileSystem: Ext4 OS: openSUSE 42.1 If it is ...
0
votes
2answers
32 views

rsync to USB flash drive always transferring all data

When rsyncing a directory to a freshly plugged-in external USB flash drive, via rsync -av /source/ /dest/ all files get transferred (i.e. rewritten) despite no changes in the files. Note that ...
17
votes
3answers
21k 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 > ...
2
votes
2answers
123 views

Why debugfs doesn't show crtime in nanoseconds?

I am using: debugfs -R 'stat <7473635>' /dev/sda7 to get the file creation time (crtime). Inode: 7473635 Type: regular Mode: 0664 Flags: 0x80000 Generation: 1874934325 Version: ...
1
vote
1answer
319 views

find the cause of file corruption when copying files to a network share on an Ubuntu machine

I am copying files from my SD card to my Ubuntu server via Windows 7 using a network drive. The problem is that sometimes, 2 files out of 150, are corrupted during transfer. See here 2 example files ...
6
votes
1answer
1k 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 ...
11
votes
1answer
12k 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 ...
3
votes
3answers
66 views

“write-once archive”: ext2 vs ext4^has_journal vs

summary Suppose one is setting up an external drive to be a "write-once archive": one intends to reformat it, copy some files that will (hopefully) never be updated, then set it aside until I need to ...
65
votes
8answers
66k 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?
1
vote
1answer
39 views

Is it safe to reencrypt unencrypted mdadm array with LUKS?

I would like to convert my raid6 mdadm into encrypted LUKS. Right now raid6 consists of "/dev/sdX1" which are raid partitions. /dev/md0 doesn't have a partition - it is pure ext4 FS. Is it safe to ...
2
votes
2answers
1k views

ext4 corruption found in superblock, but filesystem can be mounted

After a crash, I've got an Ext4 filesystem (on an LVM LV) that gives the following error when running fsck.ext4 -nf: e2fsck 1.42.12 (29-Aug-2014) Corruption found in superblock. (blocks_count = 0). ...
4
votes
1answer
427 views

Formatting an sdcard with mkfs hangs indefinitely

I am trying to format an sdcard following this guide. I am able to successfully create the partition table, but attempting to format the Linux partition with mkfs yields the following output: mke2fs ...
3
votes
1answer
45 views

If I grow an ext4 partition, will it increase the number of inodes available?

If I create a small filesystem, and grow it when I need to, will the number of inodes increase proportionally? I want to use Docker with the overlay storage driver. This can be very inode hungry ...