It's probably /dev/sda1 ... Linux sees USB devices as SCSI.
[changed the subject from USB pen drive to USB card reader]
Dee-Ann LeBlanc wrote:
It's probably /dev/sda1 ... Linux sees USB devices as SCSI.
Hi Dee-Ann,
No, it's not sda1. And I tried a lot of other sd's, is it possible to issue a command that shows which device it is, some kind of scanning, so that I know which device to enter in the mount command?
Guus.
On 21 Nov 2003 09:56:52 -0800 Dee-Ann LeBlanc dee@renaissoft.com wrote:
It's probably /dev/sda1 ... Linux sees USB devices as SCSI.
In my case:
[net@pietro net]$ su - Password: [root@pietro root]# fdisk -l /dev/sda
Disk /dev/sda: 128 MB, 128974848 bytes 32 heads, 32 sectors/track, 246 cylinders Units = cylinders of 1024 * 512 = 524288 bytes
Device Boot Start End Blocks Id System /dev/sda4 * 1 246 125936 6 FAT16 [root@pietro root]#
In fstab: /dev/sda4 /mnt/flash auto noauto,owner,kudzu 0 0
henk
Dee-Ann LeBlanc wrote:
It's probably /dev/sda1 ... Linux sees USB devices as SCSI.
Thanks for that - I'd managed to get it mounted using /dev/sda with no number at the end and it works fine. Having said that - I am now getting some permission errors when I try and write to it that I didn't get before, and checking my /etc/fstab file it has switched to /dev/sda1
Very odd.....
Bryan Anderson fedora@bryananderson.co.uk
A.J. Bonnema wrote:
[changed the subject from USB pen drive to USB card reader]
Dee-Ann LeBlanc wrote:
It's probably /dev/sda1 ... Linux sees USB devices as SCSI.
Hi Dee-Ann,
No, it's not sda1. And I tried a lot of other sd's, is it possible to issue a command that shows which device it is, some kind of scanning, so that I know which device to enter in the mount command?
Guus.
In my experience, if the hotplug code finds it, it also mounts it automagically.
A.J. Bonnema wrote:
[changed the subject from USB pen drive to USB card reader]
Dee-Ann LeBlanc wrote:
It's probably /dev/sda1 ... Linux sees USB devices as SCSI.
Hi Dee-Ann,
No, it's not sda1. And I tried a lot of other sd's, is it possible to issue a command that shows which device it is, some kind of scanning, so that I know which device to enter in the mount command?
Ok, I found out I'm wrong: it *is* sda1. In one of the log files this was mentioned. Anyway, I formatted the disk in Windows and still get the same result.
I strongly suspect that the filesystem is not a regular vfat and I have no idea how to mount this filesystem or how to find out how it is formatted.
Doing "fdisk -l /dev/sda" gives no result (it just returns).
The device is being recognized as a ND5010 Card Reader from Neodio Technologies Corp. using lsusb and lsusb -s 003:002 -v. Furthermore the disk is recognized correctly by cat /proc/bus/usb/devices as a USB Storage Device.
Anyone know what's wrong?
Guus.
Scott Burns wrote:
It's probably /dev/sda1 ... Linux sees USB devices as SCSI.
In my experience, if the hotplug code finds it, it also mounts it automagically.
No, in my case it doesn't. I checked using the mount command. Fdisk -l /dev/sda also does not give any output. I tried mounting it using vfat and msdos and both do not work. So I'm stuck. I *have* to using Windows to read the memory card or stick whatever it's called.
What filesystem does your card show? Do you know how I can find out which filesystem is on the card?
Guus.
A.J. Bonnema wrote:
Ok, I found out I'm wrong: it *is* sda1. In one of the log files this was mentioned. Anyway, I formatted the disk in Windows and still get the same result.
I strongly suspect that the filesystem is not a regular vfat and I have no idea how to mount this filesystem or how to find out how it is formatted.
Try this: dd if=/dev/sda1 of=test bs=1024 count=2 file test
This will copy the first 2k of the card and put it in a file. file will then tell you what it thinks it is.
You formatted it in windows. What version of windows? Is it XP? IIRC this default to a variant of NTFS and you will need a seperate package to read it.
On Sun, 2003-11-23 at 19:13, Scott Burns wrote:
In my experience, if the hotplug code finds it, it also mounts itautomagically.
Really? Did you have to do anything special to get it to auto mount? I have never seen RH8, RH9 or FC1 auto mount any of my USB mass-storage devices. When I plug in my mass-storage digital camera, the mass-storage module is loaded, but that is all. When I put a smart media card into my PCMCIA reader, again the modules are loaded but /dev/hde1 is never mounted, the same goes for a USB thumb drive and my mass-storage MP3 recorder/player. Is there anyway to turn this feature on? I had to make the entries in /etc/fstab and then I right click on the Gnome desktop and mount what I want under the disks menu. I did notice that Mandrake auto mounts these devices, is there any reason that FC1 does not?
Jim Drabb
Scott Burns wrote:
A.J. Bonnema wrote:
Try this: dd if=/dev/sda1 of=test bs=1024 count=2 file test
This will copy the first 2k of the card and put it in a file. file will then tell you what it thinks it is.
Thanks for this explanation. It didn't work though. For /dev/sda it gives "dd opening '/dev/sda1': no such device or address. For /dev/sda it gives:
" dd: reading '/dev/sda': Intput/output error 0+0 records in 0+0 records out "
Idea's?
You formatted it in windows. What version of windows? Is it XP? IIRC this default to a variant of NTFS and you will need a seperate package to read it.
No, it's windows 98 se. I suspect it's fat because the "disk" is only 256 MB.
A.J. Bonnema wrote:
Scott Burns wrote:
A.J. Bonnema wrote:
Try this: dd if=/dev/sda1 of=test bs=1024 count=2 file test
This will copy the first 2k of the card and put it in a file. file will then tell you what it thinks it is.
Thanks for this explanation. It didn't work though. For /dev/sda it gives "dd opening '/dev/sda1': no such device or address. For /dev/sda it gives:
" dd: reading '/dev/sda': Intput/output error 0+0 records in 0+0 records out "
I found out some more from /var/log/message in reaction to 'fdisk -l /dev/sda'. The output follows:
Nov 24 02:00:55 abonnema kernel: sda: Unit Not Ready, sense: Nov 24 02:00:55 abonnema kernel: Current 00:00: sense key Not Ready Nov 24 02:00:55 abonnema kernel: Additional sense indicates Medium not present Nov 24 02:00:55 abonnema kernel: sda : READ CAPACITY failed. Nov 24 02:00:55 abonnema kernel: sda : status = 1, message = 00, host = 0, driver = 08 Nov 24 02:00:55 abonnema kernel: Current sd00:00: sense key Not Ready Nov 24 02:00:55 abonnema kernel: Additional sense indicates Medium not present Nov 24 02:00:55 abonnema kernel: sda : block size assumed to be 512 bytes, disk size 1GB. Nov 24 02:00:55 abonnema kernel: sda: Write Protect is off Nov 24 02:00:55 abonnema kernel: sda: I/O error: dev 08:00, sector 0 Nov 24 02:00:55 abonnema kernel: I/O error: dev 08:00, sector 0 Nov 24 02:00:55 abonnema kernel: unable to read partition table Nov 24 02:01:14 abonnema kernel: sda: Unit Not Ready, sense: Nov 24 02:01:14 abonnema kernel: Current 00:00: sense key Not Ready Nov 24 02:01:14 abonnema kernel: Additional sense indicates Medium not present Nov 24 02:01:14 abonnema kernel: sda : READ CAPACITY failed. Nov 24 02:01:14 abonnema kernel: sda : status = 1, message = 00, host = 0, driver = 08 Nov 24 02:01:14 abonnema kernel: Current sd00:00: sense key Not Ready Nov 24 02:01:14 abonnema kernel: Additional sense indicates Medium not present Nov 24 02:01:14 abonnema kernel: sda : block size assumed to be 512 bytes, disk size 1GB. Nov 24 02:01:14 abonnema kernel: sda: Write Protect is off Nov 24 02:01:14 abonnema kernel: sda: I/O error: dev 08:00, sector 0 Nov 24 02:01:14 abonnema kernel: I/O error: dev 08:00, sector 0 Nov 24 02:01:14 abonnema kernel: unable to read partition table Nov 24 02:01:14 abonnema kernel: Device not ready. Make sure there is a disc in the drive. Nov 24 02:01:14 abonnema kernel: I/O error: dev 08:00, sector 0
Does anyone know what is going on? I *can* reach the same disk from windows.
Guus.
James Drabb wrote:
On Sun, 2003-11-23 at 19:13, Scott Burns wrote:
In my experience, if the hotplug code finds it, it also mounts it automagically.
Really? Did you have to do anything special to get it to auto mount?
<SNIP>
I did nothing special on RH9 and a Nikon digital camera and a memory stick (can't remember what type ) both mounted themselves under new directories, in /mnt IIRC.
A.J. Bonnema wrote:
Thanks for this explanation. It didn't work though. For /dev/sda it gives "dd opening '/dev/sda1': no such device or address. For /dev/sda it gives:
" dd: reading '/dev/sda': Intput/output error 0+0 records in 0+0 records out "
Idea's?
Sounds like a driver problem. What gets written to /var/log/messages about it?
Scott Burns wrote:
A.J. Bonnema wrote:
Thanks for this explanation. It didn't work though. For /dev/sda it gives "dd opening '/dev/sda1': no such device or address. For /dev/sda it gives:
" dd: reading '/dev/sda': Intput/output error 0+0 records in 0+0 records out "
Idea's?
Sounds like a driver problem. What gets written to /var/log/messages about it?
[I already sent this somewhere, but it didn't (afaics), so I'll repeat it here] I found out some more from /var/log/message in reaction to 'fdisk -l /dev/sda'. The output follows:
Nov 24 02:00:55 abonnema kernel: sda: Unit Not Ready, sense: Nov 24 02:00:55 abonnema kernel: Current 00:00: sense key Not Ready Nov 24 02:00:55 abonnema kernel: Additional sense indicates Medium not present Nov 24 02:00:55 abonnema kernel: sda : READ CAPACITY failed. Nov 24 02:00:55 abonnema kernel: sda : status = 1, message = 00, host = 0, driver = 08 Nov 24 02:00:55 abonnema kernel: Current sd00:00: sense key Not Ready Nov 24 02:00:55 abonnema kernel: Additional sense indicates Medium not present Nov 24 02:00:55 abonnema kernel: sda : block size assumed to be 512 bytes, disk size 1GB. Nov 24 02:00:55 abonnema kernel: sda: Write Protect is off Nov 24 02:00:55 abonnema kernel: sda: I/O error: dev 08:00, sector 0 Nov 24 02:00:55 abonnema kernel: I/O error: dev 08:00, sector 0 Nov 24 02:00:55 abonnema kernel: unable to read partition table Nov 24 02:01:14 abonnema kernel: sda: Unit Not Ready, sense: Nov 24 02:01:14 abonnema kernel: Current 00:00: sense key Not Ready Nov 24 02:01:14 abonnema kernel: Additional sense indicates Medium not present Nov 24 02:01:14 abonnema kernel: sda : READ CAPACITY failed. Nov 24 02:01:14 abonnema kernel: sda : status = 1, message = 00, host = 0, driver = 08 Nov 24 02:01:14 abonnema kernel: Current sd00:00: sense key Not Ready Nov 24 02:01:14 abonnema kernel: Additional sense indicates Medium not present Nov 24 02:01:14 abonnema kernel: sda : block size assumed to be 512 bytes, disk size 1GB. Nov 24 02:01:14 abonnema kernel: sda: Write Protect is off Nov 24 02:01:14 abonnema kernel: sda: I/O error: dev 08:00, sector 0 Nov 24 02:01:14 abonnema kernel: I/O error: dev 08:00, sector 0 Nov 24 02:01:14 abonnema kernel: unable to read partition table Nov 24 02:01:14 abonnema kernel: Device not ready. Make sure there is a disc in the drive. Nov 24 02:01:14 abonnema kernel: I/O error: dev 08:00, sector 0
Do you have any idea what's going on?
Guus.
A.J. Bonnema wrote:
[I already sent this somewhere, but it didn't (afaics), so I'll repeat it here] I found out some more from /var/log/message in reaction to 'fdisk -l /dev/sda'. The output follows:
My first impression is that windows did not put a partition table on the drive, kinda like a floppy disk IIRC. Windows likes it, but Linux doesn't. Even though fdisk -l fails, can you use fdisk to put a single primary partition on the drive?
Scott Burns wrote:
A.J. Bonnema wrote:
[I already sent this somewhere, but it didn't (afaics), so I'll repeat it here] I found out some more from /var/log/message in reaction to 'fdisk -l /dev/sda'. The output follows:
My first impression is that windows did not put a partition table on the drive, kinda like a floppy disk IIRC. Windows likes it, but Linux doesn't. Even though fdisk -l fails, can you use fdisk to put a single primary partition on the drive?
This is the response to 'fdisk /dev/sda' (or sda)
Nov 24 04:37:33 abonnema kernel: sda: Unit Not Ready, sense: Nov 24 04:37:33 abonnema kernel: Current 00:00: sense key Not Ready Nov 24 04:37:33 abonnema kernel: Additional sense indicates Medium not present Nov 24 04:37:33 abonnema kernel: sda : READ CAPACITY failed. Nov 24 04:37:33 abonnema kernel: sda : status = 1, message = 00, host = 0, driver = 08 Nov 24 04:37:33 abonnema kernel: Current sd00:00: sense key Not Ready Nov 24 04:37:33 abonnema kernel: Additional sense indicates Medium not present Nov 24 04:37:33 abonnema kernel: sda : block size assumed to be 512 bytes, disk size 1GB. Nov 24 04:37:33 abonnema kernel: sda: Write Protect is off Nov 24 04:37:33 abonnema kernel: sda: I/O error: dev 08:00, sector 0 Nov 24 04:37:33 abonnema kernel: I/O error: dev 08:00, sector 0 Nov 24 04:37:33 abonnema kernel: unable to read partition table Nov 24 04:37:33 abonnema kernel: Device not ready. Make sure there is a disc in the drive. Nov 24 04:37:33 abonnema kernel: I/O error: dev 08:00, sector 0
Any ideas?
Guus.
A.J. Bonnema wrote:
This is the response to 'fdisk /dev/sda' (or sda)
Nov 24 04:37:33 abonnema kernel: sda: Unit Not Ready, sense: Nov 24 04:37:33 abonnema kernel: Current 00:00: sense key Not Ready Nov 24 04:37:33 abonnema kernel: Additional sense indicates Medium not present Nov 24 04:37:33 abonnema kernel: sda : READ CAPACITY failed. Nov 24 04:37:33 abonnema kernel: sda : status = 1, message = 00, host = 0, driver = 08 Nov 24 04:37:33 abonnema kernel: Current sd00:00: sense key Not Ready Nov 24 04:37:33 abonnema kernel: Additional sense indicates Medium not present Nov 24 04:37:33 abonnema kernel: sda : block size assumed to be 512 bytes, disk size 1GB. Nov 24 04:37:33 abonnema kernel: sda: Write Protect is off Nov 24 04:37:33 abonnema kernel: sda: I/O error: dev 08:00, sector 0 Nov 24 04:37:33 abonnema kernel: I/O error: dev 08:00, sector 0 Nov 24 04:37:33 abonnema kernel: unable to read partition table Nov 24 04:37:33 abonnema kernel: Device not ready. Make sure there is a disc in the drive. Nov 24 04:37:33 abonnema kernel: I/O error: dev 08:00, sector 0
Any ideas?
I'm out. You might want to have a quick look at the kernel code in question to see if there are any module flags you can use.
Do you have a flash card in there? If not, the READ CAPACITY will fail and there's really not much you can do with it.
Make sure there is a memory card of come sort in there.
BTW, I don't know if anyone has mentioned it but when dealing with USB devices "devlabel" is your friend. Once you figure out the device name the first time use "devlabel" to label it so you can mount it by a special symlink instead of the real device which is likely to change.
Read the man page, it's pretty simple.
A.J. Bonnema wrote:
This is the response to 'fdisk /dev/sda' (or sda)
Nov 24 04:37:33 abonnema kernel: sda: Unit Not Ready, sense: Nov 24 04:37:33 abonnema kernel: Current 00:00: sense key Not Ready Nov 24 04:37:33 abonnema kernel: Additional sense indicates Medium not present Nov 24 04:37:33 abonnema kernel: sda : READ CAPACITY failed. Nov 24 04:37:33 abonnema kernel: sda : status = 1, message = 00, host = 0, driver = 08 Nov 24 04:37:33 abonnema kernel: Current sd00:00: sense key Not Ready Nov 24 04:37:33 abonnema kernel: Additional sense indicates Medium not present Nov 24 04:37:33 abonnema kernel: sda : block size assumed to be 512 bytes, disk size 1GB. Nov 24 04:37:33 abonnema kernel: sda: Write Protect is off Nov 24 04:37:33 abonnema kernel: sda: I/O error: dev 08:00, sector 0 Nov 24 04:37:33 abonnema kernel: I/O error: dev 08:00, sector 0 Nov 24 04:37:33 abonnema kernel: unable to read partition table Nov 24 04:37:33 abonnema kernel: Device not ready. Make sure there is a disc in the drive. Nov 24 04:37:33 abonnema kernel: I/O error: dev 08:00, sector 0
Any ideas?
Guus.
Gregory Gulik wrote:
Do you have a flash card in there? If not, the READ CAPACITY will fail and there's really not much you can do with it.
Make sure there is a memory card of come sort in there.
BTW, I don't know if anyone has mentioned it but when dealing with USB devices "devlabel" is your friend. Once you figure out the device name the first time use "devlabel" to label it so you can mount it by a special symlink instead of the real device which is likely to change.
Read the man page, it's pretty simple.
Ok, did that. It didn't help though.
devlabel add -d /dev/sda1 -s /smartcardreader
" /dev/sda1 does not exist. Failure. Since this device does not exist, it did not return an identifier. "
Practically the same message was returned for /dev/sda.
Could it be a problem that it contains 6 containers for different kinds of smartcards?
Guus.
h.breimer wrote:
On 21 Nov 2003 09:56:52 -0800 Dee-Ann LeBlanc dee@renaissoft.com wrote:
It's probably /dev/sda1 ... Linux sees USB devices as SCSI.
In my case:
[net@pietro net]$ su - Password: [root@pietro root]# fdisk -l /dev/sda
Disk /dev/sda: 128 MB, 128974848 bytes32 heads, 32 sectors/track, 246 cylinders Units = cylinders of 1024 * 512 = 524288 bytes
Device Boot Start End Blocks Id System/dev/sda4 * 1 246 125936 6 FAT16 [root@pietro root]#
In fstab: /dev/sda4 /mnt/flash auto noauto,owner,kudzu 0 0
henk
Okee, so it's not always sda1 then.
Guus (haven't found the problem yet).
A.J. Bonnema wrote:
Ok, did that. It didn't help though.
devlabel add -d /dev/sda1 -s /smartcardreader
" /dev/sda1 does not exist. Failure. Since this device does not exist, it did not return an identifier. "
Practically the same message was returned for /dev/sda.
Using /dev/sda won't work. The way my 6-in-1 works is each slot appears like a different partition. However I've only used the CF slot for now. I tried to use it with an SD card months ago with RH9 and it didn't work.
Could it be a problem that it contains 6 containers for different kinds of smartcards?
That's probably part of it. Try /dev/sda1 ... /dev/sda6 and see if any of those work.
If not, then try getting a different 6-in-1 reader. The first one I had didn't work with Linux no matter what I did. I returned it and got this one and it's worked perfectly, at least with CF cards.
Gregory Gulik wrote:
Could it be a problem that it contains 6 containers for different kinds of smartcards?
That's probably part of it. Try /dev/sda1 ... /dev/sda6 and see if any of those work.
If not, then try getting a different 6-in-1 reader. The first one I had didn't work with Linux no matter what I did. I returned it and got this one and it's worked perfectly, at least with CF cards.
Did you buy a different brand or did you just get a different specimen of the same brand and type?
Guus.
Different brand. There is no sign of a brand name on this reader but the reason I bought it is the manual does mention that Linux supports this device with no additional drivers.
This is the one I'm using now:
http://store.yahoo.com/directron/ku6in1internal.html
A.J. Bonnema wrote:
Did you buy a different brand or did you just get a different specimen of the same brand and type?
Guus.
On Mon, 2003-11-24 at 12:28, Gregory Gulik wrote:
Different brand. There is no sign of a brand name on this reader but the reason I bought it is the manual does mention that Linux supports this device with no additional drivers.
This is the one I'm using now:
This isn't directly related, but some interested party might like to know that the SanDisk model SDDR-33 SD/MMC reader works perfectly in Linux. It shows up as /dev/sda1. It was $19, I think.
On Sun, 2003-11-23 at 16:27, A.J. Bonnema wrote:
A.J. Bonnema wrote:
[changed the subject from USB pen drive to USB card reader]
Dee-Ann LeBlanc wrote:
It's probably /dev/sda1 ... Linux sees USB devices as SCSI.
Hi Dee-Ann,
No, it's not sda1. And I tried a lot of other sd's, is it possible to issue a command that shows which device it is, some kind of scanning, so that I know which device to enter in the mount command?
Ok, I found out I'm wrong: it *is* sda1. In one of the log files this was mentioned. Anyway, I formatted the disk in Windows and still get the same result.
I strongly suspect that the filesystem is not a regular vfat and I have no idea how to mount this filesystem or how to find out how it is formatted.
Doing "fdisk -l /dev/sda" gives no result (it just returns).
The device is being recognized as a ND5010 Card Reader from Neodio Technologies Corp. using lsusb and lsusb -s 003:002 -v. Furthermore the disk is recognized correctly by cat /proc/bus/usb/devices as a USB Storage Device.
Anyone know what's wrong?
You may have a problem like I did this weekend:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=110653
The Fedora/Red Hat kernels don't have multi-LUN support (basically one device with multiple disks). You can manually add the LUNs in /proc:
echo "scsi-add-single-device 0 0 0 1" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 2" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 3" > /proc/scsi/scsi
See if that helps.
Forrest
Taylor, ForrestX wrote:
Doing "fdisk -l /dev/sda" gives no result (it just returns).
The device is being recognized as a ND5010 Card Reader from Neodio Technologies Corp. using lsusb and lsusb -s 003:002 -v. Furthermore the disk is recognized correctly by cat /proc/bus/usb/devices as a USB Storage Device.
Anyone know what's wrong?
You may have a problem like I did this weekend:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=110653
The Fedora/Red Hat kernels don't have multi-LUN support (basically one device with multiple disks). You can manually add the LUNs in /proc:
echo "scsi-add-single-device 0 0 0 1" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 2" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 3" > /proc/scsi/scsi
See if that helps.
Forrest
</gratitude-mode> Fantastic! Great! This is it! Thank you very much!! <gratitude-mode>
And thank you for documenting the bug. It works like a charm. I'm very content I can finally read the bugger.....
What I wonder about is, how did you find the error and how did you find the statements to correct it?
I had really no idea it was soooo simple (well, it usually is once you know.....).
Thanks again.
Guus.
On Mon, 2003-11-24 at 16:26, A.J. Bonnema wrote:
Taylor, ForrestX wrote:
Doing "fdisk -l /dev/sda" gives no result (it just returns).
The device is being recognized as a ND5010 Card Reader from Neodio Technologies Corp. using lsusb and lsusb -s 003:002 -v. Furthermore the disk is recognized correctly by cat /proc/bus/usb/devices as a USB Storage Device.
Anyone know what's wrong?
You may have a problem like I did this weekend:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=110653
The Fedora/Red Hat kernels don't have multi-LUN support (basically one device with multiple disks). You can manually add the LUNs in /proc:
echo "scsi-add-single-device 0 0 0 1" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 2" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 3" > /proc/scsi/scsi
See if that helps.
Forrest
</gratitude-mode> Fantastic! Great! This is it! Thank you very much!! <gratitude-mode>
And thank you for documenting the bug. It works like a charm. I'm very content I can finally read the bugger.....
What I wonder about is, how did you find the error and how did you find the statements to correct it?
It took me an hour or two of googling to make some sense out of it. Originally I was trying to mount /dev/sda1, because I thought that it would only see one slot at a time. I eventually found Question 9 under Trouble Shooting from the FAQ on http://www.linux-usb.org/. From there it was just testing and documentation.
I created a patch for USB hotplug that should look at your scsi devices and send the lines automatically. If you get a chance, try it out (and remove the scsi-add-single-device lines you may have added elsewhere.
To use this patch, su to root and cd to /etc/hotplug. Make a backup copy of hotplug.functions (cp hotplug.functions hotplug.functions.orig), and run patch: patch -p2 < /path/to/hotplug-multilun.patch
Unplug the USB card reader, and plug it back in, and then look at /proc/scsi/scsi to see if you have more than one device for you card reader. I have only tested it a few times, but it works for me. Let me know how it works for you. If it works for you, I'll post it on bugzilla.
Forrest
Taylor, ForrestX wrote:
You may have a problem like I did this weekend:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=110653
The Fedora/Red Hat kernels don't have multi-LUN support (basically one device with multiple disks). You can manually add the LUNs in /proc:
echo "scsi-add-single-device 0 0 0 1" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 2" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 3" > /proc/scsi/scsi
See if that helps.
Forrest
What I wonder about is, how did you find the error and how did you find the statements to correct it?
It took me an hour or two of googling to make some sense out of it. Originally I was trying to mount /dev/sda1, because I thought that it would only see one slot at a time. I eventually found Question 9 under Trouble Shooting from the FAQ on http://www.linux-usb.org/. From there it was just testing and documentation.
<arrgh> I think I have seen this faq and this question but I had no idea what a multi-lun is, so I didn't understand it (now I do ...)
I created a patch for USB hotplug that should look at your scsi devices and send the lines automatically. If you get a chance, try it out (and remove the scsi-add-single-device lines you may have added elsewhere.
I did. It works. However, in stead of unplugging it (I'm lazy) I restarted Linux and, low and behold ... the device got (completely) recognized. Congratulations.
Something strange though... When I first restarted, the kernel started booting, gave a few sda, sdb, sdc detection errors (no disk in device), and restarted againg. As I could not reproduce the error, I suppose I can't tell any more than that.
Anyway, probably it's safe to submit.
To use this patch, su to root and cd to /etc/hotplug. Make a backup copy of hotplug.functions (cp hotplug.functions hotplug.functions.orig), and run patch: patch -p2 < /path/to/hotplug-multilun.patch
Unplug the USB card reader, and plug it back in, and then look at /proc/scsi/scsi to see if you have more than one device for you card reader. I have only tested it a few times, but it works for me. Let me know how it works for you. If it works for you, I'll post it on bugzilla.
Forrest
--- /etc/hotplug/hotplug.functions.orig 2003-11-24 12:12:27.000000000 -0800 +++ /etc/hotplug/hotplug.functions 2003-11-24 12:23:16.000000000 -0800 @@ -171,6 +171,19 @@ fi if echo "$MODULE" | grep -q "usb-storage" > /dev/null 2>&1 ; then [ -x /usr/sbin/updfstab ] && /usr/sbin/updfstab
# Grab the scsi variables from /proc/scsi/scsiSCSI=`grep -B 1 "USB Card Reader" /proc/scsi/scsi | grep Host | awk '{print $2}' | awk -Fscsi '{print $2}'`CHANNEL=`grep -B 1 "USB Card Reader" /proc/scsi/scsi | grep Host | awk '{print $4}' | bc -l`ID=`grep -B 1 "USB Card Reader" /proc/scsi/scsi | grep Host | awk '{print $6}' | bc -l`mesg Adding multi-LUN support# Add LUNs 1-15i=1while [[ $i -lt 16 ]];doecho "scsi-add-single-device $SCSI $CHANNEL $ID $i" >> /proc/scsi/scsii=`echo "$i+1" | bc -l` fi donedone}
Anyway, Forrest: thanks for your help. I am indebted to you.
Guus.
On Mon, 2003-11-24 at 02:58, James Drabb wrote:
On Sun, 2003-11-23 at 19:13, Scott Burns wrote:
In my experience, if the hotplug code finds it, it also mounts itautomagically.
Really? Did you have to do anything special to get it to auto mount? I have never seen RH8, RH9 or FC1 auto mount any of my USB mass-storage devices. When I plug in my mass-storage digital camera, the mass-storage module is loaded, but that is all. When I put a smart media card into my PCMCIA reader, again the modules are loaded but /dev/hde1 is never mounted, the same goes for a USB thumb drive and my mass-storage MP3 recorder/player. Is there anyway to turn this feature on? I had to make the entries in /etc/fstab and then I right click on the Gnome desktop and mount what I want under the disks menu. I did notice that Mandrake auto mounts these devices, is there any reason that FC1 does not?
Jim Drabb
This is what I needed to do for my USB camera. I have a FujiFilm FinePix 2600.
Step 1: tail the log.
'tail -f /var/log/messages' and plugin the camera. This is what I get in the log.
kernel: Vendor: Fujifilm Model: FinePix 1400Zoom Rev: 0100 kernel: Type: Direct-Access ANSI SCSI revision: 02 kernel: Attached scsi removable disk sdc at scsi2, channel 0, id 0, lun 0
Step 2: create entry in /etc/updfstab.conf.
If you device is "recognised" by the entries in /etc/updfstab.conf.default then you are in luck and it will automatically update /etc/fstab for you. If not, like me, then you need to create your oen entry. I added the following to /etc/updfstab.conf
device camera { partition 1 match hd Fujifilm }
Step 3: mount the sucker.
Unplug the camera wait a few seconds and plug it in again. check out /etc/fstab and there should be a new entry for /mnt/camera. I simply right-click on the Gnome desktop -> Disks -> camera.
You and also type it manually if need be: 'mount /mnt/camera'
On Tue, 2003-11-25 at 02:35, Taylor, ForrestX wrote:
Anyone know what's wrong?
You may have a problem like I did this weekend:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=110653
The Fedora/Red Hat kernels don't have multi-LUN support (basically one device with multiple disks). You can manually add the LUNs in /proc:
echo "scsi-add-single-device 0 0 0 1" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 2" > /proc/scsi/scsi echo "scsi-add-single-device 0 0 0 3" > /proc/scsi/scsi
See if that helps.
Forrest
In /etc/modules.conf:
options scsi_mod max_scsi_luns=<number_less_than_or_equal_to_128>
Then rebuild your initrd with:
# mkinitrd -f /boot/initrd-<kernel_version>.img <kernel_version>
Reboot, be happy with your new luns.
Hi,
the patch worked nearly perfect. Only I needed to grep for "Card Reader" instead of "USB Card Reader". After this change everything works fine.
Thanks a lot for this patch!
Holger
On Tue, 2003-11-25 at 02:25, Taylor, ForrestX wrote:
I created a patch for USB hotplug that should look at your scsi devices and send the lines automatically. If you get a chance, try it out (and remove the scsi-add-single-device lines you may have added elsewhere.
To use this patch, su to root and cd to /etc/hotplug. Make a backup copy of hotplug.functions (cp hotplug.functions hotplug.functions.orig), and run patch: patch -p2 < /path/to/hotplug-multilun.patch
Unplug the USB card reader, and plug it back in, and then look at /proc/scsi/scsi to see if you have more than one device for you card reader. I have only tested it a few times, but it works for me. Let me know how it works for you. If it works for you, I'll post it on bugzilla.
Forrest
Hi,
What does this mean: svc: short len 4, dropping request svc: short len 4, dropping request svc: short len 4, dropping request svc: short len 4, dropping request
Chris
Chris Sparks wrote:
Hi,
What does this mean?: svc: short len 4, dropping request svc: short len 4, dropping request svc: short len 4, dropping request svc: short len 4, dropping request
Chris
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
Hi everyone,
Is there a way to increase the swap partition size after I have already have it setup on my system? I seem to have too little a swap partition (256 MB) and this is what Fedora originally gave me. I have a 120 GB hard drive so I can make this 1 GB for all that matters.
I just didn't want to disrupt the main partition since I have finally got it installed to some half way level and I don't want to install again.
Any help appreciated.
Chris
Check into mkswap, which can be used to create a swap file within a partition.
On Sat, 2003-12-13 at 23:14, Chris Sparks wrote:
Hi everyone,
Is there a way to increase the swap partition size after I have already have it setup on my system? I seem to have too little a swap partition (256 MB) and this is what Fedora originally gave me. I have a 120 GB hard drive so I can make this 1 GB for all that matters.
I just didn't want to disrupt the main partition since I have finally got it installed to some half way level and I don't want to install again.
Any help appreciated.
Chris
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
This isn't possibly going to create another swap file is it? I would just like to have one swap file.
C.
Kevin Krieser wrote:
Check into mkswap, which can be used to create a swap file within a partition.
On Sat, 2003-12-13 at 23:14, Chris Sparks wrote:
Hi everyone,
Is there a way to increase the swap partition size after I have already have it setup on my system? I seem to have too little a swap partition (256 MB) and this is what Fedora originally gave me. I have a 120 GB hard drive so I can make this 1 GB for all that matters.
I just didn't want to disrupt the main partition since I have finally got it installed to some half way level and I don't want to install again.
Any help appreciated.
Chris
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
On Sunday 14 December 2003 05:04, Chris Sparks wrote:
Chris Sparks wrote:
Hi,
What does this mean?: svc: short len 4, dropping request svc: short len 4, dropping request svc: short len 4, dropping request svc: short len 4, dropping request
Chris
Using Google for this shows a few hits. It seems related to RPC services. If you look about 1/2 down the following page you'll see the source code for the error you're getting.
http://bernia.disca.upv.es/lxr/http/source/net/sunrpc/svc.c#L24
Do you have services running associated with portmapper that are giving you problems?
Regards, Mike Klinke
On Sunday 14 December 2003 05:35, Chris Sparks wrote:
Hi Mike,
Do you have services running associated with portmapper that are giving you problems?
I don't know. I have whatever default action that Fedora installed with.
Chris
I tend not to use services that require it but I think if you execute:
rpcinfo -p
it'll give you a list of the services you're running that are using it. I'd try turning them off to see if you can isolate what's going on.
Regards, Mike Klinke
On Sat, Dec 13, 2003 at 09:14:40PM -0800, Chris Sparks wrote:
Hi everyone,
Is there a way to increase the swap partition size after I have already have it setup on my system? I seem to have too little a swap partition (256 MB) and this is what Fedora originally gave me. I have a 120 GB hard drive so I can make this 1 GB for all that matters.
I just didn't want to disrupt the main partition since I have finally got it installed to some half way level and I don't want to install again.
Any help appreciated. Chris
The "easy" thing to do in this case is abandon the miminal swap you have and just make another (larger) swap partition to be used instead. The size of a swap partition is a matter of debate, but generally it sould be equal to or no more than twice as large as your physical memory.
If you actually have space on the disk around the swap partition that you can resize into, there is nothing that prevents resizing the partition and running "mkswap" on the resized space. There's no real magic about swap files/partitions. Of course, you'll have to resize and mkswap in "single user mode" with swap disabled while you're manipulating the system.
I see your concern about having more than one swap file/partition, but I'd suggest thtat this isn't really something to worry about. Swap space shouldn't be a consideration in normaml operation, and using more than 1 file/partition should not effect efficiency.
HTH
Hi Gregory,
The "easy" thing to do in this case is abandon the miminal swap you have and just make another (larger) swap partition to be used instead. The size of a swap partition is a matter of debate, but generally it sould be equal to or no more than twice as large as your physical memory.
Since I originally started with 128 MB this makes sense why it suggested 256 MB. I had to increase the memory to 384 MB because of the boat load of seg faults I was getting.
If you actually have space on the disk around the swap partition that you can resize into, there is nothing that prevents resizing the partition and running "mkswap" on the resized space. There's no real magic about swap files/partitions. Of course, you'll have to resize and mkswap in "single user mode" with swap disabled while you're manipulating the system.
My swap is at the end of the hard disk so I would be possible to extend into it. Actually I have the boot first, / second, and the swap last. I just didn't want to clobber anything on the root disk if I resized into it with the swap. How does one know if it is safe to go into those sectors without worry?
Also how do I go into single user mode?
I see your concern about having more than one swap file/partition, but I'd suggest thtat this isn't really something to worry about. Swap space shouldn't be a consideration in normaml operation, and using more than 1 file/partition should not effect efficiency.
I agree, however, I am still intruding into the root partitition anyway.
Chris
I would just add another swap partition. To give you an idea some of my bigweb servers have 4 2gig swap partitions. And that is with 2 – 4 gigs of ram.
What does the box do?
If you are going to do a lot of swapping then you might want to add pri=0 to the fstab.
Here is what my fstab looks like.
/dev/sda3 swap swap defaults,pri=0 0 0
/dev/sdb2 swap swap defaults,pri=0 0 0
/dev/sda2 swap swap defaults,pri=0 0 0
/dev/sdb3 swap swap defaults,pri=0 0 0
With pri=0 swap will be used on all partition at the same time. When you do not set pri=0 one swap partition will fill up first then the next and so on.
But that would be over kill for most people. Only reason I have my swap setup that way is due to the way apache locks memory when you have 2000+ apache processes running.
On Sat, 2003-12-13 at 22:16, Chris Sparks wrote:
Hi Gregory,
The "easy" thing to do in this case is abandon the miminal swap you have and just make another (larger) swap partition to be used instead. The size of a swap partition is a matter of debate, but generally it sould be equal to or no more than twice as large as your physical memory.
Since I originally started with 128 MB this makes sense why it suggested 256 MB. I had to increase the memory to 384 MB because of the boat load of seg faults I was getting.
If you actually have space on the disk around the swap partition that you can resize into, there is nothing that prevents resizing the partition and running "mkswap" on the resized space. There's no real magic about swap files/partitions. Of course, you'll have to resize and mkswap in "single user mode" with swap disabled while you're manipulating the system.
My swap is at the end of the hard disk so I would be possible to extend into it. Actually I have the boot first, / second, and the swap last. I just didn't want to clobber anything on the root disk if I resized into it with the swap. How does one know if it is safe to go into those sectors without worry?
Also how do I go into single user mode?
I see your concern about having more than one swap file/partition, but I'd suggest thtat this isn't really something to worry about. Swap space shouldn't be a consideration in normaml operation, and using more than 1 file/partition should not effect efficiency.
I agree, however, I am still intruding into the root partitition anyway.
Chris
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
I can appreciate this, however, did you do this prior to installing and using the hard drive? I don't want to move or add swap partititions if "good" data is already present there. How can I check for this?
Chris...
Chris Miller wrote:
I would just add another swap partition. To give you an idea some of my bigweb servers have 4 2gig swap partitions. And that is with 2 – 4 gigs of ram.
What does the box do?
If you are going to do a lot of swapping then you might want to add pri=0 to the fstab.
Here is what my fstab looks like.
/dev/sda3 swap swap defaults,pri=0 0 0
/dev/sdb2 swap swap defaults,pri=0 0 0
/dev/sda2 swap swap defaults,pri=0 0 0
/dev/sdb3 swap swap defaults,pri=0 0 0
With pri=0 swap will be used on all partition at the same time. When you do not set pri=0 one swap partition will fill up first then the next and so on.
But that would be over kill for most people. Only reason I have my swap setup that way is due to the way apache locks memory when you have 2000+ apache processes running.
On Sat, 2003-12-13 at 22:16, Chris Sparks wrote:
Hi Gregory,
The "easy" thing to do in this case is abandon the miminal swap you have and just make another (larger) swap partition to be used instead. The size of a swap partition is a matter of debate, but generally it sould be equal to or no more than twice as large as your physical memory.
Since I originally started with 128 MB this makes sense why it suggested 256 MB. I had to increase the memory to 384 MB because of the boat load of seg faults I was getting.
If you actually have space on the disk around the swap partition that you can resize into, there is nothing that prevents resizing the partition and running "mkswap" on the resized space. There's no real magic about swap files/partitions. Of course, you'll have to resize and mkswap in "single user mode" with swap disabled while you're manipulating the system.
My swap is at the end of the hard disk so I would be possible to extend into it. Actually I have the boot first, / second, and the swap last. I just didn't want to clobber anything on the root disk if I resized into it with the swap. How does one know if it is safe to go into those sectors without worry?
Also how do I go into single user mode?
I see your concern about having more than one swap file/partition, but I'd suggest thtat this isn't really something to worry about. Swap space shouldn't be a consideration in normaml operation, and using more than 1 file/partition should not effect efficiency.
I agree, however, I am still intruding into the root partitition anyway.
Chris
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
On Sat, 13 Dec 2003, Chris Sparks wrote:
Hi Gregory,
The "easy" thing to do in this case is abandon the miminal swap you have and just make another (larger) swap partition to be used instead. The size of a swap partition is a matter of debate, but generally it sould be equal to or no more than twice as large as your physical memory.
Since I originally started with 128 MB this makes sense why it suggested 256 MB. I had to increase the memory to 384 MB because of the boat load of seg faults I was getting.
If your disk is fully allocated you cannot increase your swap partition without risking damage to the existing file systems. (a backup and restore will be needed)
However most swap related seg faults are book keeping checks not active block transfers so swap to files is a good solution! Compare and contrast calloc() and malloc().
When adding swap files, you will want to add pri=0 to the fstab for your existing 'raw' swap partition.
Then add your swap file with a larger priority to the system and fstab.
If you already have a swap file in addition to a swap partition and are still running out of 'virtual' memory you have the option of rebuilding the swap file to be larger or simply adding a second swap file at a higher priority.
I happen to like having layers of swap and when things actively swap to the high priority swap files I likely have an application or mix of applications to get fixed. Adding a swap file is much safer (IMO) than repartitioning a disk with data.
Do you have an old 2-4GB disk you can use for swap? If you can add a dedicated swap device you may want it to have the best priority if it is fast enough.
See also "ulimit", there are lots of 'student' programs that would allocate memory up to the imposed limits then work within those bounds imposed by the administrator. Since most students never had unlimited resources they never code for it. The reverse may be true, check also ulimits just in case it is not swap that is the limiting resource.
Recursion is cool but.... # bc define f ( x ) { if( x != 1) return( x * f(x-1) ) if(x == 1 ) return(1) }
x = 15 f(x) x = 200000 f(x) etc...
Unless you want to try to resize your partition, using tools like resize2fs and fdisk (which sound risky),
Is there some technical reason you can't have the swap in 2 chunks? If the priorities are set correctly, then the swap partition should be used before the swap file would be.
Some other Unixes have traditionally also used the swap partition as a dump after a kernel panic, but I don't believe that Linux does this.
On Sat 2003-12-13 at 23:27, Chris Sparks wrote:
This isn't possibly going to create another swap file is it? I would just like to have one swap file.
C.
Kevin Krieser wrote:
Check into mkswap, which can be used to create a swap file within a partition.
On Sat, 2003-12-13 at 23:14, Chris Sparks wrote:
Hi everyone,
Is there a way to increase the swap partition size after I have already have it setup on my system? I seem to have too little a swap partition (256 MB) and this is what Fedora originally gave me. I have a 120 GB hard drive so I can make this 1 GB for all that matters.
I just didn't want to disrupt the main partition since I have finally got it installed to some half way level and I don't want to install again.
Any help appreciated.
Chris
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
Hi all,
I did try to add a SWAP file and all of the suggestions helped. I still tried to compile my application and it took all of the 1G and 256MB I had as storage so I am guessing that there is an issue with the compilation environment I am using. I am using a custom gcc which probably doesn't play nice on Fedora.
Chris
Tom Mitchell wrote:
On Sat, 13 Dec 2003, Chris Sparks wrote:
Hi Gregory,
The "easy" thing to do in this case is abandon the miminal swap you have and just make another (larger) swap partition to be used instead. The size of a swap partition is a matter of debate, but generally it sould be equal to or no more than twice as large as your physical memory.
Since I originally started with 128 MB this makes sense why it suggested 256 MB. I had to increase the memory to 384 MB because of the boat load of seg faults I was getting.
If your disk is fully allocated you cannot increase your swap partition without risking damage to the existing file systems. (a backup and restore will be needed)
However most swap related seg faults are book keeping checks not active block transfers so swap to files is a good solution! Compare and contrast calloc() and malloc().
When adding swap files, you will want to add pri=0 to the fstab for your existing 'raw' swap partition.
Then add your swap file with a larger priority to the system and fstab.
If you already have a swap file in addition to a swap partition and are still running out of 'virtual' memory you have the option of rebuilding the swap file to be larger or simply adding a second swap file at a higher priority.
I happen to like having layers of swap and when things actively swap to the high priority swap files I likely have an application or mix of applications to get fixed. Adding a swap file is much safer (IMO) than repartitioning a disk with data.
Do you have an old 2-4GB disk you can use for swap? If you can add a dedicated swap device you may want it to have the best priority if it is fast enough.
See also "ulimit", there are lots of 'student' programs that would allocate memory up to the imposed limits then work within those bounds imposed by the administrator. Since most students never had unlimited resources they never code for it. The reverse may be true, check also ulimits just in case it is not swap that is the limiting resource.
Recursion is cool but.... # bc define f ( x ) { if( x != 1) return( x * f(x-1) ) if(x == 1 ) return(1) }
x = 15 f(x) x = 200000 f(x) etc...