Date: Wed, 10 Jan 2007 12:04:03 +0200 From: Vasil Dimov <vd@FreeBSD.org> To: "R\. B\. Riddick" <arne_woerner@yahoo.com> Cc: freebsd-geom@FreeBSD.org Subject: Re: graid3 device gives "Invalid argument" when requested to read>=128kb Message-ID: <20070110100403.GA85205@qlovarnika.bg.datamax> In-Reply-To: <67643.90686.qm@web30312.mail.mud.yahoo.com> References: <20070110070817.GA33206@freefall.freebsd.org> <67643.90686.qm@web30312.mail.mud.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Wed, Jan 10, 2007 at 00:58:51 -0800, R. B. Riddick wrote:
> --- Vasil Dimov <vd@FreeBSD.org> wrote:
> > On Sat, Dec 30, 2006 at 04:39:39AM -0800, R. B. Riddick wrote:
> > > neo# gnop create -S 16384 md0
> > > neo# dd if=/dev/md0.nop of=/dev/null
> > > dd: /dev/md0.nop: Invalid argument
> > > 0+0 records in
> > > 0+0 records out
> > > 0 bytes transferred in 0.000155 secs (0 bytes/sec)
> >
> > This is because default dd's read block size is 512b
> >
> Yup... Its the default...
>
> > > Just UFS seems to have a problem:
> > >
> > > neo# newfs /dev/md0.nop
> > > /dev/md0.nop: 16.0MB (32768 sectors) block size 16384, fragment size 16384
> > > using 4 cylinder groups of 4.02MB, 257 blks, 128 inodes.
> > > newfs: can't read old UFS1 superblock: read error from block device:
> > > Invalid argument
> >
> > Look at newfs's -S switch, this is the same issue as with dd above.
> >
> I tried, but no success... newfs should be able to find out the sector size...
> But -S does not help, too... Tried it urself?
# mdconfig -a -t malloc -s 32m -S 16384 -o reserve
md0
# dd if=/dev/md0 of=/dev/null
dd: /dev/md0: Invalid argument
0+0 records in
0+0 records out
0 bytes transferred in 0.000080 secs (0 bytes/sec)
# dd if=/dev/md0 of=/dev/null bs=16k
2048+0 records in
2048+0 records out
33554432 bytes transferred in 0.052907 secs (634215478 bytes/sec)
# newfs /dev/md0
/dev/md0: 32.0MB (65536 sectors) block size 16384, fragment size 16384
using 4 cylinder groups of 8.02MB, 513 blks, 192 inodes.
newfs: can't read old UFS1 superblock: read error from block device: Invalid argument
# newfs -S 16384 /dev/md0
/dev/md0: 32.0MB (65536 sectors) block size 16384, fragment size 16384
using 4 cylinder groups of 8.02MB, 513 blks, 192 inodes.
newfs: can't read old UFS1 superblock: read error from block device: Invalid argument
If I use mdconfig -S 8192, newfs succeeds with or without -S 8192:
# newfs /dev/md0
/dev/md0: 32.0MB (65536 sectors) block size 16384, fragment size 8192
using 4 cylinder groups of 8.02MB, 513 blks, 320 inodes.
super-block backups (for fsck -b #) at:
160, 16576, 32992, 49408
just to make it identical with the case when mdconfig -S 16384 is used:
# newfs -f 16384 /dev/md0
/dev/md0: 32.0MB (65536 sectors) block size 16384, fragment size 16384
using 4 cylinder groups of 8.02MB, 513 blks, 192 inodes.
super-block backups (for fsck -b #) at:
160, 16576, 32992, 49408
--
Vasil Dimov
gro.DSBeerF@dv
%
Only a fool has no doubts.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
iD8DBQFFpLoTFw6SP/bBpCARAi0hAKCvROooHqkpVW9XRbcvDuqNEo1SbwCdEbUT
lsSsu7aP2oOGNciD4NrOiXk=
=rB/A
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070110100403.GA85205>
