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
0
votes
2answers
48 views

Which Linux partition type to chose for external USB HDD with EXT3 or EXT4?

I want to change a partition to Ext3 or Ext4 and used fdisk to print the availlable partition types: 19 Linux swap 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F 20 Linux filesystem ...
1
vote
0answers
34 views

Why is one directory's file larger than 4kB? [duplicate]

I have a directory on my EXT4 filesystem that's showing up as larger than the usual 4kB: $ ls -l total 24 drwxrwxr-x 2 jvilla jvilla 4096 May 24 17:57 'Season 1' drwxrwxr-x 2 jvilla jvilla 12288 Sep ...
-3
votes
0answers
17 views

Can PLP(Power Loss Protection) on a SSD protect filesystems completely from being corrupted due to power loss? [closed]

Can PLP(Power Loss Protection) like above figure on a SSD protect filesystems completely from being corrupted due to power loss?
0
votes
1answer
27 views

“Resize2FS” compact data blocks before resize

We suppose to have a partition of 100Gb filled up by 75Gb of data. We want to reduce it by 20Gb. Does resize2fs move the 75Gb of data to the remaining 80Gb, and then resize the partition? In other ...
0
votes
0answers
19 views

How to prevent users to delete files but allow to create subdirectories?

I want to implement the following fs access model to the directory: user can read and execute "admin" files only, create and remove only own directories. So if user wants to share data with others ...
0
votes
0answers
9 views

How do I mount an overlay with dmsetup?

Simple question but I couldn’t find the answer : I’ve an ext4 filesystem stored inside a squashfs volume (so read‑only) and an existing dm_snapshot_cow file for providing write access. What’s the ...
0
votes
0answers
12 views

If I put debian10 on a micro-sd card that is FAT formatted, using Etcher, will the OS on the sd boot?

If I put debian10 on a micro-sd card that is FAT formatted, using Etcher, will the Debian OS on the sd boot from my NON-windows computer? I read in one of the unix links that it didn't matter what ...
0
votes
1answer
15 views

How/why did fstrim trim more space than I have free?

How/why did fstrim trim more space than I have free? $ df -h / Filesystem Size Used Avail Use% Mounted on /dev/mapper/drystone_2019-debian 93G 84G 4.6G 95% / $ sudo ...
2
votes
0answers
21 views

Why doesn't disk io occur to read file system metadata despite clearing dentry and inode with drop_cache command?

As the title says, I am confused about "echo # > /proc/sys/vm/drop_caches" and blockdev --flushbufs. http://pages.cs.wisc.edu/~remzi/OSTEP/file-implementation.pdf According to OSSTEP, If the ...
1
vote
1answer
27 views

Recover data from truncated partition image

I'm trying to recover data from damaged 3TB drive. I'm using ddrescue to make an image of it, but it takes forever while there are lots of read errors. I was wondering if I can have some luck with ...
0
votes
0answers
14 views

New system.img created after unpacking and packing won't boot

So I am trying to replace some small text files and add some apks into the system files of android. I am working on an emulator for api levle 25 x86 and no gplay. The system.img file is of around 2.5 ...
0
votes
1answer
38 views

error: ext4_allocate_best_fit_partial: failed to allocate 3967 blocks, out of space?

I am trying to build system.img from a folder which contains system files(extracted from system.img) the system.img is for Api level 25 on emulator( Android SDK) I am trying to run this command ...
0
votes
1answer
32 views

Luks and encryption key

I want to check how safe is this solution, I can't find on the web what I have and the differences in scenarios I found make me uneasy especially we are talking about security. What I have is one ...
0
votes
1answer
97 views

mkfs.ext4 not working on 19.1TB logical volume

I can not figure out why its not allowing me to put a filesystem on this logical volume, does anyone have a solution or troubleshoot for this? root@Home-Pi:~# vgs VG #PV #LV #SN Attr ...
0
votes
0answers
36 views

How did my usb change from ext4 to FAT format without me changing it?

I formatted a brand new sandisk usb to ext4 in ubuntu 18.04.2. I have been alternating its use between ubuntu 18.04.3, 64-bit, and debian 10 / armbian, 32-bit. I have been adding files to it until ...
-2
votes
1answer
39 views

What is the difference between “dentry” and “inode table” in Linux FS? [duplicate]

Are dentries and inode table same thing? If not what is the purpose of each and where are they stored? How does the filesystem exactly work specifically "ext4" or "xfs"?
-2
votes
1answer
75 views

Is there any benefit to using ext4 instead of NTFS? [closed]

Trying to copy an 8GB, encrypted image of one of my flash drives (gotten from "dd" command) onto a flash drive, but flash is FAT formatted. So I'll need to format a new flash to transfer it over to. ...
1
vote
0answers
24 views

Can you set a file's ctime to min(ctime, mtime) [duplicate]

We know that the mtime of a file can be earlier than the ctime when you make copies of files (or, in my case, move files between file systems without successfully retaining timestamps). I see many ...
1
vote
1answer
49 views

Wrong EXT4 Partition size in luks encrypted partition

I have encrypted my home partition via cryptsetup. Inside the mapper /dev/mapper, i have created a ext4 fs via mkfs.ext4 /dev/mapper/home Now, my home partiotion only has 91 GB. My luks partition ...
-2
votes
2answers
157 views

ext4 for external hard drive?

If an external hard drive has been formatted from a certain linux-pc with ext4 file system could it be open on other, different linux-pc or it can be open just on the pc on which it was been formatted?...
0
votes
0answers
34 views

CONFIG_EXT4_ENCRYPTION change in .config not persisting after building the kernel

I'm trying to enable encryption config in the kernel for Nvidia Jetson Nano(Tegra), by using menuconfig and rebuilding the kernel. But the specific change is not persisting and is overridden each time ...
3
votes
0answers
97 views

Filesystem got corrupted overnight

OS: xUbuntu 18.04 LTS. I have my OS installed on 256GB SSD: /boot on ext2 / on ext4 (encrypted) That works fine. I have installed the second 1TB HDD recently for storage and backup. Model: WDC ...
2
votes
2answers
75 views

Change filesystem without losing data

I've got 16 nodes of elasticsearch (RHEL 7) - 18TB each, every node has a ext4 filesystem. For better efficency I need to change to XFS filesystem. Is there any tool / way which help me change ...
0
votes
1answer
19 views

Ext filesystem: what happens if a journal is replayed after a crash

I read some things about the ext filesystem journaling, including the man pages, but still do not fully grasp the mechanism. What exactly happens with data and metadata when replaying a journal with ...
1
vote
1answer
21 views

Shutting off power with a non-system r/w ext4 volume mounted

I'm running Raspbian off a read-only ext4 volume. I also have a read/write usb flash volume (ext4, sync) mounted via fstab that runs a simple application that is expected to write occasionally. While ...
0
votes
0answers
25 views

A question on page-management by the virtual file system?

I am trying to get a fairly low level understanding of what happens when a file is opened or changed in linux. Obviously only some of the pages of the entire file, ( i.e. after the blocks on the ...
1
vote
0answers
50 views

directory size inconsistent between “du *” and “du file” [duplicate]

Can someone help me understanding this ? # du -hs * 3,8M depmodwrapper-cross 712M linux-karo 211M u-boot-karo # du --apparent-size -hs * 3,6M depmodwrapper-cross 672M linux-karo 176M ...
46
votes
2answers
7k views

What happens if the limit of 4 billion files was exceeded in an ext4 partition?

What happens if the limit of 4 billion files was exceeded in an ext4 partition, with a transfer of 5 billion files for example?
2
votes
2answers
102 views

Is it safe to resize partition in ext4?

I would like to reduce the size of an ext4 partition from my disk and I would like to know if it is possible that my files become corrupted during the operation ? I learn that ext4 file system use ...
1
vote
1answer
67 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 ...
5
votes
1answer
77 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 ...
0
votes
1answer
82 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
65 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 ...
0
votes
1answer
50 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
105 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 ...
0
votes
1answer
108 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
116 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 ...
0
votes
2answers
147 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 ...
0
votes
1answer
64 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
0answers
26 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
908 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
29 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 ...
0
votes
1answer
65 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 ...
5
votes
1answer
982 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
76 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 ...
1
vote
2answers
86 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
90 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 ...
0
votes
2answers
1k 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
764 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 ...
-2
votes
2answers
382 views

How can I make `fsck` actually check the healthiness of my disk, partitions, filesystems, and LVs?

I want to check the healthiness of my disk, partitions, filesystems, and LVs. So I run fsck. I heard to use fsck on a filesystem, I need to boot into a live Lubuntu from a bootable flash drive and ...