LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-27-2006, 12:56 AM   #1
wearetheborg
Member
 
Registered: Sep 2004
Distribution: Mint 19.1
Posts: 298

Rep: Reputation: 41
Help with mounting external hard drive in linux


I have an external 400GB hard drive with two partitions. Its connected USB 2.0 via PCMCIA card. Windows accesses it without any problems. Mandriva unfortnately has trouble. Once in a blue moon it mount the drive, but in genral its not able to, or it may be that I'm simply giving the wrong command.

Here is the dmesg output:

Code:
dmesg |grep -i "SCSI"
SCSI subsystem initialized
scsi0 : SCSI emulation for IEEE-1394 SBP-2 Devices
scsi1 : SCSI emulation for USB Mass Storage devices
  Type:   Direct-Access                      ANSI SCSI revision: 06
scsi2 : SCSI emulation for IEEE-1394 SBP-2 Devices
SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)
SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)
 /dev/scsi/host0/bus0/target0/lun0: p1
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
  Type:   CD-ROM                             ANSI SCSI revision: 02
sr0: scsi3-mmc drive: 48x/48x writer cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr0 at scsi2, channel 0, id 0, lun 0
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdb: 781422768 512-byte hdwr sectors (400088 MB)
SCSI device sdb: 781422768 512-byte hdwr sectors (400088 MB)
 /dev/scsi/host1/bus0/target0/lun0:ip_tables: (C) 2000-2002 Netfilter core team
scsi: Device offlined - not ready after error recovery: host 1 channel 0 id 0 lun 0
SCSI error : <1 0 0 0> return code = 0x50000
scsi1 (0:0): rejecting I/O to offline device
scsi1 (0:0): rejecting I/O to offline device
scsi1 (0:0): rejecting I/O to offline device
scsi1 (0:0): rejecting I/O to offline device
scsi1 (0:0): rejecting I/O to offline device
scsi1 (0:0): rejecting I/O to offline device
scsi1 (0:0): rejecting I/O to offline device
Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0
scsi2 : destination target 0, lun 0
scsi2 : destination target 0, lun 0
scsi2 : destination target 0, lun 0
scsi2 : destination target 0, lun 0
scsi2 : destination target 0, lun 0
scsi2 : destination target 0, lun 0
scsi2 : destination target 0, lun 0
scsi2 : destination target 0, lun 0
scsi2 : destination target 0, lun 0
The HDD is the sdb one. What is scsi2 ?
My /etc/fstab contains:
Code:
/dev/sdb5 /media/usb-hdd-1 vfat users,noauto,uid=vinayak,gid=wearetheborg 0 0
/dev/sdb6 /media/usb-hdd-2 ntfs  users,noauto,uid=vinayak,gid=wearetheborg 0 0
I get the followiing error when doing mount:
Code:
# mount /media/usb-hdd-1
mount: special device /dev/sdb5 does not exist
How do I fix this ?
 
Old 12-27-2006, 05:54 AM   #2
Clemente
Member
 
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30
Hi Borg,
don't know, how terrible this timeout message
Quote:
scsi: Device offlined - not ready after error recovery: host 1 channel 0 id 0 lun 0
is.
But if your drive really contains two partitions, it would be strange, if the corresponding device files are /dev/sdb5 and /dev/sdb6 as quoted in your /etc/fstab.
I would try to do a manual mount (as root) like
Code:
mount /dev/sdb1 /mnt/mymountpoint
ls -l /mnt/mymountpoint
The mountpoint must exist. ;-) If this manual mount works, simply modify your fstab to the correct device files. Don't know the mandriva world. But keep in mind, that it is possible, that your external hard disc becomes another device next boot. E.g. /dev/sdc.
You can list all device files for your sdb with "ls -l /dev/sdb*".
Good luck,
Clemente
 
Old 12-27-2006, 08:15 AM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
If both partitions on the drive are 'extended' partitions then sdb5 and sdb6 would be correct.

if you were to unplug the USB drive then opena shell and type

tail -f /var/log/messages

Then plug the drive back in, you should see exactly how the system is detecting it and what drive assignments it gives the drive..
 
Old 12-27-2006, 08:31 AM   #4
Clemente
Member
 
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30
You (@farslayer) are right, sorry. Seems, that I answered to quick. ;-)
In addition to the messages output, an "fdisk -l" with drive plugged in could be useful.
Greets,
Clemente
 
Old 12-27-2006, 08:52 AM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I second clemente

If the external disks are detected by the kernel it will be listed in fdisk -l

There after it is only a matter of mounting it.

I notice the modern kernels will automatically keep on detecting the the presence of USB devices.
 
Old 12-27-2006, 06:18 PM   #6
wearetheborg
Member
 
Registered: Sep 2004
Distribution: Mint 19.1
Posts: 298

Original Poster
Rep: Reputation: 41
I turned off the HDD and turned it back again,
Code:
fdisk -l

Disk /dev/hda: 60.0 GB, 60011642880 bytes
240 heads, 63 sectors/track, 7752 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1067     8060440+   7  HPFS/NTFS
/dev/hda2            2304        2440     1030176   82  Linux swap / Solaris
/dev/hda3            2441        7752    40158720    5  Extended
/dev/hda4            1067        2303     9350208    c  W95 FAT32 (LBA)
/dev/hda5            2441        3409     7325608+  83  Linux
/dev/hda6            3410        7752    32833048+  83  Linux

Partition table entries are not in disk order

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       24319   195342336    c  W95 FAT32 (LBA)

Disk /dev/sdb: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       48640   390700768+   f  W95 Ext'd (LBA)
/dev/sdb5               1       41774   335549592    c  W95 FAT32 (LBA)
/dev/sdb6           41775       48640    55151113+   7  HPFS/NTFS
The external HDD is question is /dev/sdb
There is also another extrenal HDD on /dev/sda1

Then I just did
mount /media/usb-hdd-1, and it worked,
I'll update when it starts acting iffy again.
Its only the secound time when it has mounted.

Last edited by wearetheborg; 12-27-2006 at 06:19 PM.
 
Old 12-29-2006, 03:31 PM   #7
wearetheborg
Member
 
Registered: Sep 2004
Distribution: Mint 19.1
Posts: 298

Original Poster
Rep: Reputation: 41
Now on rebooting the disk is again giving problems. Its missing in fdisk output:
Code:
fdisk -l

Disk /dev/hda: 60.0 GB, 60011642880 bytes
240 heads, 63 sectors/track, 7752 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1067     8060440+   7  HPFS/NTFS
/dev/hda2            2304        2440     1030176   82  Linux swap / Solaris
/dev/hda3            2441        7752    40158720    5  Extended
/dev/hda4            1067        2303     9350208    c  W95 FAT32 (LBA)
/dev/hda5            2441        3409     7325608+  83  Linux
/dev/hda6            3410        7752    32833048+  83  Linux

Partition table entries are not in disk order

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       24319   195342336    c  W95 FAT32 (LBA)
Code:
dmesg |grep -i "SCSI"
SCSI subsystem initialized
scsi0 : SCSI emulation for USB Mass Storage devices
scsi1 : SCSI emulation for IEEE-1394 SBP-2 Devices
scsi2 : SCSI emulation for USB Mass Storage devices
  Type:   CD-ROM                             ANSI SCSI revision: 02
sr0: scsi3-mmc drive: 48x/48x writer cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr0 at scsi1, channel 0, id 0, lun 0
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)
SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)
 /dev/scsi/host0/bus0/target0/lun0: p1
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdb: 781422768 512-byte hdwr sectors (400088 MB)
SCSI device sdb: 781422768 512-byte hdwr sectors (400088 MB)
 /dev/scsi/host2/bus0/target0/lun0:<6>e100: eth2: e100_watchdog: link up, 100Mbps, full-duplex
scsi: Device offlined - not ready after error recovery: host 2 channel 0 id 0 lun 0
SCSI error : <2 0 0 0> return code = 0x50000
scsi2 (0:0): rejecting I/O to offline device
scsi2 (0:0): rejecting I/O to offline device
scsi2 (0:0): rejecting I/O to offline device
scsi2 (0:0): rejecting I/O to offline device
scsi2 (0:0): rejecting I/O to offline device
scsi2 (0:0): rejecting I/O to offline device
scsi2 (0:0): rejecting I/O to offline device
Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0
Is it a bug with mandriva ?
The disk mounts fine in SLED10.
 
  


Reply



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
mounting external hard drive perrywillis@cox.net SUSE / openSUSE 5 10-16-2006 01:22 AM
Mounting my external hard drive... Azzath Linux - Hardware 8 02-26-2005 03:27 AM
mounting an external hard drive adin Linux - Hardware 1 01-04-2005 04:18 AM
external hard drive mounting. gonus Debian 5 08-27-2004 02:51 PM
Mounting external hard drive gadgetboy Linux - Newbie 3 02-02-2003 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration