2.6.[56]-1-686 mounts a read-only usb-storage as writable

From: Sakari Pesonen (sakari_pesonen_at_luukku.com)
Date: 05/29/04

  • Next message: Geoff Caplan: "Re: APT problem: postgresql won't install/uninstall/upgrade/reinstall"
    Date: Sat, 29 May 2004 18:35:25 +0300
    To: debian-user@lists.debian.org
    
    

    I'm running Sid with 2.6.6-1-686 kernel. I had several hangups as I
    tried to use my usb-stick. Every process accessing my usb-flash hung up
    and couldn't even be killed with -KILL. After several reboots I
    found out that I had forgotten my flash as read-only, and mount
    kept mounting it as writable.

    It worked some time ago and I'm not sure when it stopped working (as
    I'm normally putting the stick in ro-mode only when plugging it into
    win-machines). 2.4.24-1-686 -kernel mounts the usb-flash as read only,
    2.6.5-1-686 and 2.6.6-1-686 keep mount it as writable, when it is
    hardware-readonly. Not sure about older 2.6-kernels.

    Now when I tried to hang something up, I couldn't. Demo effect :) Just
    got these errors below when syncing to a
    hardware-write-protected-but-writable-mounted disk. Everything works
    fine when I switch the stick to writable mode, or do a manual '-o ro'
    -mount.

    Here is what I have and get:
    # /etc/fstab:
    /dev/sdb1 /mnt/usbstick auto user,defaults 0 0

    # mount:
    /dev/sdb1 on /mnt/usbstick type vfat (rw,noexec,nosuid,nodev,user=sakke)
    # ^^-- this is not true

    # /var/log/messages:
    May 29 17:26:05 limuz kernel: usb 1-2: new full speed USB device using
    address 8
    May 29 17:26:05 limuz kernel: scsi2 : SCSI emulation for USB Mass
    Storage devices
    May 29 17:26:05 limuz kernel: Vendor: PLEXTOR Model: PlexFlash
        Rev: 1.18
    May 29 17:26:05 limuz kernel: Type: Direct-Access
        ANSI SCSI revision: 02
    May 29 17:26:06 limuz kernel: SCSI device sdc: 507904 512-byte hdwr
    sectors (260 MB)
    May 29 17:26:06 limuz kernel: sdc: assuming Write Enabled
    May 29 17:26:06 limuz kernel: /dev/scsi/host2/bus0/target0/lun0: p1 p2
    May 29 17:26:06 limuz kernel: Attached scsi removable disk sdc at scsi2,
    channel 0, id 0, lun 0
    May 29 17:26:06 limuz usb.agent[8667]: usb-storage: already loaded
    May 29 17:26:06 limuz scsi.agent[8690]: disk at
    /devices/pci0000:00/0000:00:11.2/usb1/1-2/1-2:1.0/host2/2:0:0:0
    May 29 17:26:48 limuz kernel: SCSI error : <2 0 0 0> return code = 0x8000002
    May 29 17:26:48 limuz kernel: Current sdc: sense = 70 7
    May 29 17:26:48 limuz kernel: ASC=27 ASCQ= 0
    May 29 17:26:48 limuz kernel: Raw sense data:0x70 0x00 0x07 0x00 0x00
    0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x27 0x00 0x00 0x00 0x00 0x00
    May 29 17:26:48 limuz kernel: end_request: I/O error, dev sdc, sector 33
    May 29 17:26:48 limuz kernel: lost page write due to I/O error on sdc1
    May 29 17:26:53 limuz kernel: usb 1-2: USB disconnect, address 8
    May 29 17:26:56 limuz kernel: usb 1-2: new full speed USB device using
    address 9
    May 29 17:26:57 limuz kernel: scsi3 : SCSI emulation for USB Mass
    Storage devices
    May 29 17:26:57 limuz usb.agent[8818]: usb-storage: already loaded
    May 29 17:26:57 limuz kernel: Vendor: PLEXTOR Model: PlexFlash
        Rev: 1.18
    May 29 17:26:57 limuz kernel: Type: Direct-Access
        ANSI SCSI revision: 02
    May 29 17:26:57 limuz kernel: SCSI device sdb: 507904 512-byte hdwr
    sectors (260 MB)
    May 29 17:26:57 limuz kernel: sdb: assuming Write Enabled
    May 29 17:26:58 limuz kernel: /dev/scsi/host3/bus0/target0/lun0: p1 p2
    May 29 17:26:58 limuz kernel: Attached scsi removable disk sdb at scsi3,
    channel 0, id 0, lun 0
    May 29 17:26:58 limuz scsi.agent[8854]: disk at
    /devices/pci0000:00/0000:00:11.2/usb1/1-2/1-2:1.0/host3/3:0:0:0
    ### Here I touched a file on the disk and did a "$ sync" ###
    May 29 17:27:21 limuz kernel: SCSI error : <3 0 0 0> return code = 0x8000002
    May 29 17:27:21 limuz kernel: Current sdb: sense = 70 7
    May 29 17:27:21 limuz kernel: ASC=27 ASCQ= 0
    May 29 17:27:21 limuz kernel: Raw sense data:0x70 0x00 0x07 0x00 0x00
    0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x27 0x00 0x00 0x00 0x00 0x00
    May 29 17:27:21 limuz kernel: end_request: I/O error, dev sdb, sector 33
    May 29 17:27:21 limuz kernel: lost page write due to I/O error on sdb1
    May 29 17:28:28 limuz kernel: via82cxxx_audio: not our index: reg=0x6,
    newreg=0x0
    May 29 17:28:28 limuz kernel: via82cxxx_audio: not our index: reg=0x6,
    newreg=0x0
    May 29 17:28:34 limuz kernel: apm: BIOS version 1.2 Flags 0x03 (Driver
    version 1.16ac)
    May 29 17:28:34 limuz kernel: apm: overridden by ACPI.
    ### Here I did a $ umount, the disk was umounted but no data written :)
    May 29 17:33:37 limuz kernel: SCSI error : <3 0 0 0> return code = 0x8000002
    May 29 17:33:37 limuz kernel: Current sdb: sense = 70 7
    May 29 17:33:37 limuz kernel: ASC=27 ASCQ= 0
    May 29 17:33:37 limuz kernel: Raw sense data:0x70 0x00 0x07 0x00 0x00
    0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x27 0x00 0x00 0x00 0x00 0x00
    May 29 17:33:37 limuz kernel: end_request: I/O error, dev sdb, sector 1816
    May 29 17:33:37 limuz kernel: lost page write due to I/O error on sdb1
    May 29 17:37:43 limuz kernel: SCSI error : <3 0 0 0> return code = 0x8000002
    May 29 17:37:43 limuz kernel: Current sdb: sense = 70 7
    May 29 17:37:43 limuz kernel: ASC=27 ASCQ= 0
    May 29 17:37:43 limuz kernel: Raw sense data:0x70 0x00 0x07 0x00 0x00
    0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x27 0x00 0x00 0x00 0x00 0x00
    May 29 17:37:43 limuz kernel: end_request: I/O error, dev sdb, sector 33
    May 29 17:37:43 limuz kernel: lost page write due to I/O error on sdb1
    May 29 17:40:55 limuz shutdown[9001]: shutting down for system reboot

    Is this a known bug or something new? Happened to anyone else? Didn't
    found it via search.

    -Sakke

    -- 
    Just Be Free
    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Geoff Caplan: "Re: APT problem: postgresql won't install/uninstall/upgrade/reinstall"