Operating System - Linux
1822513 Members
2453 Online
109642 Solutions
New Discussion юеВ

Re: USB drive on redhat 8

 
SOLVED
Go to solution
Tammy Liang
Regular Advisor

USB drive on redhat 8

I install USB IOMEGA USB drive, and try to mount this USB drive to /usbmount file system. I get error message below:
"/dev/sdb1 is not a valid block device".

I checked there are usb modules loaded, see below:
usb-storage 74720 0 (unused)
usb-ohci 21608 0 (unused)
usbcore 78944 1 [usb-storage hid usb-ohci]
scsi_mod 107576 4 [usb-storage sg aic7xxx aacraid sd_mod]

/proc/bus/usb is mounted. I checked from /etc/mtab file, see below.
none /proc/bus/usb usbdevfs rw 0 0

Does USB use /dev/sdb1 as device file all the time, or it can be changed?
How can I find out what the USB device file?

Thanks for any help...
take easy, enjoy life
7 REPLIES 7
Stuart Browne
Honored Contributor
Solution

Re: USB drive on redhat 8

Ok, the USB-Storage devices are given to the OS as a SCSI device.

To find out what devices you have attached, you need to view the contents of '/proc/scsi/scsi'.

Once you know what device your USB drive is listed as, you then need to find out what filesystems are on it:

sfdisk -l /dev/sdX

where 'X' is the alpha representation of it's position shown in '/proc/scsi/scsi' (sorta.. it goes on how many of a given type of device.. the output of 'dmesg' after you plug it in should give you enough details).

If you're using it in a non-scsi system, then you can be pretty sure it's '/dev/sda'.

If you can see the device, and see filesystems listed with 'sfdisk', then you're most of the way there. If you want to, you can try to mount the partitions you see right here. Otherwise you could try to check to see what type of filesystems are on each of the partitions using the 'file -s /dev/sda1' command (using different device nodes for each partition of course).
One long-haired git at your service...
Tammy Liang
Regular Advisor

Re: USB drive on redhat 8

I can not see the USB drive in /proc/scsi/scsi.

[root@englab187 usb]# more /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: DELL Model: PERCRAID RAID10 Rev: V1.0
Type: Direct-Access ANSI SCSI revision: 02
[root@englab187 usb]#

But I do see it shows up at dmesg, see below:

[root@englab187 usb]# dmesg | grep usb
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-ohci.c: USB OHCI at membase 0xf889f000, IRQ 5
usb-ohci.c: usb-00:0f.2, ServerWorks OSB4/CSB5 OHCI USB Controller
usb.c: new USB bus registered, assigned bus number 1
usb.c: registered new driver hiddev
usb.c: registered new driver hid
usb.c: registered new driver usb-storage

I also see usb in /proc/pci file

[root@englab187 usb]# grep -i usb /proc/pci
USB Controller: ServerWorks OSB4/CSB5 OHCI USB Controller (rev 5).
[root@englab187 usb]#

Any idea?
Thanks for the reply.
take easy, enjoy life
Alexander Chuzhoy
Honored Contributor

Re: USB drive on redhat 8

first of all try to mount /dev/sda1.
That's how I mount my usb drive....
Tammy Liang
Regular Advisor

Re: USB drive on redhat 8

Thanks both for replying my question.
I got it fixed. I have to reload usb modules and remount usb devices.
For redhat 8 kernel, /dev/sda1 is used. however I can mount to /dev/sdb1.
For boot from CD, I can mount to /dev/sda1.

Thanks again.
take easy, enjoy life
Tammy Liang
Regular Advisor

Re: USB drive on redhat 8

I got any other issue with mounting usb drive. I got error message below when
I tried to mount usb.

[root@englab187 root]# mount /dev/sdb1 /usbmount
mount: you must specify the filesystem typ

After I run sfdisk -l /dev/sdb. I see the system for /dev/sdb1 is Win95 FAT32.

I already mounted /prob/bus/usb, see below.
[root@englab187 root]# grep usb /etc/mtab
none /proc/bus/usb usbdevfs rw 0 0
[root@englab187 root]

So what kind of file system I can use to mount /dev/sdb1?

Thanks for any help...
take easy, enjoy life
Tammy Liang
Regular Advisor

Re: USB drive on redhat 8

I think I may corrupt the superblock on the usb drive. How can I recover it?

[root@englab187 root]# mount -t ext2 /dev/sdb1 /usbmount
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
or too many mounted file systems
[root@englab187 root]# mount -t ext3 /dev/sdb1 /usbmount
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
or too many mounted file systems

Thanks..
take easy, enjoy life
Stuart Browne
Honored Contributor

Re: USB drive on redhat 8

What type of file system is on the USB device? I'd be highly suprised to find an ext2 or ext3 filesystem on it.

You're more likely to have a fat32 (vfat) partition.

Use the 'file -s /dev/sdb1' command to find out what the OS thinks is there.
One long-haired git at your service...