RSS Feed for This PostCurrent Article

Not Seeing Partitions on USB Disks

I have a 750 GB WD MyBook drive that I move lots of data around on, specifically from work to home and back. Today I wanted to hook it up to my development Linux box. The last time I did this I walked up and plugged it into the front USB ports on the machine (a Dell PowerEdge 2850 running Red Hat Enterprise Linux 4). No sweat.

Today was different, though. For whatever reason the partition on the disk didn’t get picked up automatically. I plugged the drive in and got /dev/sdt, but no /dev/sdt1, though fdisk showed it there. Um, WTF.

After a few minutes of futzing around with it, unplugging it, plugging it back in, flailing with pvscan, scratching my head, Googling with no good results, etc. it finally occurred to me to use fdisk to fix it:

fdisk /dev/sdt
p (to make sure the partition is still there)
w (writing causes fdisk to tell the kernel to reread the partition table)

Ta-dum! I now have /dev/sdt1. No idea why the bad behavior started, but at least it’s a fairly easy fix.

Update: Jim Bartus suggests /sbin/partprobe in the comments. Rock on, thanks Jim!

Popularity: 2% [?]

| Comments

Trackback URL

  1. 3 Comment(s)

  2. By jim bartus on Jan 16, 2008 | Reply

    If it happens again, try running “partprobe”.

  3. By Bob Plankers on Jan 16, 2008 | Reply

    This is why I like you guys. :-) Thanks Jim!

  4. By Pantz on Jan 17, 2008 | Reply

    Another way to force a re-read the part table.

    sudo /sbin/blockdev –rereadpt /dev/sdt1

Post a Comment

 

Please note that while in principle I don't mind promotion of a non-personal web site or blog in the fields below, any comments that are off-topic, derogatory, or spam-like will likely be removed at my discretion.