# 2.6-test9, usb storage devices, and devfs problems

## emcnabb

When I'm using a 2.4.22 kernel I'm able to mount my external usb harddrive without any problems. When I'm using a 2.6-test9 kernel (with the same modules compiled in as far as I can tell), I get the following error:

```

[ root@moccasin:/home/emcnabb ] mount /dev/sda1 /mnt/backup/

mount: special device /dev/sda1 does not exist

```

It looks like devfs isn't creating the device (/dev/sdXX) that it does in 2.4.22. I'm still a little confused about how devfs in gentoo interacts with a 2.6 kernel. Does anyone know how to setup devfs so I can access that drive? Thanks.

----------

## ckdake

run

```
dmesg
```

before and after you insert the device.  What shows up there? I am using the most recent mm-sources and mine gives me the following:

 *Quote:*   

> MCE: The hardware reports a non fatal, correctable incident occurred on CPU 0.
> 
> Bank 2: 940040000000017a
> 
> hub 2-0:1.0: new USB device on port 6, assigned address 2
> ...

 

perhaps there is an error in your dmesg that may be helpful...

[edit]looks like mine goes to /dev/sda.  i type 

```
mount /dev/sda /mnt/usbdisk
```

 and it works fine. so you may just need to change what you are typing in your mount command[edit]

----------

## emcnabb

Thanks for the help.

This is what dmesg outputs:

```

hub 3-0:1.0: new USB device on port 2, assigned address 2

scsi1 : SCSI emulation for USB Mass Storage devices

  Vendor: Sony      Model: MSC-U03           Rev: 2.00

  Type:   Direct-Access                      ANSI SCSI revision: 02

Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 0,  type 0

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 2

```

It looks like sg1 is what the device name is. I tried the following:

```

[ root@moccasin:/home/emcnabb ] mount /dev/sg1 /mnt/backup/

mount: /dev/sg1 is not a block device

[ root@moccasin:/home/emcnabb ] file /dev/sg1

/dev/sg1: symbolic link to `scsi/host1/bus0/target0/lun0/generic'

```

It seems like I'm heading in the right direction.

----------

## agrippa_cash

This thread may be of use to you.https://forums.gentoo.org/viewtopic.php?t=95531&highlight=udev

To summarize: a new device is created every time you insert the device.  I don't know how to fix it though.  

I turn off my computer when I am not using it, so device accumulation hasn't been an issue for me, except that after one cycle my I have to specify the /dev for my usb peripherals when mounting.

Of course this is exactly what I am trying to avoid, so please post if you figure out how to fix it.

EDIT:  The end of this thread shows how to eliminate the extra /dev/sd's, but I still can't find the root of the problem. https://forums.gentoo.org/viewtopic.php?t=53537&start=75

----------

## ckdake

That is kind of weird that you have so many fewer lines in your dmesg than I do. hmm.  have you tried mounting with the big long scsi address?

(/dev/scsi/host1/bus0/target0/lun0/generic)

----------

## emcnabb

Thanks all for the help; I finally got it working. It turns out that for some reason the sd_mod module wasn't getting loaded. It was treating my hard drive as a sg (generic scsi) device which isn't mountable without some form of a disk driver. Once that module is loaded, the /dev/sdX device is created by devfs. Thanks again!

----------

