You are not logged in.
Pages: 1
For some reason, when I plug a memory stick / USB hard drive, it is named sdc rather than sdb.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 30G 0 part /
└─sda3 8:3 0 207.5G 0 part /home
sdc 8:32 0 931.5G 0 disk
└─sdc1 8:33 0 931.5G 0 part
sr0 11:0 1 5.7M 0 romIt used to label them sdb and I only noticed it doing this after we had a power cut and I had a device mounted that had been sdb1 although I don't know if that is relevant.
Thanks in advance for any help.
Offline
Check dmesg for reasons.
That said, DO NOT RELY ON DEVICE NAMES FOR ANYTHING. Operate on UUIDs and/or labels - the device names are applied sort of randomly by "first come, first served" which is not deterministic.
Also if you have sda, then add "a device" (other than this key) that gets sdb and your key will be and remain sdc even after pulling the other device.
Offline
Thanks for your reply
Here is the output of
dmesg -whThen plugged a memory stick in and this is what it output
[ +7.136566] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
[ +0.019115] usb-storage 2-2:1.0: USB Mass Storage device detected
[ +0.000275] scsi host4: usb-storage 2-2:1.0
[ +1.011892] scsi 4:0:0:0: Direct-Access SanDisk Ultra 1.00 PQ: 0 ANSI: 6
[ +0.001267] sd 4:0:0:0: [sdc] 242614272 512-byte logical blocks: (124 GB/116 GiB)
[ +0.001189] sd 4:0:0:0: [sdc] Write Protect is off
[ +0.000009] sd 4:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ +0.000358] sd 4:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ +0.011309] sdc: sdc1
[ +0.002317] sd 4:0:0:0: [sdc] Attached SCSI removable diskI don't rely on the device names really. It's just if I plug a memory stick in and need to mount it I run
lsblkthen
mount ..... ......It is just a bit annoying that sdb is missing.
Last edited by jab2870 (2017-11-28 13:15:31)
Offline
No, I meant you've to look at dmesg to figure what is (likely) occupying sdb.
Offline
Ohh, sorry.
$ dmesg | grep sdb -A 10 -B 10
[ 2.830124] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC283: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:hp
[ 2.830126] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 2.830127] snd_hda_codec_realtek hdaudioC0D0: hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 2.830128] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 2.830128] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 2.830129] snd_hda_codec_realtek hdaudioC0D0: Mic=0x19
[ 2.886461] fbcon: inteldrmfb (fb0) is primary device
[ 2.968695] Console: switching to colour frame buffer device 180x56
[ 2.996539] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[ 3.738889] scsi 3:0:0:0: Direct-Access Generic Ultra HS-SD/MMC 1.91 PQ: 0 ANSI: 0
[ 3.747210] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[ 4.347148] [drm] RC6 on
[ 5.088231] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[ 5.088497] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 5.088891] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[ 5.088938] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input11
[ 5.088987] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input12
[ 5.089030] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input13
[ 5.089072] input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input14
[ 5.089121] input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input15
[ 5.699155] e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/TxOddly, I don't have any SCSI devices attached. I have a single SATA SSD (sda) and the memory stick (sdc).
Offline
Card reader?
I don't have any SCSI devices attached
Offline
And that other device that was mounted as sdb1? What was that? That is almost certainly the cause. What was it, and how and where was it mounted? It likely left something in an unclean state - this might be resolved by a reboot, but perhaps something needs to be cleaned up first.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Interesting. I have a card reader but no memory cards in the card reader. In the past, if I use a card reader, each card gets a sdX name rather than the card reader.
Offline
The memory stick was mounted at /mnt/memstick. A reboot hasn't solved it. How would I clean up an "unclean state"
Offline
Obvious next step: Try to insert a card into the reader, see what happens.
Offline
Thanks, unfortunately I don't have a memory card on me but I will try that tomorow
Offline
If I suspected that it may be related to the proposed "unclean state" I'd check the output of `mount` for anything unusual (does the kernel still think something should be mounted at /mnt/memstick, and/or can you attempt to unmount it). But given the above, Seth's suspicion about the card reader seems more parsimonous. No harm in checking the output of `mount` though.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks. I'll brink a memory card in tomorrow and see what happens if I plug it in.
I can't see anything odd in the output of mount but here it is in case I have missed something.
$ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=8157264k,nr_inodes=2039316,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda2 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sda3 on /home type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1632408k,mode=700,uid=1000,gid=100)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)Offline
Pages: 1