On Thursday 14 December 2006 21:32, Alan Stern wrote:
> On Thu, 14 Dec 2006, Vaclav Barta wrote:
> > Dec 14 18:58:05 quanxi kernel: SCSI device sda: 982016 512-byte hdwr
> > sectors (503 MB)
> > Dec 14 18:58:05 quanxi kernel: sda: Write Protect is off
> Obviously this is the LUN you want to use, with almost 500 MB of storage
> and not write-protected.
...
> > Dec 14 18:58:05 quanxi kernel: sdb: Write Protect is on
> > Dec 14 18:58:05 quanxi kernel: sdb:<7>usb-storage: queuecommand called
> > Dec 14 18:58:05 quanxi kernel: sdb1
> > Dec 14 18:58:05 quanxi kernel: sd 1:0:0:1: Attached scsi removable disk
> > sdb
> And the second LUN does work but is too small to be useful.
It's readable, but I woudn't consider it working until I can write it, too...
> > ``mount -t vfat /dev/sdb1 /mnt/stick'' succeeds (while sda, sda1 and sdb
> > all fail) but with
> > mount: block device /dev/sdb1 is write-protected, mounting read-only
> > I've read somewhere that it's by design and that ``mount -o
> > rw,remount /mnt/stick'' should allow write access, but here it fails with
> > mount: block device /dev/sda1 is write-protected, mounting read-only
> > - the LUNs are getting confused...
> Perhaps mount gets the device name from your /etc/fstab file.
Yes, you're right again - I've removed the line for /mnt/stick from /etc/fstab
and now get
mount: block device /dev/sdb1 is write-protected, mounting read-only
> Do you remember where you read this?
Sorry, no. Some kind of online discussion or howto about flash drives on Linux
I read a few months ago... It said that since flash memory has a limited
number of writes, they should be mounted read-only by default and configured
not to update file access times.
> > Under Windows, the stick does show as 2 drives (a big, 479 MB, originally
> > empty one and a small 1,44 MB drive with some PDF documentation and an
> > executable I still didn't have the occasion to run), but both drives are
> > normally readable and writeable. Under Linux, ``mount -t
> > vfat /dev/sdb1 /mnt/stick'' mounts the small storage.
> Maybe the information you want is in the PDF documentation. It's also
> possible that the executable (a Windows program, no doubt) will allow you
> to "unlock" the first LUN, so that all these difficulties would then go
Not really... :-( The documentation describes how the executable can be used
to lock the big drive (so that its access requires a password), which works
(under Windows) but isn't really what I'm interested in. The default has been
unlocked, which behaves transparently under Windows but is apparently causing
trouble for Linux. The executable does allow changing the size of the two
drives, so I made the always-accessible one as big as possible and now get
the following on Linux:
Dec 15 19:54:22 quanxi kernel: usb 1-3: new high speed USB device using
ehci_hcd and address 2
Dec 15 19:54:22 quanxi kernel: usb 1-3: Product: Nu Drive
Dec 15 19:54:22 quanxi kernel: usb 1-3: Manufacturer:
Dec 15 19:54:22 quanxi kernel: usb 1-3: SerialNumber: 075A141402A5
Dec 15 19:54:22 quanxi kernel: usb 1-3: configuration #1 chosen from 1 choice
Dec 15 19:54:22 quanxi kernel: scsi0 : SCSI emulation for USB Mass Storage
devices
Dec 15 19:54:27 quanxi kernel: Vendor: Model: Nu Drive
Rev: PMAP
Dec 15 19:54:27 quanxi kernel: Type: Direct-Access
ANSI SCSI revision: 00
Dec 15 19:54:28 quanxi kernel: SCSI device sda: 2048 512-byte hdwr sectors (1
MB)
Dec 15 19:54:28 quanxi kernel: sda: Write Protect is off
Dec 15 19:54:28 quanxi kernel: SCSI device sda: 2048 512-byte hdwr sectors (1
MB)
Dec 15 19:54:28 quanxi kernel: sda: Write Protect is off
Dec 15 19:54:28 quanxi kernel: sda:<7>usb-storage: queuecommand called
Dec 15 19:54:28 quanxi kernel: sd 0:0:0:0: SCSI error: return code =
0x08000002
Dec 15 19:54:28 quanxi kernel: sda: Current: sense key=0x3
Dec 15 19:54:28 quanxi kernel: ASC=0x11 ASCQ=0x0
Dec 15 19:54:28 quanxi kernel: end_request: I/O error, dev sda, sector 0
Dec 15 19:54:28 quanxi kernel: sd 0:0:0:0: SCSI error: return code =
0x08000002
Dec 15 19:54:28 quanxi kernel: sda: Current: sense key=0x3
Dec 15 19:54:28 quanxi kernel: ASC=0x11 ASCQ=0x0
Dec 15 19:54:28 quanxi kernel: end_request: I/O error, dev sda, sector 0
Dec 15 19:54:28 quanxi kernel: sd 0:0:0:0: SCSI error: return code =
0x08000002
Dec 15 19:54:28 quanxi kernel: sda: Current: sense key=0x3
Dec 15 19:54:28 quanxi kernel: ASC=0x11 ASCQ=0x0
Dec 15 19:54:28 quanxi kernel: end_request: I/O error, dev sda, sector 0
Dec 15 19:54:28 quanxi kernel: unable to read partition table
Dec 15 19:54:28 quanxi kernel: sd 0:0:0:0: Attached scsi removable disk sda
Dec 15 19:54:28 quanxi kernel: Vendor: Model: Nu Drive
Rev: PMAP
Dec 15 19:54:28 quanxi kernel: Type: Direct-Access
ANSI SCSI revision: 00
Dec 15 19:54:28 quanxi kernel: SCSI device sdb: 983040 512-byte hdwr sectors
(503 MB)
Dec 15 19:54:28 quanxi kernel: sdb: Write Protect is on
Dec 15 19:54:28 quanxi kernel: SCSI device sdb: 983040 512-byte hdwr sectors
(503 MB)
Dec 15 19:54:28 quanxi kernel: sdb: Write Protect is on
Dec 15 19:54:28 quanxi kernel: sdb:<7>usb-storage: queuecommand called
Dec 15 19:54:28 quanxi kernel: sdb1
Dec 15 19:54:28 quanxi kernel: sd 0:0:0:1: Attached scsi removable disk sdb
Dec 15 19:55:13 quanxi kernel: VFS: Can't find a valid FAT filesystem on dev
sdb.
So, sdb looks big enough and sdb1 can be mounted, but just read-only.
Documentation mentions a "read-only switch" but the hardware doesn't have
any. :-( How do I remove (or ignore) the write protection?
Bye
Vasek
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users