Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-27-2013, 12:51 PM   #1
Senior Member
Registered: Apr 2006
Posts: 2,016

Rep: Reputation: 76
why does a pluggable device change from sdb1 to sdc1 when I re-plug it?

I notice that if I unplug my MP3 player or USB drive from a USB port and then plug it back in later, it will reappear with a different sd[x] letter (sorry, I can't remember what we call those names). It's sdb1 the first time I plug it in, and when I plug it in the second time, it reappears as sdc1 (or something else, depending on what else I have plugged in). Why is that? Because it's not sdb1 anymore, I can't simply refresh the window displaying the device's contents (if I left it open). I didn't plug in or remove anything else, so it can't be because something else became sdb1, can it?

Last edited by newbiesforever; 02-27-2013 at 12:56 PM.
Old 02-27-2013, 06:00 PM   #2
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,520

Rep: Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106
device names are volatile, you can't rely on them to stay static, especially not for removable devices.

What window is this that displays drive contents based on device names rather than mount points?
Old 02-27-2013, 06:32 PM   #3
Senior Member
Registered: Aug 2009
Distribution: CentOS
Posts: 3,519

Rep: Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547
Probably the program in the window that was displaying the device's contents still has some reference to that device open, making that name unavailable for reuse. Did you unmount or, preferably, "Safely remove" the drive before yanking it out?
1 members found this post helpful.
Old 02-27-2013, 07:20 PM   #4
Registered: Feb 2013
Location: Berlin
Distribution: Gentoo, Debian
Posts: 172

Rep: Reputation: 25
Yes, if you leave that window open and just pull out the device, the mountpoint might be still locked when you re-insert it, because that window still has the device/mountpoint "in use". Always unmount the device before pulling it out, so any pending writes can be committed before the device is disconnected. The window will then probably notice the unmount and release it's grip also.

Device names can sometimes change. Some BIOSes even swap local harddisk device names at boot time, so "sda" may become "sdb" and vice versa. So if you can avoid using these hard device names, i'd suggest to do so. You can give every partition a certain disk label and then address it by label, e.g., instead of "/dev/sdc1" you could use "/dev/disk/by-label/MY_USTICK_WORK2", or in the /etc/fstab (if you are creating entries there), instead of "/dev/sdc1" you might use "LABEL=MY_USTICK_WORK2" to address that particular partition. Similar in the GRUB config, and so on.

It's even possible to label swap partitions or NTFS (Windows) partitions. See man e2label/swaplabel/ntfslabel. If you do, use no more than 16 characters for compatibility reasons. At least that'll work on any partition type i know of.

Last edited by bloody; 02-27-2013 at 07:23 PM.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mount: special device /dev/sdb1 does not exist sysbox Linux - Hardware 4 11-11-2013 01:51 AM
[SOLVED] extlinux: cannot open device /dev/sdb1 guoissac Linux - Newbie 1 12-01-2012 03:12 PM
Buffer I/O error on device sdb1 tikit Linux - Hardware 2 02-04-2010 01:55 AM
LXer: Pluggable Schedulers vs. Pluggable Security LXer Syndicated Linux News 0 10-03-2007 11:40 PM
SDB1 IS NOT A VALID BLOCK DEVICE - CF reader help woodo Linux - Software 12 07-07-2004 09:52 AM > Forums > Linux Forums > Linux - General

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration