LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   mount error for external usb ext3 drive: device not found (http://www.linuxquestions.org/questions/linux-general-1/mount-error-for-external-usb-ext3-drive-device-not-found-868741/)

someshpr 03-15-2011 11:38 AM

mount error for external usb ext3 drive: device not found
 
Hi,
I am having trouble to mount this external drive both as sudo and as root. This drive is formatted to ext3, and the system is CentOS 5. I remember mounitng similar drives in similar fasion in this machine. But I do not understand what is going wrong this time. Here are my results of fdisk and mount command:

Code:

somesh@archean media$ sudo /sbin/fdisk -l

Disk /dev/sda: 300.0 GB, 300000000000 bytes
255 heads, 63 sectors/track, 36472 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          25      200781  83  Linux
/dev/sda2              26        2065    16386300  82  Linux swap / Solaris
/dev/sda3            2066        3977    15358140  83  Linux
/dev/sda4            3978      36472  261016087+  5  Extended
/dev/sda5            3978        4614    5116671  83  Linux
/dev/sda6            4615      36472  255899353+  83  Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1              1      121601  976760001  83  Linux
somesh@archean media$ sudo mount -t ext3 /dev/sdc1 USB_Bkup/
mount: special device /dev/sdc1 does not exist

The sudoers file is:
Code:

## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
...
## Mount
Cmnd_Alias MOUNT = /sbin/fdisk, /sbin/sfdisk, /bin/mount, /bin/umount
...
%group.sudo-all    ALL=(ALL)      ALL
%access.workstations ALL=NOPASSWD:MOUNT

I am member of both group.sudo-all and access.workstations groups.
And this is the fstab file:
Code:

-bash-3.2# cat /etc/fstab
LABEL=/                /                      ext3    defaults        1 1
LABEL=/scratch          /scratch                ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=/boot            /boot                  ext3    defaults        1 2
tmpfs                  /dev/shm                tmpfs  defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                  /sys                    sysfs  defaults        0 0
proc                    /proc                  proc    defaults        0 0
LABEL=SWAP-sda2        swap                    swap    defaults        0 0
#LABEL=Bkup      /media/USB_Bkup        fuseblk rw,suid,dev,noexec,noauto,user,async,dmask=000,fmask=111        0 0
#LABEL=SAMSUNG          /media/USB_Bkup        vfat    rw,suid,dev,noexec,noauto,user,async,dmask=000,fmask=111        0 0
#/dev/Bkup              /media/USB_Bkup        vfat    rw,suid,dev,noexec,noauto,user,async,dmask=000,fmask=111        0 0
#LABEL=Elements                /media/Elements        fuseblk user,defaults 0 0
#/dev/sdb1              /media/Elements        fuseblk rw,suid,dev,noexec,noauto,user,async,dmask=000,fmask=111        0 0
#/dev/sdb1              /media/Elements        ext3    defaults 0 0
#LABEL=USB                /media/Elements        ext3    rw,noexec,noauto,user,async    0 0
#/dev/sdb1              /media/Elements        ext2    rw,pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

I had issued a mount -a command to make sure this fstab is loaded.
Any clue?
TIA,

szboardstretcher 03-15-2011 11:45 AM

Code:

vgdisplay
Try this command.

You might have to do this as well... to find the volume group on the disk.

Code:

vgscan

someshpr 03-15-2011 11:50 AM

Quote:

Originally Posted by szboardstretcher (Post 4291637)
Code:

vgdisplay
Try this command.

You might have to do this as well... to find the volume group on the disk.

Code:

vgscan

Still nothing. Actually vgdisplay and vgscan shows nothing!
Code:

-bash-3.2# vgdisplay -v
    Finding all volume groups
-bash-3.2# vgscan
  Reading all physical volumes.  This may take a while...
-bash-3.2# vgdisplay -v
    Finding all volume groups
-bash-3.2# fdisk -l

Disk /dev/sda: 300.0 GB, 300000000000 bytes
255 heads, 63 sectors/track, 36472 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          25      200781  83  Linux
/dev/sda2              26        2065    16386300  82  Linux swap / Solaris
/dev/sda3            2066        3977    15358140  83  Linux
/dev/sda4            3978      36472  261016087+  5  Extended
/dev/sda5            3978        4614    5116671  83  Linux
/dev/sda6            4615      36472  255899353+  83  Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1              1      121601  976760001  83  Linux
-bash-3.2# mount -t ext3 /dev/sdc1 /media/USB_Bkup
mount: special device /dev/sdc1 does not exist


szboardstretcher 03-15-2011 12:03 PM

Code:

ls -alh /dev/sdc*

file /dev/sdc1

dmesg | grep sdc

lsusb


someshpr 03-15-2011 12:15 PM

Quote:

Originally Posted by szboardstretcher (Post 4291649)
Code:

ls -alh /dev/sdc*

file /dev/sdc1

dmesg | grep sdc

lsusb


There is no entry for /dev/sdc1

Code:

-bash-3.2# ls -alh /dev/sdc*
brw-r----- 1 root disk 8, 32 Mar 15 12:43 /dev/sdc
-bash-3.2# file /dev/sdc1
/dev/sdc1: ERROR: cannot open `/dev/sdc1' (No such file or directory)

This lead me to do this:
Code:

-bash-3.2# ls -alhrt /dev/* | tail -n 30
crw-------  1 root root 13, 67 Feb 21 09:39 event3
drwxr-xr-x  2 root root    200 Feb 21 09:39 .
drwxr-xr-x 13 root root  4.5K Mar 15 12:43 ..

/dev/cpu:
total 0
drwxr-xr-x  2 root root  80 Feb 21 09:39 6
drwxr-xr-x  2 root root  80 Feb 21 09:39 7
drwxr-xr-x  2 root root  80 Feb 21 09:39 4
drwxr-xr-x  2 root root  80 Feb 21 09:39 3
drwxr-xr-x  2 root root  80 Feb 21 09:39 5
drwxr-xr-x  2 root root  80 Feb 21 09:39 2
drwxr-xr-x  2 root root  80 Feb 21 09:39 1
drwxr-xr-x  2 root root  80 Feb 21 09:39 0
drwxr-xr-x 10 root root  200 Feb 21 09:39 .
drwxr-xr-x 13 root root 4.5K Mar 15 12:43 ..

/dev/shm:
total 12K
-rw-rw-rw-  1 somesh somesh  16 Feb 22 12:00 sem.ADBE_WritePrefs_somesh
-rw-rw-rw-  1 somesh somesh  16 Feb 22 12:00 sem.ADBE_REL_somesh
-rw-rw-rw-  1 somesh somesh  16 Feb 22 12:00 sem.ADBE_ReadPrefs_somesh
drwxrwxrwt  2 root  root    100 Feb 22 12:00 .
drwxr-xr-x 13 root  root  4.5K Mar 15 12:43 ..

/dev/usbdevices:
total 0
lrwxrwxrwx  1 root root    7 Mar 15 12:43 samsung1tb -> ../Bkup
drwxr-xr-x 13 root root 4.5K Mar 15 12:43 ..
drwxr-xr-x  2 root root  60 Mar 15 12:43 .

Looking at the dates, I then issued this mount command:
Code:

mount -t ext3 /dev/usbdevices/samsung1tb /media/USB_Bkup
and voila! It worked.

But that brings the question that why fdisk is showing something when that is not correct. Also why does this usb device going to /dev/usbdevices/samsung1tb ?
FYI, I tried various automount options with this drive in this machine long ago using udev and label. And some of them worked, before I switched to sudo based mounting! Now I have commented out all such commands in fstab. Also I formatted this drive from NTFS to EXT3 just an hour ago!
So why is fdisk is pointing at something else?

TIA,

someshpr 03-15-2011 12:18 PM

Here are the output of dmesg and lsusb:
Code:

-bash-3.2# dmesg | grep sdc
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 13:0:0:0: Attached scsi disk sdc
SCSI device sdc: 3905656832 512-byte hdwr sectors (1999696 MB)
sdc: Write Protect is off
sdc: Mode Sense: 23 00 10 00
sdc: assuming drive cache: write through
SCSI device sdc: 3905656832 512-byte hdwr sectors (1999696 MB)
sdc: Write Protect is off
sdc: Mode Sense: 23 00 10 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 17:0:0:0: Attached scsi disk sdc
EXT3 FS on sdc1, internal journal
SCSI device sdc: 4012032 512-byte hdwr sectors (2054 MB)
sdc: Write Protect is off
sdc: Mode Sense: 23 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 4012032 512-byte hdwr sectors (2054 MB)
sdc: Write Protect is off
sdc: Mode Sense: 23 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 23:0:0:0: Attached scsi removable disk sdc
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 25:0:0:0: Attached scsi disk sdc
VFS: Can't find a valid FAT filesystem on dev sdc1.
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 26:0:0:0: Attached scsi disk sdc
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 27:0:0:0: Attached scsi disk sdc
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 28:0:0:0: Attached scsi disk sdc
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 29:0:0:0: Attached scsi disk sdc
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
sdc: Write Protect is off
sdc: Mode Sense: 28 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 30:0:0:0: Attached scsi disk sdc
EXT3 FS on sdc1, internal journal
EXT3 FS on sdc1, internal journal
-bash-3.2#
-bash-3.2#
-bash-3.2# lsusb
Bus 004 Device 001: ID 0000:0000 
Bus 004 Device 002: ID 413c:1004 Dell Computer Corp.
Bus 004 Device 003: ID 413c:2006 Dell Computer Corp.
Bus 003 Device 002: ID 046d:c045 Logitech, Inc. Optical Mouse
Bus 003 Device 001: ID 0000:0000 
Bus 002 Device 001: ID 0000:0000 
Bus 001 Device 027: ID 04e8:5f05 Samsung Electronics Co., Ltd
Bus 001 Device 001: ID 0000:0000 
Bus 005 Device 001: ID 0000:0000



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