You are not logged in.
Pages: 1
When experimenting with Moblin, I noticed that it was able to format a 160 GB ext3 partition in a few seconds. Anyone know what options it uses to do this? Formats of such large partitions usually take several minutes for me.
Offline
Probably has different default settings. I'm guessing it creates less inodes, that's usually the lengthier operation with bigger disks. Inodes get created on a per amount of bytes basis. I believe it defaults to an inode for every 16KB.
If Moblin knows a filesystem is going to hold files that are on average bigger than that it makes sense to increase the inode-ratio (inodes per bytes), which will lower the number inodes that need to be created.
Unused inodes waste space, and could potentially waste system memory as well. So it's plausible they took that into account when setting their filesystem defaults.
If you know you are going to use a disk for files with an average size of at least 1MB, you can try adding " -i 1048576 " to your mke2fs command. Or use one of the preset types, such as "largefile" or "largefile4" (4MB ratio).
I have a 3TB RAID5 array formatted with ext4 on which I store music and video files, all pretty big files. So I used the preset "largefile4" on it, which specifies an inode-ratio of 4194304 bytes.
I also did some more tweaking on it to decrease journalsize, since I don't need much of it (big files, so little metadata), and reduced reserved space for root with the -m parameter.
But to set basic largefile4, all you need to do is:
mkfs.ext3 -T largefile4 /dev/sdb
Notice it formats way faster than without the largefile4 setting.
You can check out mke2fs settings at /etc/mke2fs.conf. Probably also there on Moblin. Wonder what it's settings are.
Last edited by Ultraman (2010-04-11 18:55:47)
Offline
Thanks, that worked perfectly!
Edit: Whoops no it didn't, it caused me to run out of space on my drive. Blargh.
Edit again: N/M it was my /boot partition, which I accidentally used largfile4 on. Duh.
Last edited by Gullible Jones (2010-04-12 02:17:32)
Offline
Update: well that helped, but it wasn't the whole story. Sidux also formats fast, even using "normal" settings. Here's its mke2fs.conf:
[defaults]
base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
blocksize = 4096
inode_size = 256
inode_ratio = 16384
[fs_types]
ext3 = {
features = has_journal
}
ext4 = {
features = has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
inode_size = 256
}
ext4dev = {
features = has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
inode_size = 256
options = test_fs=1
}
small = {
blocksize = 1024
inode_size = 128
inode_ratio = 4096
}
floppy = {
blocksize = 1024
inode_size = 128
inode_ratio = 8192
}
news = {
inode_ratio = 4096
}
largefile = {
inode_ratio = 1048576
blocksize = -1
}
largefile4 = {
inode_ratio = 4194304
blocksize = -1
}
hurd = {
blocksize = 4096
inode_size = 128
}
Offline
Pages: 1