blob: a3b755e2ca5d68ad2b95e4927f11e39354778e37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
dev=$1
cnt=$2
size=$3
chunk=$4
mkfs -j $dev > /dev/null 2>&1 && fsck -fn $dev >&2
dsize=$[size/chunk]
dsize=$[dsize*chunk]
rasize=$[dsize*1024*cnt]
if [ $rasize -ne `/sbin/blockdev --getsize64 $dev` ]
then
echo "ERROR: size is wrong for $dev: $cnt * $size (chunk=$chunk) = $rasize, not `/sbin/blockdev --getsize64 $dev`"
exit 1;
fi
|