4

I'm trying to fix an odd problem I'm having that I've never seen or heard of before. I have a disk, /dev/sdc and I'm trying to mount it, but cannot.

sudo mount /dev/sdc1 /mnt
mount: you must specify the filesystem type

Ok, I remember it was ext3, so,

sudo mount -t ext3 /dev/sdc1 /mnt
mount: special device /dev/sdc1 does not exist

This I've never seen before either so I check /dev

ls /dev | grep sdc
brw-rw----  1 root disk      8,  32 2011-04-20 03:27 sdc

There's supposed to be an sdc1 file there as well right?
fdisk shows

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1a2b2e31

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       60801   488384001   83  Linux

So, from looking at fdisk it should be there, but it isn't. Checking /var/log/syslog, there are no messages from when I tried to mount the drive, so I don't know how to troubleshoot further. Does anyone know why this could be happening, or what I'm doing wrong, or how to fix this?

Could this be indicative of a dying device? There don't appear to be any SMART messages out of the ordinary in syslog..

Jeff Welling
  • 422
  • 1
  • 4
  • 11

2 Answers2

5

Try re-reading the device's partitions:

/sbin/partprobe /dev/sdc
Cakemox
  • 25,209
  • 6
  • 44
  • 67
  • 1
    Should that normally happen automatically when the the partition table is written? My (limited) understanding is that the kernel should notify `udevd`, which then creates the necessary nodes in `/dev`. – SmallClanger Apr 20 '11 at 09:44
  • 2
    That is the more interesting question, yes. Might want to try `udevadm control --log-priority=debug` to see what's going on there. – Cakemox Apr 20 '11 at 09:59
  • @Cakemox, I tried the udevadm command and checked /var/log/messages (and every other logfile) for helpful output but found none. Do you have any other advice for troubleshooting this? – Jeff Welling Jul 31 '11 at 11:57
2

You can get the device node back by running mknod sdc1 b 8 33. That might give you enugh of a jump start to mount it, but I would work right away to get the system repaired.

It sounds like either your dev system is mucked up or your hard drive or controler is acting up. I find another drive and play aroundto see if the software is picking it up and making the correct device nodes in /dev on demand. If so, treat that drive with all suspicion. If not, do software updates and see if your dev system (devfs? udev? dev?) is throwing any error data. If it's hardware, you might try just nuking the drive patition table and all and see if starting over makes it any more cooperative.

Caleb
  • 11,813
  • 4
  • 36
  • 49
  • I tried Cakemox's answer first just cause I was reading the page from top to bottom, but I think your answer is more informative and I wish I could upvote it. Many other drives are in this system, I've rearranged them and the problem follows sdc. I tried to solve this once before by nuking partition table, apparently didn't fix it though. Any advice for figuring out which dev system I have and troubleshooting further for a permanent fix? – Jeff Welling Apr 20 '11 at 09:29
  • No worries @Cakemox had a good answer and I just learned something new myself! Stick around and help some other people out to earn rep, then you can pass around the love :) What distro are you using? – Caleb Apr 20 '11 at 09:31
  • Debian 5.0, up to date. – Jeff Welling Apr 20 '11 at 09:36
  • You probably use udev. Check `dpkg -l udev` to see. Have you searched the system logs to see if sdc is mentioned in any context? – Caleb Apr 20 '11 at 10:27
  • I've checked /var/log/syslog and /var/log/messages and just about every other file in /var/log/* for helpful messages (including grep-ing for 'sdc') but have found nothing of interest. Do you have any other ideas? It's really strange, if it wasn't for the problem of this one drive not mounting without `/sbin/partprobe /dev/sdc `, it would work fine. Worse comes to worse I can script it, but I'd like to know what's going wrong and fix it instead :). – Jeff Welling Jul 31 '11 at 12:04
  • It may or may not be useful to note, I added the label 'backups' and added a line to fstab, but after a fresh reboot it is not mounted. Doing `sudo mount -a` gives me `mount: special device LABEL=backups does not exist`. So, then I use partprobe as above, and it works. – Jeff Welling Jul 31 '11 at 12:16