LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 03-06-2008, 02:11 AM   #1
draeath
LQ Newbie
 
Registered: Jul 2007
Location: Atlanta Area, GA, USA
Distribution: CentOS/RH/Debian
Posts: 24

Rep: Reputation: 0
multiple-drive mass storage


I'm running slamd64 - a 64-bit port of slackware (version 12)

I have a Sansa e270r, which under distros like Debian and OpenSuSE, shows up as two separate scsi-generic devices. Assuming I have a flash drive already in /dev/sda (i do in my later pastebins), I should get the Sansa's drive on /dev/sdb, and the Sansa's micro-SD slot on /dev/sdc.

I'm only getting the drive on /dev/sdb.

This is a custom kernel - and I think I may have configured something wrong? It's also possible it's user-space, but dmesg doesn't seem to lead me in that direction. Anyways - now to the useful information:

dmesg output: (see below)
kernel config: http://pastebin.com/f4a58aca5

Note, in the dmesg output above, I already have a USB flash drive in (and on /dev/sda). This issue occurs regardless of any other devices present.

Any ideas what is going on?

Last edited by draeath; 03-06-2008 at 10:17 AM. Reason: omitted distro -
 
Old 03-06-2008, 02:39 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Is the Sansa e270r an external drive. For all external drives either allow the system's hal & udev system detect the device and mount it under /media, or use "UUID=" or "LABEL=" instead of a device node in an /etc/fstab. Don't use a directory under /media for the mount point in this case. /media is used for auto mounted removable media. Hal creates and destroys directories under /media. It would be better to use /mnt. You can't rely on the same device node being used every time. That is normal for removable devices.

---

OK, I just looked up Sansa 227r on Google. It is a media device. Does it use a protocol such as mtp or do you interface with it as a fat32 drive. Looking at the specs, it says that it has a microSD expansion slot. That could be what you are seeing as another disk. Suppose that you plug in the device and the Sansa's hard drive is using /dev/sdb and the microSD drive is /dev/sdc. You can get the filesytem UUID from the commands:
udevinfo -q env -n /dev/sdb1

usevinfo -q env -n /dev/sdc1

Here is an example of an fstab entry for a pendrive that I had Christmas music on:
Code:
UUID=3B69-1AFD /mnt/xmas  vfat  rw,noauto,nosuid,nodev,noatime,flush,user,uid=jschiwal,gid=jschiwal,fmask=117,dmask=007,utf8,shortname=lower 0 0
The "noauto" option prevents the system from hanging when you boot up and the device isn't present. The "noatime" option you will want to use on the microSD partition. This will reduce the number of times that the device is written to. The "uid" and "gid" change the ownership and group ownership of the mounted device. The fmask & dmask values allow access to the group and user. Using the "UUID=" entry in /etc/fstab together with the user option means that you will be able to mount the filesystems as a regular user. Other users will not be able to access it.
 
Old 03-06-2008, 10:12 AM   #3
draeath
LQ Newbie
 
Registered: Jul 2007
Location: Atlanta Area, GA, USA
Distribution: CentOS/RH/Debian
Posts: 24

Original Poster
Rep: Reputation: 0
Thank you for your detailed reply!

You missed an important bit, however. The kernel is not detecting the second component - it's not to the point where HAL or anything could touch it.

It's (supposed to) read as two separate vfat drives. Currently only the internal drive is detecting. If I boot up into a liveCD or such, it works fine. Also works fine in Windows, for what that's worth.


For convenience I'm going to put the dmesg log into the thread rather than on pastebin...
 
Old 03-06-2008, 10:13 AM   #4
draeath
LQ Newbie
 
Registered: Jul 2007
Location: Atlanta Area, GA, USA
Distribution: CentOS/RH/Debian
Posts: 24

Original Poster
Rep: Reputation: 0
Code:
usb 1-3.3: new high speed USB device using ehci_hcd and address 8
usb 1-3.3: configuration #128 chosen from 1 choice
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 8
usb-storage: waiting for device to settle before scanning
scsi 3:0:0:0: Direct-Access     SanDisk  Sansa e270R           PQ: 0 ANSI: 0
sd 3:0:0:0: [sdb] 11739136 512-byte hardware sectors (6010 MB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 45 00 00 00
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] 11739136 512-byte hardware sectors (6010 MB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 45 00 00 00
sd 3:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 3:0:0:0: [sdb] Attached SCSI removable disk
sd 3:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
cdrom: This disc doesn't have any tracks I recognize!
 
Old 03-06-2008, 10:16 AM   #5
draeath
LQ Newbie
 
Registered: Jul 2007
Location: Atlanta Area, GA, USA
Distribution: CentOS/RH/Debian
Posts: 24

Original Poster
Rep: Reputation: 0
Kernel configuration won't fit... too big for the forum.
Please look at it here.
 
Old 03-08-2008, 09:52 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Try looking at the microSD card in a reader. Some embedded devices don't use fat32 filesystems. Some even use SQLite for serving files and the metadata in a database file instead. The device may not offer the microSD card up to the external usb interface.

Code:
Some of these modules may be needed in the player if it ran on Linux:
#
#
#
# USB Gadget Support
#
#
#
# CONFIG_USB_GADGET is not set
#
CONFIG_MMC=m
#
# CONFIG_MMC_DEBUG is not set
#
# CONFIG_MMC_UNSAFE_RESUME is not set
#
 
#
#
#
# MMC/SD Card Drivers
#
#
#
CONFIG_MMC_BLOCK=m
#
CONFIG_MMC_BLOCK_BOUNCE=y
#
CONFIG_SDIO_UART=m
#
 
#
#
#
# MMC/SD Host Controller Drivers
#
#
#
CONFIG_MMC_SDHCI=m
#
CONFIG_MMC_RICOH_MMC=m
#
CONFIG_MMC_WBSD=m
#
CONFIG_MMC_TIFM_SD=m
#
CONFIG_NEW_LEDS=y
#
CONFIG_LEDS_CLASS=m
However at your end, the usb drive support you have would be enough.

The more I think about it, the more it seems to me that since it is a removable device, you are expected connect the card to the computer directly if you want to copy songs or videos from it or add new material.
 
Old 03-11-2008, 05:53 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
I was looking through some howtos installed with the "howto" document package, looking for an Encrypting Disk howto. There is a Linux disk on a chip howto. It is probably on the "www.tldp.org" website as well.
 
  


Reply

Tags
kernel, scsi, slackware, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Mass Storage Daniboy Linux - Software 10 09-12-2005 08:30 AM
Problem with USB mass storage drive drewsa Linux - Newbie 1 04-18-2005 01:07 AM
Cannot Install Bootloader, XP on hda, Linux on sdb (USB MASS STORAGE DRIVE) neo5064 Linux - Newbie 3 12-29-2003 04:57 PM
usb mass storage Erwan Linux - Hardware 6 07-08-2003 05:39 PM
usb mass storage mohapi Linux - Hardware 3 06-03-2003 12:44 AM


All times are GMT -5. The time now is 01:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration