Questions tagged [ext4]

Ext 4 is a linux filesystem.

Ext4 is a filesystem mostly used under linux. Other versions are ext, ext2 and ext3.

See Wikipedia for details on ext and ext4.

316 questions
36
votes
3 answers

Is rename() without fsync() safe?

Is it safe to call rename(tmppath, path) without calling fsync(tmppath_fd) first? I want the path to always point to a complete file. I care mainly about Ext4. Is the rename() promised to be safe in all future Linux kernel versions? A usage example…
Ivo Danihelka
  • 3,382
  • 3
  • 31
  • 27
31
votes
2 answers

Storing & accessing up to 10 million files in Linux

I'm writing an app that needs to store lots of files up to approx 10 million. They are presently named with a UUID and are going to be around 4MB each but always the same size. Reading and writing from/to these files will always be sequential. 2…
hookenz
  • 36,432
  • 45
  • 177
  • 286
29
votes
3 answers

How many bytes per inodes?

I need to create a very high number of files which are not very large (like 4kb,8kb). It's not possible on my computer cause it takes all inodes up to 100% and I cannot create more files : $ df -i /dev/sda5 Filesystem Inodes IUsed …
oyo
  • 1,906
  • 2
  • 16
  • 22
29
votes
1 answer

How to store one billion files on ext4?

I only created about 8 million files, then there was no free inode in /dev/sdb1. [spider@localhost images]$ df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sdb1 8483456 8483456 0 100% /home Someone says…
redice
  • 8,437
  • 9
  • 32
  • 41
22
votes
1 answer

Optimal number of files per directory vs number of directories for EXT4

I have a program that produces large number of small files (say, 10,000 files). After they are created, another script accesses them and processes one by one. Questions: does it matter, in terms of performance, how the files are organized (all in…
Jakub M.
  • 32,471
  • 48
  • 110
  • 179
20
votes
1 answer

What file system does Android use?

Which file system does Android use? I have read both ext4 and YAFFS2.
qyanqing
  • 313
  • 2
  • 5
  • 10
19
votes
4 answers

How to durably rename a file in POSIX?

What's the correct way to durably rename a file in a POSIX file system? Specifically wondering about fsyncs on the directories. (If this depends on the OS/FS, I'm asking about Linux and ext3/ext4). Note: there are other questions on StackOverflow…
Yang
  • 16,037
  • 15
  • 100
  • 142
17
votes
3 answers

Linux AIO: Poor Scaling

I am writing a library that uses the Linux asynchronous I/O system calls, and would like to know why the io_submit function is exhibiting poor scaling on the ext4 file system. If possible, what can I do to get io_submit not to block for large IO…
void-pointer
  • 14,247
  • 11
  • 43
  • 61
16
votes
3 answers

what is the max files per directory in EXT4?

What is the limit of EXT4, what i found is only EXT3, and other links only suppositions and not a real number? Can you please provide me: max number per directory, max size?
Abdelouahab Pp
  • 4,252
  • 11
  • 42
  • 65
15
votes
0 answers

Directories created by boost::filesystem::create_directories() not immediately accessible?

I am using boost::filesystem::create_directories() to create new directories. When I try to access these directories shortly after creation, I get an error saying: no such directory. But if I sleep for a while after creating directories everything…
polapts
  • 5,493
  • 10
  • 37
  • 49
14
votes
2 answers

Can ext4 detect corrupted file contents?

Can the ext4 filesystem detect data corruption of file contents? If yes, is it enabled by default and how can I check for corrupted data? I have read that ext4 maintains checksums for file metadata and its journal, but I was unable to find any…
Lukas Boersma
  • 1,022
  • 8
  • 26
13
votes
1 answer

Changing a partition with fdisk shows a warning like "partition#x contains ext4-signature"

I'm shrinking a partion size with #Reduce Partition Size fsck -f /dev/sdb2 resize2fs /dev/sdb2 -M -p #Limit Partion fdisk /dev/sdb ... #Now I'm changing the Partition 2 to the new (smaller) size fdisk gives me a (red) warning like partition#2…
powerpete
  • 2,663
  • 2
  • 23
  • 49
13
votes
2 answers

ext4/fsync situation unclear in Android (Java)

Tim Bray's article "Saving Data Safely" left me with open questions. Today, it's over a month old and I haven't seen any follow-up on it, so I decided to address the topic here. One point of the article is that FileDescriptor.sync() should be called…
Markus Junginger
  • 6,950
  • 31
  • 52
13
votes
1 answer

What is the maximum number of subdirectories allowed in Ext4?

I am considering moving my ext3 partition to ext4 in order to overcome the 32000 subdirectory limit. I have seen two different numbers thrown around about the limits of ext4, both from reputable sources: Limit of 64,000: ext4.wiki.kernel.org SO…
meawoppl
  • 2,714
  • 1
  • 23
  • 30
13
votes
1 answer

where are extended attributes stored?

This is a simple question but I've done some research and can't find any answers... So does anyone know if when we define extended attributes through xattr, those attributes are stored within - as a part of - the file'contents(in the biggining, in…
user2900870
  • 327
  • 3
  • 8
1
2 3
21 22