Skip to main content
49 votes

How to read ext4 partitions on Windows?

WSL2 on Windows 10 Build 20211 Windows allows now to mount physical disks using the Windows Subsystem for Linux 2 (WSL). However, there is a limitation with this approach as noted in the Microsoft ...
36 votes

Is it safe to use a HDD while rsync is running?

As others have already pointed out, it is safe to read from the source disk, or use the target disk outside out the target directory, while rsync is running. It is also safe to read within the target ...
user's user avatar
  • 30k
33 votes
Accepted

Forcing ext4lazyinit to finish its thing?

In order to 'force' ext4lazyinit to finish the thing it does with maximum priority, you need to mount the filesystem with 'init_itable=0'. By default it is 10 (for detail please see link below) ...
Venca B Spam's user avatar
23 votes

Is it safe to use a HDD while rsync is running?

This depends of the backup system you use, but in general it is a bad idea to modify the contents of a device while you're backing it up. However, you can read its contents; that's a safe operation, ...
dr_'s user avatar
  • 4,516
15 votes

Is it safe to use a HDD while rsync is running?

It is safe to read data from the source areas while rsync is operating, but if you update anything the copy that rsync creates/updates is likely to be inconsistent: If you update a file that rsync ...
David Spillett's user avatar
12 votes

Is it safe to use a HDD while rsync is running?

Source HDD can read anything while rsync. Source HDD can write any content not related to the rsync content. Destination HDD can read anything while rsync. Destination HDD can write anything while ...
Overmind's user avatar
  • 10.1k
11 votes
Accepted

Will long time ext4lazyinit damage the drive? Why initializing inode tables in ext4 (no need any kinda init in NTFS)? etc

Strictly speaking, lazyinit is not necessary so long as we never need to try to do certain extreme file system corruption repairs. The problem is if a pre-existing file system is reformatted using ...
Theodore Ts'o's user avatar
10 votes

Linux ext4 restore file and directory access rights after bad backup/restore

I benchmarked sitaram's answer, Peter Cordes's comment, Fanatique's answer, and harrymc's answer, but this answer has the fastest way. Averages: Deltik's answer* – 7.480 seconds * Credit to Peter ...
Deltik's user avatar
  • 19.7k
9 votes

Parted has no 'resize' command available

Most modern OSes now include the CHUI version of parted 3.2 which has resizepart instead: (parted) resizepart 2 100% You should find it in your package manager.
KolonUK's user avatar
  • 210
9 votes

Convert NTFS partition to ext4 - How to copy the data?

1. FreeFileSync GUI tool (Windows, Mac, Linux) To ensure you don't miss any data, I highly highly recommend using a good file-copy tool like FreeFileSync. It is graphical, no cost, free and open ...
Gabriel Staples's user avatar
8 votes

Do ext4 filesystems need to be defragmented?

Here's an update from 2022 Fragmentation occurs due to multiple reasons: When an OS cannot manage file intelligently There's not enough continuous space to write the file When multiple applications ...
Artem S. Tashkinov's user avatar
7 votes

How to mount ext4 fs with block size of 65536?

AFAIK ext2/3/4 is based on the generic Linux VFS framework which requires block size to be less than or equal to page size You may experience mounting problems if block size is greater than page size ...
phuclv's user avatar
  • 28.2k
7 votes
Accepted

Optimizing file system for lots of small files?

The smaller the block size (1024 bytes, p.e.), the better for efficient disk usage, in case there's a lot of small files on that partition. Try to reformat that partition with the smallest block size: ...
Roberto Paz's user avatar
6 votes

Modify fstab entry so all users can Read and Write to an EXT4 Volume

I want to capture everything about this in a single answer, so here it is: The accepted answer is the correct answer: chmod 777 /media/foo. While it might seem inelegant, because ideally we would ...
John Red's user avatar
  • 183
6 votes
Accepted

Paragon ExtFS can't write files to Ext4 drive from Windows 10

I solved it as follows: I uninstalled all 3rd party software like Ext2Fsd, ext2explore, etc. I cleaned the registry, restarted and paragon extfs is now working. It's copying files to Linux HDD at ...
Zdenek Hampachel's user avatar
6 votes
Accepted

How safe is forward compatibility in EXT4?

There are two separate compatibility checks; one is by the kernel, and the other is by the e2fsprogs utilities. The 3.16 kernel supports Metadata Checksums, so there was no problem mounting it. ...
Theodore Ts'o's user avatar
5 votes

Is there anything faster than `find . | wc -l` to count files in a directory?

I have written ffcnt for exactly that purpose. It retrieves the physical offset of directories themselves with the fiemap ioctl and then scheduling the directory traversal in multiple sequential ...
the8472's user avatar
  • 515
5 votes
Accepted

Linux Ext4 Filesystem Explanation Needed, 19 million One byte files equals 80+GB?

I'm not an expert on ext4 but like most file systems it allocates space for files in blocks. The default block size for ext4 is 4096 bytes, so each of your one byte files actually uses 4096 bytes on ...
greg-449's user avatar
  • 1,155
5 votes

How can I recover/undelete files from an ext4 partition?

What worked for me was given by arch (only applies to text files): grep -a -C 200 -F 'Unique string in text file' /dev/sdXN Takes a little while, but worked when I accidentally deleted some source ...
William Becker's user avatar
5 votes

How to read ext4 partitions on Windows?

Ext2Fsd was common in the past, but it's usually outdated and constantly broken in newer Windows in my experience. You can also see that in many comments. There's a fork of it called Ext4Fsd This is ...
5 votes

How to create a diskimage of an SD card with partitions having different filesystems?

Linux dd. dd if=/dev/sdX# of=/home/duckqueen/Desktop/usbimage.iso
user657451's user avatar
5 votes

Is there a way to make ext-filesystems use less space for themselves in Linux?

Another point which has not been talked about yet is the number of inodes you reserve on your file system. Per default, mkfs creates a number of inodes which should make it possible to put a whole ...
glglgl's user avatar
  • 1,449
5 votes

Getting an “is not a block special device.” error when trying to mount an 8TB disk in CentOS 7.6

My guess is you had created a regular file there somehow (or maybe a symlink to such file). Check it. If it was a block device then in the output of ls -l /dev/sdc1 the first letter would be b; ...
Kamil Maciorowski's user avatar
4 votes

Parted has no 'resize' command available

I managed to perform this using sfdisk and then a filesystem resize. See this for sfdisk usage example.
Valmir Pimenta's user avatar
4 votes

Reverse lookup of inode/file from offset in raw device on linux and ext3/4?

Greg Knox's answer is correct, but could be easier. I've written a shell script, lba2file, which performs all the arithmetic for you, source code below. [Update: Script no longer depends on udisks ...
hackerb9's user avatar
  • 1,037
4 votes

Using MySQL and LxD over Btrfs

Fragmentation is a largely unavoidable side effect of a file system being designed with copy-on-write. It's also what allows the nearly free file system snapshots in the first place. The reason for ...
user's user avatar
  • 30k

Only top scored, non community-wiki answers of a minimum length are eligible