[2.6.12.2] unexpected block device behaviour ...
Hi Folks! Andrew!
accidentially stumbled over the following issue:
creating a filesystem (in userspace) requires a period of quiescence after that (about 5 seconds) until you can reliably mount the new filesystem ...
this can be observed on 2.6.11 as well as 2.6.12.2 (didn't test older kernels yet) on x86_64 (SMP) with loopback or dm (lvm2) based block devices (probably also with other block devices) for different file- systems (ext2,ext3,xfs,jfs,reiserfs) ...
Rik and I agreed that it is at least unexpected behaviour, especially as doing an fsync() on the block device doesn't remedy the deficiency.
so the sequence to 'trigger' this basically is:
mkfs.* $DEV
mount $DEV $MNT
and the mount fails sometimes with:
mount: wrong fs type, bad option, bad superblock on /dev/*,
missing codepage or other error
(but works quite fine if you wait 10 seconds)
here are some scripts (and example output) I used for testing this ...
http://vserver.13thfloor.at/Stuff/x.sh
http://vserver.13thfloor.at/Stuff/x.sh.txt
http://vserver.13thfloor.at/Stuff/x2.sh
http://vserver.13thfloor.at/Stuff/x2.sh.txt
best,
Herbert