Hot answers tagged

103 votes
Accepted

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

By default, ext2 and its successors reserve 5% of the filesystem for use by the root user. This reduces fragmentation, and makes it less likely that the administrator or any root-owned daemons will be ...
harrymc's user avatar
  • 445k
39 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
  • 29.3k
31 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
22 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,014
16 votes
Accepted

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

The standard recommended solution is straight-forward: find . -type d -exec chmod 0755 "{}" \+ find . -type f -exec chmod 0644 "{}" \+ This will append as many filenames as possible as arguments to ...
harrymc's user avatar
  • 445k
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
11 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
  • 9,858
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.2k
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
  • 212
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
6 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
  • 25.5k
6 votes
Accepted

Harddisks aren't recognized in new system (ubuntu 14)

Your disks are fine and are being recognized fine. Your partitions aren't being recognized because the sector sizes are incompatible. The maximum disk size supported by standard 512-byte sectors on ...
qasdfdsaq's user avatar
  • 6,581
6 votes
Accepted

Cannot delete directory on Ubuntu 14.04.3 LTS

To combine both answers: check if the parent directory webapps has the i or a attributes set by lsattr | grep webapps Then, remove them via chattr -i -a webapps
serv-inc's user avatar
  • 508
6 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
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
5 votes
Accepted

partition being mounted as noexec, not fstab, what else can it be?

The default is indeed exec, but using the user option implies the following options: noexec nosuid nodev As explained in man mount: user Allow an ordinary user to mount the filesystem. The ...
nKn's user avatar
  • 5,509
5 votes
Accepted

How to intentionally corrupt an ext4 filesystem?

Do you want to be able to recover? Or how corrupt are we talking? I would use dd, a block transfer utility. dd if=/dev/urandom of=/dev/sdWV count=X bs=Y seek=Z where sdWV is the device you wish to ...
Matt Clark's user avatar
  • 2,019
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,135
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,439
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
5 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
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
4 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 ...
4 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
  • 475
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
  • 29.3k
4 votes

Quickly removing a gigantic directory on Linux on Ext3/4 drive

The ext3/4 directory isn't a hash table per-se. It's actually a hash tree. That is, the filename is hashed, and the hash is used as an index to insert into a b+ tree. The fastest way to delete ...
Theodore Ts'o's user avatar
4 votes

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

if the data you intend to store on it is compressible, btrfs mounted with compress=zstd (or compress-force=zstd) would probbaly use significantly less disk space than ext* this will make btrfs ...
hanshenrik's user avatar
  • 1,007

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