UIT
Trade/Press College/University Review-Copies Contact-Us News FAQ Jobs About

badblocks and mkfs - how long does it take to run them?

badblocks and mkfs

We recently suspected problems on a couple of disks. We suspect that Ubuntu Linux, at least 9.04, has problems with ext4 on LVM on RAID5, because we have had several massive corruptions of the root filesystem; we converted back to ext3, and in about 8 months have had no further problems. So when new problems arose, we decided to change our removable backup USB disk to ext3 too.

Running mkfs.ext3 on a 1 Tb disk:

  • Overall elapsed time: 72 hours 45 minutes.

Most of this time was consumed by the badblocks program spawned by mkfs. As we ran it, badblocks ran four tests, one for each of its four test patterns. For each pattern:

  • Time to write pattern to disk (e.g. "Testing with pattern 0xaa"): approx. 10 hours.
  • Time to read ane compare pattern just written: approx. 8 hours
  • Giving a total time per pattern of 18 hours, or 72 hours for all four patterns.

The full output of the run is shown below.

mkfs.ext3

The following is for mkfs.ext3 on a 1 Tb partition on a single disk connected via USB:

  • Total time: approx. 7 minutes, of which ...
  • Time to write block groups: approx. 40 sec/1000, for 7813 groups: 5 minutes 12 seconds.
  • Time for "Writing superblocks and filesystem accounting information": approx 1 minute.

The full output of the run is shown below.

For a 2 Tb partition, single disk, again connected via USB:

  • Total time: approx 20.5 minutes.

rsnapshot

alice# time /usr/bin/rsnapshot -c /etc/rsnapshot-usb.conf hourly
real	285m22.253s
user	53m50.620s
sys	42m41.810s

alice# df -h /usbdisk/rsnapshots
Filesystem            Size  Used Avail Use% Mounted on
/dev/sde1             1.8T  423G  1.3T  25% /usbdisk

Outputs from the programs

alice# time mkfs.ext3 -c -c -v /dev/sde1
mke2fs 1.41.9 (22-Aug-2009)
fs_types for mke2fs.conf resolution: 'ext3', 'default'
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
61054976 inodes, 244190000 blocks
12209500 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
7453 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848

Running command: badblocks -b 4096 -X -s -w /dev/sde1 244189999
Testing with pattern 0xaa: done                                
Reading and comparing: done                                
Testing with pattern 0x55: done                                
Reading and comparing: done                                
Testing with pattern 0xff: done                                
Reading and comparing: done                                
Testing with pattern 0x00: done                                
Reading and comparing: done                                
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

real    4245m41.480s
user    136m9.730s
sys     18m2.820s
alice# 
alice# time mkfs.ext3 -v /dev/mapper/VolGroup00-LogVol00
mke2fs 1.41.9 (22-Aug-2009)
fs_types for mke2fs.conf resolution: 'ext3', 'default'
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
64004096 inodes, 256000000 blocks
12800000 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
7813 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

real    6m56.638s
user    0m0.300s
sys     0m29.410s
alice#
alice# time mkfs.ext3 /dev/sde1
mke2fs 1.41.11 (14-Mar-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
122101760 inodes, 488378000 blocks
24418900 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
14905 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

real    20m35.413s
user    0m0.500s
sys     0m34.810s
alice# 
Print - Search - Page last modified on October 21, 2011, at 23:20