[lkml]   [2009]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[testcase] test your fs/storage stack (was Re: [patch] ext2/3: document conditions when reliable operation is possible)

>> So instead of fixing or at least documenting known software deficiency
>> in Linux MD stack, you'll try to surpress that information so that
>> people use more of raid5 setups?
>> Perhaps the better documentation will push them to RAID1, or maybe
>> make them buy an UPS?
> people aren't objecting to better documentation, they are objecting to
> misleading documentation.

Actually Ric is. He's trying hard to make RAID5 look better than it
really is.

> for flash drives the danger is very straightforward (although even then
> you have to note that it depends heavily on the firmware of the device,
> some will loose lots of data, some won't loose any)

I have not seen one that works :-(.

> you are generalizing that since you have lost data on flash drives, all
> flash drives are dangerous.

Do the flash manufacturers claim they do not cause collateral damage
during powerfail? If not, they probably are dangerous.

Anyway, you wanted a test, and one is attached. It normally takes like
4 unplugs to uncover problems.

> but the super simplified statement you keep trying to make is
> significantly overstating and oversimplifying the problem.

Offer better docs? You are right that it does not lose whole stripe,
it merely loses random block on same stripe, but result for journaling
filesystem is similar.

(cesky, pictures)
# Copyright 2008 Pavel Machek <>, GPLv2
# vfat is broken with filesize=0

if [ .$MOUNTOPTS = . ]; then
# ext3 is needed, or you need to disable caches using hdparm.
# odirsync is needed, else modify fstest.worker to fsync the directory.
MOUNTOPTS="-o dirsync"
if [ .$BDEV = . ]; then
# BDEV=/dev/sdb3

export FILESIZE=4000
export NUMFILES=4000

waitforcard() {
umount /mnt
echo Waiting for card:
while ! mount $BDEV $MOUNTOPTS /mnt 2> /dev/null; do
echo -n .
sleep 1
# hdparm -W0 $BDEV

mkdir delme.fstest
cd delme.fstest

rm tmp.* final.* /mnt/tmp.* /mnt/final.*

while true; do
echo Testing: fsck....
umount /mnt
fsck -fy $BDEV
echo Testing....
for A in final.*; do
echo -n $A " "
cmp $A /mnt/$A || exit
# Copyright 2008 Pavel Machek <>, GPLv2

echo "Writing test files: "
for A in `seq $NUMFILES`; do
echo -n $A " "
rm final.$A
cat /dev/urandom | head -c $FILESIZE > tmp.$A
dd conv=fsync if=tmp.$A of=/mnt/final.$A 2> /dev/zero || exit
# cat /mnt/final.$A > /dev/null || exit
# sync should not be needed, as dd asks for fsync
# sync
mv tmp.$A final.$A
 \ /
  Last update: 2009-08-29 12:33    [W:0.244 / U:4.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site