linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mounting loop-device on a 2048 byte/sector medium fails
@ 2002-04-22 19:03 Peter Niemayer
  2002-04-23 22:21 ` Bill Davidsen
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Niemayer @ 2002-04-22 19:03 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel, jari.ruusu

Hi,

first I thought this was some loop-AES specific issue, but now I know
it isn't: When I try to mount a filesystem on a loop device which
is in turn using a 2048 byte/sector medium (a magneto-optical drive
in my case), the mount fails though mkfs & fsck are happy.

The following script (tests done with kernel 2.4.18):

----------------------------------------------------------------------
#!/bin/sh

echo -n "blockdev /dev/sdb result: "
blockdev --getbsz /dev/sdb

losetup /dev/loop0 /dev/sdb

echo
echo -n "blockdev /dev/loop0 result: "
blockdev --getbsz /dev/loop0

echo
echo "mkfs output:"
mkfs -t ext2 /dev/loop0

echo
echo "fsck output:"
fsck.ext2 -f /dev/loop0

echo
echo "mount output:"

mount -t ext2 /dev/loop0 /mnt/floppy
------------------------------------------------------------------------

works just fine when the medium inserted into the MO-drive is a 512 byte/sector
medium, but when I put a 2048 byte/sector medium in the drive, this is the
resulting output:

------------------------------------------------------------------------
blockdev /dev/sdb result: 2048

blockdev /dev/loop0 result: 2048

mkfs output:
mke2fs 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
77600 inodes, 155176 blocks
7758 blocks (5.00%) reserved for the super user
First data block=0
5 block groups
32768 blocks per group, 32768 fragments per group
15520 inodes per group
Superblock backups stored on blocks: 
        32768, 98304

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

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

fsck output:
e2fsck 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/loop0: 11/77600 files (0.0% non-contiguous), 2446/155176 blocks

mount output:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       or too many mounted file systems
------------------------------------------------------------------------

Any idea?


Regards,

Peter Niemayer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mounting loop-device on a 2048 byte/sector medium fails
  2002-04-22 19:03 mounting loop-device on a 2048 byte/sector medium fails Peter Niemayer
@ 2002-04-23 22:21 ` Bill Davidsen
  2002-04-24  9:19   ` Peter Niemayer
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Davidsen @ 2002-04-23 22:21 UTC (permalink / raw)
  To: Peter Niemayer; +Cc: Linux Kernel Mailing List

On Mon, 22 Apr 2002, Peter Niemayer wrote:

> first I thought this was some loop-AES specific issue, but now I know
> it isn't: When I try to mount a filesystem on a loop device which
> is in turn using a 2048 byte/sector medium (a magneto-optical drive
> in my case), the mount fails though mkfs & fsck are happy.

I reported this some time ago as a problem with using offset mounting CDs
with a binary prefix before the ISO image. And since it seems that the
problem is not the offset but the sector size, the problems may be
related.

I'll look at this over the weekend if not before. It works with 2.0 and
2.2, I use it regularly, and it's the main thing keeping a few of my
machines on 2.2.

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mounting loop-device on a 2048 byte/sector medium fails
  2002-04-23 22:21 ` Bill Davidsen
@ 2002-04-24  9:19   ` Peter Niemayer
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Niemayer @ 2002-04-24  9:19 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

Bill Davidsen wrote:

> On Mon, 22 Apr 2002, Peter Niemayer wrote:
> 
> > first I thought this was some loop-AES specific issue, but now I know
> > it isn't: When I try to mount a filesystem on a loop device which
> > is in turn using a 2048 byte/sector medium (a magneto-optical drive
> > in my case), the mount fails though mkfs & fsck are happy.
> 
> I reported this some time ago as a problem with using offset mounting CDs
> with a binary prefix before the ISO image. And since it seems that the
> problem is not the offset but the sector size, the problems may be
> related.
> 
> I'll look at this over the weekend if not before. It works with 2.0 and
> 2.2, I use it regularly, and it's the main thing keeping a few of my
> machines on 2.2.

Then I've got good news for you: Jari Ruusu just sent me a patch to the
loop device that fixes the problem!

As loop-AES has a super-set of features of the original loop device,
you may download loop-AES 1.6b here:

http://sourceforge.net/project/showfiles.php?group_id=28891&release_id=84590

... and replace the loop.c-2.4.diff file in it with the attached new version.

Or wait until there's an official new loop-AES release or until the maintainer
of the original loop.c applied a similar patch.

Regards,

Peter Niemayer

[-- Attachment #2: loop.c-2.4.diff.bz2 --]
[-- Type: application/octet-stream, Size: 7771 bytes --]

[-- Attachment #3: loop.c-2.4.diff.bz2.sign --]
[-- Type: text/plain, Size: 346 bytes --]

-----BEGIN PGP MESSAGE-----
Version: 2.6.3ia
Comment: http://loop-aes.sourceforge.net/PGP-public-key.asc

iQCVAwUAPMWt8zMKg0M6Ig9RAQH/QQP9EpbDQunKEa2gzgKmJaz66QQKKc5N1HcL
Uxq9VxHScoE1eANYdvduWa0ElMXLlKezp+0eysgkc15s8PVk7CavhzOEcFo5A8Uq
SFykaCRQiPXBOqJp8bpjDdraAsvIg34pSvj01BL/oWkKHxWxqfDZmfz4+dLprsAg
ytCPFRILU7Q=
=Dhzy
-----END PGP MESSAGE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-04-24  9:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22 19:03 mounting loop-device on a 2048 byte/sector medium fails Peter Niemayer
2002-04-23 22:21 ` Bill Davidsen
2002-04-24  9:19   ` Peter Niemayer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).