Re: mount umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Rob
So did you put a write-protected floppy in, and try and mount it
read/write?

That's not going to work

- Original Message -
From: Rob Lahaye [EMAIL PROTECTED]
Subject: mount  umount read-only floppy: unmount failed: Input/output
error ??




 Hi,

 I created the installation floppy from kern.flp. Removed it from the
 drive, to make it read-only.
 I then put it back into the drive and do, as root:

 # mount -t ufs /dev/fd0 /mnt
 # umount /dev/fd0
 umount: unmount of /mnt failed: Input/output error
 #

 It's still mounted! I have to take the floppy out of the drive, make
 it read/write, put it back in the drive and do the umount. Then it's
OK.

 The following is also fine:

 # mount -t ufs -o rdonly /dev/fd0 /mnt
 # umount /dev/fd0


 Is this normal, or what?
 Thanks,
 Rob.



 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Rob
That's strange - I get errors as soon as I try and do this, before the
filesystem is even available.

Perhaps the updates from mounting the floppy aren't being written out to
the actual media until you try to unmount it - some kind of caching
issue?

What happens if you try to touch a file on the (incorrectly) writeable
floppy?

- Original Message -
From: Rob Lahaye [EMAIL PROTECTED]
Subject: Re: mount  umount read-only floppy: unmount failed:
Input/output error ??



 Rob [EMAIL PROTECTED] wrote:
  So did you put a write-protected floppy in, and try and mount it
  read/write?
 
  That's not going to work

 I would agree, if the mount didn't work. But that's what I
 tried to point out.

 As it is now, the trouble arises from the fact that you actually
 CAN read/write mount a read/only-floppy. No complaints from the
 mount command.

 However, you can't umount it anymore! So you're stuck and it
 is mounted for-ever! Unless, you take the floppy out, change it
 to read/write, put it back in the drive and do the umount again.

 Why does mount not check the read/write of the floppy?
 And if it doesn't, for some reason, why then all of a sudden
 umount does check for the read/write thing?

 Rob.

 PS: this is with FreeBSD 4.8

 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Rob Lahaye

Rob wrote:
 That's strange - I get errors as soon as I try and do this, before the
 filesystem is even available.
 
 Perhaps the updates from mounting the floppy aren't being written out to
 the actual media until you try to unmount it - some kind of caching
 issue?
 
 What happens if you try to touch a file on the (incorrectly) writeable
 floppy?

Are you also using FreeBSD 4.8?

I have created the installation floppy from the kern.flp file.
I then made this floppy readonly. I put that into my floppy drive
and...

# mount -t ufs /dev/fd0 /mnt
# ls -lo /mnt
total 1301
drwxr-xr-x  2 root  wheel  - 512 Apr  3 20:06 boot
-r-xr-xr-x  1 root  wheel  - 1324900 Apr  3 20:06 kernel.gz
# touch /mnt/kernel.gz
# ls -lo /mnt
total 1301
drwxr-xr-x  2 root  wheel  - 512 Apr  3 20:06 boot
-r-xr-xr-x  1 root  wheel  - 1324900 Jun 30 19:17 kernel.gz
# umount /mnt
umount: unmount of /mnt failed: Input/output error
#

Notice that the time has changed due to the 'touch' of the file
despite being readonly!!

The very little I know about filesystems, I guess the 'touch' has
been applied to the cache, not to the actual floppy.
The umount forces a sync, which can't be done due to readonly.

Something is fishy here, isn't it?

Rob.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Rob
I think I've figured it out - here's a script(1) of trying to mount a
write-protected floppy:

  [EMAIL PROTECTED] # uname -sr
  FreeBSD 4.8-RELEASE
  [EMAIL PROTECTED] # mount /dev/fd0 /mnt
  [EMAIL PROTECTED] # ll /mnt
  total 3
  drwxr-xr-x   2 root  wheel  512 Jun 28 14:04 .
  drwxr-xr-x  21 root  wheel  512 May 19 18:57 ..
  [EMAIL PROTECTED] # umount /mnt
  umount: unmount of /mnt failed: Input/output error

However, here's the vidcontrol(1) dump of the same commands:

  [EMAIL PROTECTED] # uname -sr
  FreeBSD 4.8-RELEASE
  [EMAIL PROTECTED] # mount /dev/fd0 /mnt
  fd0c: hard error writing fsbn 240 (ST0 40abnrml ST1 2write_protect
ST2 0 cyl 6 hd 1 sec 7)
  [EMAIL PROTECTED] # ll /mnt
  total 3
  drwxr-xr-x   2 root  wheel  512 Jun 28 14:04 .
  drwxr-xr-x  21 root  wheel  512 May 19 18:57 ..
  [EMAIL PROTECTED] # umount /mnt
  fd0c: hard error writing fsbn 56 of 56-63 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 1 hd 1 sec 3)
  fd0c: hard error writing fsbn 240 (ST0 40abnrml ST1 2write_protect
ST2 0 cyl 6 hd 1 sec 7)
  fd0c: hard error writing fsbn 240 (ST0 40abnrml ST1 2write_protect
ST2 0 cyl 6 hd 1 sec 7)
  fd0c: hard error writing fsbn 16 of 16-18 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 0 hd 0 sec 17)
  fd0c: hard error writing fsbn 56 of 56-63 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 1 hd 1 sec 3)
  fd0c: hard error writing fsbn 16 of 16-18 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 0 hd 0 sec 17)
  fd0c: hard error writing fsbn 56 of 56-63 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 1 hd 1 sec 3)
  fd0c: hard error writing fsbn 240 (ST0 40abnrml ST1 2write_protect
ST2 0 cyl 6 hd 1 sec 7)
  fd0c: hard error writing fsbn 16 of 16-18 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 0 hd 0 sec 17)
  fd0c: hard error writing fsbn 56 of 56-63 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 1 hd 1 sec 3)
  fd0c: hard error writing fsbn 240 (ST0 40abnrml ST1 2write_protect
ST2 0 cyl 6 hd 1 sec 7)
  fd0c: hard error writing fsbn 16 of 16-18 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 0 hd 0 sec 17)
  fd0c: hard error writing fsbn 56 of 56-63 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 1 hd 1 sec 3)
  fd0c: hard error writing fsbn 240 (ST0 40abnrml ST1 2write_protect
ST2 0 cyl 6 hd 1 sec 7)
  fd0c: hard error writing fsbn 16 of 16-18 (ST0 40abnrml ST1
2write_protect ST2 0 cyl 0 hd 0 sec 17)
  umount: unmount of /mnt failed: Input/output error

Since I'm doing this on ttyv0, I see the errors on the console - but
they don't appear in the typescript.

I'm guessing that you're doing this in a non-console shell, and the
errors are appearing elsewhere - maybe /var/log/messages?

- Original Message -
From: Rob Lahaye [EMAIL PROTECTED]
Subject: Re: mount  umount read-only floppy: unmount failed:
Input/output error ??



 Rob wrote:
  That's strange - I get errors as soon as I try and do this, before
the
  filesystem is even available.
 
  Perhaps the updates from mounting the floppy aren't being written
out to
  the actual media until you try to unmount it - some kind of caching
  issue?
 
  What happens if you try to touch a file on the (incorrectly)
writeable
  floppy?

 Are you also using FreeBSD 4.8?

 I have created the installation floppy from the kern.flp file.
 I then made this floppy readonly. I put that into my floppy drive
 and...

 # mount -t ufs /dev/fd0 /mnt
 # ls -lo /mnt
 total 1301
 drwxr-xr-x  2 root  wheel  - 512 Apr  3 20:06 boot
 -r-xr-xr-x  1 root  wheel  - 1324900 Apr  3 20:06 kernel.gz
 # touch /mnt/kernel.gz
 # ls -lo /mnt
 total 1301
 drwxr-xr-x  2 root  wheel  - 512 Apr  3 20:06 boot
 -r-xr-xr-x  1 root  wheel  - 1324900 Jun 30 19:17 kernel.gz
 # umount /mnt
 umount: unmount of /mnt failed: Input/output error
 #

 Notice that the time has changed due to the 'touch' of the file
 despite being readonly!!

 The very little I know about filesystems, I guess the 'touch' has
 been applied to the cache, not to the actual floppy.
 The umount forces a sync, which can't be done due to readonly.

 Something is fishy here, isn't it?

 Rob.

 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Rob Lahaye

Rob wrote:
 I think I've figured it out - here's a script(1) of trying to mount a
 [...]
 
 I'm guessing that you're doing this in a non-console shell, and the
 errors are appearing elsewhere - maybe /var/log/messages?

Yep, my console is indeed filled up with the corresponding error messages.

Have you tried to umount that floppy? Well, you can't. Unless you manually
change the floppy to read/write and allow the OS to apply the changes to
the floppy :(. But what if you can't or don't want that...then it is
error-mounted for ever

I would qualify this as a clear bug.
What do you say? Worth a bug report?

Simply mount and the umount a read/only floppy. You're stuck!

Rob.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Rob
I don't know if it's a bug - you've asked the OS to do something that is
prohibited by the hardware, and (in the Unix tradition) it tries as hard
as it can.

What might be improved is an error message from mount(8) at the time of
the problem - not everyone looks at their console

- Original Message -
From: Rob Lahaye [EMAIL PROTECTED]
Subject: Re: mount  umount read-only floppy: unmount failed:
Input/output error ??



 Rob wrote:
  I think I've figured it out - here's a script(1) of trying to mount
a
  [...]
 
  I'm guessing that you're doing this in a non-console shell, and the
  errors are appearing elsewhere - maybe /var/log/messages?

 Yep, my console is indeed filled up with the corresponding error
messages.

 Have you tried to umount that floppy? Well, you can't. Unless you
manually
 change the floppy to read/write and allow the OS to apply the changes
to
 the floppy :(. But what if you can't or don't want that...then it is
 error-mounted for ever

 I would qualify this as a clear bug.
 What do you say? Worth a bug report?

 Simply mount and the umount a read/only floppy. You're stuck!

 Rob.

 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Rob Lahaye

Rob wrote:
 I don't know if it's a bug - you've asked the OS to do something that is
 prohibited by the hardware, and (in the Unix tradition) it tries as hard
 as it can.
 
 What might be improved is an error message from mount(8) at the time of
 the problem - not everyone looks at their console

OK, but my point is: even if you immediately notice the messages in the
console, it's already too late. The mount command has been done and the
umount can't reverse the action, because of the Input/Output error.

With or without noticing the console error messages, you are stuck with
this mount. And if, for some reason, you can't make the floppy read/write,
you are stuck with this mount for ever, unless you reboot...

Have you tried yourself? There's no clean way out, is there?

I still think this falls into the category 'bug'.

Rob.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Rob Lahaye

Rob wrote:
 
 Yep - just tried
 
   mount -u -r -f /mnt
 
 and also
 
   umount -f /tmp
 
 Both fail with I/O errors, presumably from the fdc0 device. Also when
 rebooting, the failed sync interferes with unmounting other filesystems,
 causing fsck(8)s on the way back up.
 
 But mount/umount can't just ignore the device status - if it says things
 are broken, what should they do?

I don't know. I may have given wrongly the impression that I am familiar
with this matter. I am not at all. I just noticed a very illogical behaviour
when mounting my readonly floppy; that's all.

With my simple mind, I would say: 'mount' should be able to detect that
you do a read/write-mount, but the medium is readonly; so it should
give an error message and NOT mount.

BUT: if it does mount the medium (floppy), then umount should also do
its job; and not, as it is now, refuse to umount.

Rob.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Sergey \DoubleF\ Zaharchenko
Rob Lahaye wrote:
I created the installation floppy from kern.flp. Removed it from the
drive, to make it read-only.
I then put it back into the drive and do, as root:
# mount -t ufs /dev/fd0 /mnt
# umount /dev/fd0
umount: unmount of /mnt failed: Input/output error
You know, ufs filesystems store the last mounted on string in 
themselves (it is reported by fsck, f.e.). I am not sure, but it seems 
like mount is willing to write it to the floppy.

 Perhaps the updates from mounting the floppy aren't being written
 out to the actual media until you try to unmount it - some kind of
 caching issue?
So you were _writing_ to a read-only floppy;)? Yes, of course, FreeBSD 
does cache them (that's why you can't take it out without unmounting). 
It's just that, short of trying to write to the floppy, you can't get to 
know it's read-only AFAIK.

HTH,
DoubleF
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]