hello,

I find the answer in FAQs of www.linux-usb.org as following:
----------------------------------------------------------------------------
------------------------------
Q: Why do I only see one device from my multipurpose storage device?

A:Some distributions (notably Red Hat) turn off the kernel option
CONFIG_SCSI_MULTI_LUN. This prevents usb-storage from automatically
detecting all the devices in your removable storage device. You can either
recompile your kernel with this option enabled or (if your distribution
supports this) add the following line to /etc/modules.conf;

options scsi_mod max_scsi_luns=15

If you do not want to do this for all SCSI devices then you can tell the
kernel to scan for a specific device using;

echo >/proc/scsi/scsi "scsi add-single-device 0 0 0 1"

The first zero is the host id (so it is zero if this is your first "SCSI"
adapter, check "cat /proc/scsi/scsi" to see which is your USB Storage
device), the second the channel (which for usb-storage should always be zero
I believe), the third is the target (which again is always 0 for
usb-storage) and the last is the LUN. LUN 0 is the only one probed if this
kernel option is off, so you'd need to repeat this command as root for every
media type your device accepts increasing the LUN number.
----------------------------------------------------------------------------
------------------------------
If I enabled CONFIG_SCSI_MULTI_LUN during kernel configuration, it still
can't automatically detect LUN1. I am using FC2 with linux-2.6.8.1 now!
also, I modified /etc/modules.conf as above , but didn't work. 

However, I can only use "echo >/proc/scsi/scsi "scsi add-single-device 0 0 0
1" " to let the system detect LUN1 on /dev/sdb.

since now I can find the two disks of my usb stick, How can I merge them
into one?

thanks!


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alan Stern
Sent: Monday, September 13, 2004 10:45 PM
To: Hou Xiang ZHU
Cc: USB users list
Subject: RE: [Linux-usb-users] USB Flash stick became two disks,linux can
only find one!


On Sun, 12 Sep 2004, Stephen J. Gowdy wrote:

> You probably need to create a new partition table.
> 
> On Mon, 13 Sep 2004, Hou Xiang ZHU wrote:
> 
> > hello, disk gurus!
> >
> > I should say my flash disk became two separate disks, one is 2M and 
> > the other is 30M, under windows it can find the two disk but can't 
> > merge it! how to merge these 2 part into one under windows?
> > (Since under windows2000, it can find the two disk!)
> >
> > But under linux, it can only find the first 2M disk which is 
> > /dev/sda,I tried to use "fdisk /dev/sda", but didn't succeed. I try 
> > to alter the C/H/S but can't!
> >
> > Could you please check what is the problem?
> >
> > ------------------------------------------------------------------
> > The following is what I am try to to with my Flash Disk,which 
> > normally has 32M capacity. But since I mounted a 2M iso file to it 
> > and later I messed it up with Windows format tool, it became 2 disk 
> > under windows, (NOT even 2 partitions!), The first is 2M and the 
> > second is 30M under windows.
> >
> > But in Linux, I can only find the first disk of 2M, which is 
> > /dev/sda. and I tried to use "fdisk /dev/sda" to recover the whole 
> > disk, but didn't succeed!
> >
> > ------------------------------------------------------------------
> > if I use "fdisk /dev/sdb" I got:
> > ---------------------------------------------
> > [EMAIL PROTECTED] root]# fdisk /dev/sdb
> > Unable to open /dev/sdb
> > [EMAIL PROTECTED] root]#
> > ---------------------------------------------
> >
> > The following is using: "fdisk /dev/sda"
> > ------------------------------------------------------------------
> > The number of cylinders for this disk is set to 4096.
> > There is nothing wrong with that, but this is larger than 1024, and 
> > could in certain setups cause problems with:
> > 1) software that runs at boot time (e.g., old versions of LILO)
> > 2) booting and partitioning software from other OSs
> >    (e.g., DOS FDISK, OS/2 FDISK)
> >
> >                     <-------(press 'p')
> > Command (m for help):
> > Disk /dev/sda: 2 MB, 2097152 bytes
> > 1 heads, 1 sectors/track, 4096 cylinders, total 4096 sectors Units = 
> > cylinders of 1 * 512 = 512 bytes
> >
> >    Device Boot    Start       End    Blocks   Id  System
> > /dev/sda1             2      4096      2047+   e  Win95 FAT16 (LBA)

This sounds like a more serious problem, one that fdisk won't be able to 
fix.  In fact, from the description it sounds like the device is 
presenting itself as two LUNs!

To find out what's really happening, here's what you need to do.  Turn on 
the usb-storage verbose debugging option in your kernel configuration and 
rebuild the driver.  Then post a copy of your system log, showing what 
happens when you plug in the flash disk.  There will be lots of debugging 
information, and it may show what went wrong.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project
Admins to receive an Apple iPod Mini FREE for your judgement on who ports
your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to