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]

2
votes
1answer
1k 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 e4defrag)...
9
votes
4answers
1k 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 ...
77
votes
5answers
36k 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 ...
3
votes
1answer
196 views

How does Linux make sure to reclaim useless “buffers”, from caching the ext4 journal writes, before anything else (e.g. before swapping at all)

My laptop tends to run with about 256MB counted as "Buffers" - in /proc/meminfo and free -w -h - out of about 8GB of RAM. I'm interested in memory usage. I sometimes get into trouble using too much. ...
0
votes
1answer
2k views

SSD partition aligned

I need to prepare the file system of an SSD disk in a way that a Database Administrator pointed me to, which would be a way optimized SSD to work. I have a disk: SSD: Samsung 500 GB SATA III 6Gb/s - ...
1
vote
1answer
26 views

Copying ext4 encrypted files

I'm using ext4 encryption. https://wiki.archlinux.org/index.php/Ext4#Using_file-based_encryption Before I decrypt a directory, I can see lots of encrypted filenames in it. I would like to copy the ...
2
votes
3answers
2k views

Share an ext4 filesystem between two RHEL servers, but only one will mount at a time

I have two RHEL 6 servers which share a physical connection to a SAN storage (i.e., so both servers can see this /dev/sdb when running fdisk -l). My goal is not to have both servers access the ext4 ...
3
votes
3answers
11k views

Convert boot filesystem from xfs to ext4

I was wondering if it is possible to convert my boot system from xfs to ext4. If it is possible, how do I do so?
0
votes
1answer
2k views

Problem in Videos playing

I am using Dell Inspiron 3542, when I tried to play videos, it is showing: mpeg-4 AAC decoder not installed. What is the solution? Using PHP 7 on CentOS 64bit.
5
votes
1answer
66 views

Renaming a file while it is being written

I'm wondering if this is considered safe. I know the file handles work just fine as long as a link remains, and I know the identifier is the inode rather than the name, but I am not sure how it works ...
-1
votes
0answers
19 views

Ext4 error when deleting files in a folder

I am using a BeagleBone board with Linux. In a script I use the following command in order to completely remove the content from a mounted encrypted partition called /app rm -rf /app/* I receive ...
10
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 ...
0
votes
1answer
40 views

why do some directories have .uuid directory in a directory?

I have seen this quite a few times. In some random directories there is usually a .uuid file or directory therein. The directories are nothing special so as to speak. They are mostly random media ...
0
votes
0answers
14 views

journal_async_commit is not compatible with older kernels. What would you see in this case?

man ext4 mentions a mount option called journal_async_commit. Commit block can be written to disk without waiting for descriptor blocks. If enabled older kernels cannot mount the device. This ...
17
votes
2answers
11k 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 ...
0
votes
1answer
43 views

move system partitions to different physical drive with different filesystem

My RHEL7 system is configured like this: Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 50G 18G 33G 36% / /dev/mapper/rhel-home 504G 147G 357G 30% /home /...
1
vote
0answers
30 views

find extents of each file recursively in a ext4 image file [closed]

I want to log the extents of each file recursively present in a ext4 image file. the physical location of files in ext4 image Any tool i can use for this? or any script? debugfs gives each file ...
1
vote
0answers
61 views

All ext4 files got deleted and the journal can't be found! Is there any way to recover it?

All of the files on my usb stick were deleted by accident (rm -r) but I'm having trouble recovering. When I try to run ext4magic it says "filesystem has no journal" and it mounts as ext2 only. I ...
1
vote
2answers
4k views

File type inode/x-corrupted

My system had an unexpected shutdown. Now when I open the file from pcmanfm or nautilus I get file corrupted error. Strangely the files are accessible just fine if I launch pcmanfmas root user. The ...
0
votes
1answer
929 views

Ext4 Error and disk remounted read-only

Sometimes I have an error ext4 and my disk becomes read-only. I can fix it with a reboot and fcsk /dev/sda2 but it keeps coming back... Here are some dmesg : [ 3160.692730] perf: interrupt took too ...
0
votes
1answer
60 views

If a directory is put in lost+found after running fsck, will it contain all of the original contents?

Let's say I have the following directory structure, in an ext4 filesystem: a/b/{1..9} (in other words, a/b/1, a/b/2, ... a/b/9) Suppose I am writing to a/b, and then I lose power. fsck runs and ...
1
vote
1answer
54 views

Getting sector number from inode or address_space mapping

In am trying to understand how to calculate a sector number from an inode in the ext4 filesystem. Therefore, I am reading ext4_mpage_readpages function. About the function: During a read request, if ...
4
votes
4answers
3k views

any large inode size benefits? (ext4)

From some foggy memories I thought I would "improve" the default settings when creating a Linux partition and increased the inode size to 1024, and also turned on -O bigalloc ("This ext4 feature ...
0
votes
2answers
50 views

Setting noatime via mount options vs no atime updates (A) file attribute

From man chattr When a file with the 'A' attribute set is accessed, its atime record is not modified. This avoids a certain amount of disk I/O for laptop systems. However when I am remounting ...
21
votes
3answers
54k 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 ...
0
votes
2answers
523 views

Recover specific files from deleted EXT4 partition

Is there any way to recover a few specific files from a deleted EXT4 partition. I deleted all partitions on my 480GB SSD. Afterwards, I created a 200 GB NTFS partition (which is mostly empty) and I ...
4
votes
1answer
956 views

Deleting old files is slow and 'kills' IO performance

I'm using find to prune old files, lots of them.. this takes minutes / hours to run and other server processes encounter IO performance issues. find -mtime +100 -delete -print I tried ionice but it ...
2
votes
2answers
1k views

How to erase gpt partition table and how to make old partition forget mount information

We have Beaglbone black based custom board with 256MB RAM and 4GB eMMC. We have script to flash software on the board. Script erases gpt partition table using following commands #Delete primary gpt (...
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 ...
0
votes
1answer
30 views

Ext4 - Last write time

I'm currently looking at an issue with data loss and was using the tune2fs utility, and I was wondering what 'Last write time:' refers to. The volume is written to constantly and backups confirm that ...
1
vote
3answers
961 views

Why does find -inum iterate through the whole filesystem tree?

It surprises me to see find iterate/walk through the complete filesystem when I do a simple find -inum 12345 Without background info it seems to me that there should be much easier ways for to tell ...
0
votes
1answer
359 views

df from busybox shows different number of inodes than that of tune2fs

we have Beaglebone black based custom board, we have busybox shell including coreutils. busybox version is BusyBox v1.20.2 (2017-10-16 16:39:36 EDT) now we wanted to check the inode usage in each ...
2
votes
5answers
5k views

Why can't I delete my files?

I copied some files from a data DVD to /home/emma (ext4), and all of the files are read only. This is what all of the files are like: emma@emma-W54-55SU1-SUW:~$ stat cd/Drivers/Drivers_List.rtf ...
1
vote
0answers
25 views

Automatically eject HDD on lock screen [duplicate]

I have an external HDD (/dev/sdc) with only one partition (ext4). This particularly hard drive stay connected in my computer all the time, but I don't want to remove it manually. I need a way to ...
0
votes
2answers
200 views

mount ext4 disk: cannot mount /dev/sdc read-only

I have an SSD disk with an ext4 filesystem on it: $ lsblk -f /dev/sdc NAME FSTYPE LABEL UUID MOUNTPOINT sdc ext4 142b28fd-c886-4182-892d-67fdc34b522a I am ...
2
votes
0answers
24 views

Are released blocks logged in the journal for ext4?

Suppose we have a simple case: ext4 file system with journaling a single file named file, which has no other hard links the inode for file has associated with it only 1 data block My understanding ...
1
vote
1answer
919 views

How to put syslinux on an sd card

I would like to know how to put syslinux on my sd card and I have tried using extlinux. However, I keep getting the message Missing Operating System. Please help me.
6
votes
2answers
12k 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 ...
1
vote
1answer
1k views

Disable and enable ext4 journaling ?

If I disable the journaling function of an EXT4-filesystem using the command tune2fs -O ^has_journal /dev/sda and enable it after the next start, will the data saved on the harddisk remain unaffected ...
1
vote
1answer
495 views

Content Explanation Of: /proc/fs/ext4/device_name/mb_groups

I've been wondering, what are the explanation of the columns in the /proc/fs/ext4/device_name/mb_groups file. The columns are: #group: free frags first [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 ...
0
votes
1answer
37 views

EXT4 CRC32C checksum algorithms are badly documented

So I'm making some kind of research on EXT4 checksums. I found this page and tried to calculate checksum by myself. I've started with Superblock since it is sounds pretty simple: "The entire ...
2
votes
1answer
160 views

How to defragment files in size less than 100MB only in ext4 filesystem

I have a very basic idea: I would like to defragment files in size less than 100MB only in ext4 filesystem. Since there is no option for that in the defragmentation tool (e4defrag), any ideas how I ...
4
votes
1answer
300 views

Should I answer yes to “Clone multiply-claimed blocks<y>?” when running e2fsck?

When running e2fsck -cck /dev/mapper/xxx I am prompted with has 487 multiply-claimed block(s), shared with 84 file(s): ... (inode #221446306, mod time Tue Feb 20 19:48:38 2018) ... (...
0
votes
0answers
48 views

How are ext4fs checksums being calculated?

I've been studying ext4 file system contents and stumbled upon this paragraph: https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Checksums It says how blocks of data for different structures ...
0
votes
0answers
49 views

Recover accidentally deleted custom files

I accidentally deleted important custom (not known-or-commercial) files from my scientific researches on image processing. I created the files by collecting raw digital signals from an image sensor. ...
1
vote
2answers
59 views

Error when move or delete file on ext4 in dpkg info directory

There is a troublemaking empty file (md5sums of kernel 4.19.1) left on my ubuntu system, with has strange owner/group/date/attributes How to fix or workaround this defect file? $ uname -a Linux ...
-4
votes
2answers
81 views

Windows removed files copied from Linux and ext4 filesystem

I have an external hard drive with a ntfs filesystem. I have used it to backup the files under my /home (an ext4 filesystem). I choose NTFS only because it is said to be portable between Windows and ...
-1
votes
2answers
295 views

How can an image file be created for a directory?

How can an image file be created for a directory? For example: https://unix.stackexchange.com/a/90794/674 shows that genisoimage can create an iso image file for a directory. I only know that an ...
6
votes
2answers
672 views

Why is the size of a directory either 0 or 4096? [duplicate]

$ ls -l total 28 drwxrwxrwx 1 t t 4096 May 8 2018 dir1 drwxrwxrwx 1 t t 0 Mar 12 2015 dir2 drwxrwxrwx 1 t t 4096 Jan 17 2014 dir3 drwxrwxrwx 1 t t 4096 Jun 12 2017 dir4 drwxrwxrwx 1 t t ...
1
vote
1answer
42 views

How can I find out the used size of an umounted filesystem?

Is there a way to find out the used size of an umounted filesystem? I want to resize the ext4 / filesystem, so I boot into a live Lubuntu using a Lubuntu bootable flash drive. Since the / filesystem ...