Why would a drive spontaneously from being /dev/sdb to /dev/sda?? mode

Robert Heller heller at deepsoft.com
Sun May 29 17:46:55 UTC 2022


At Sun, 29 May 2022 18:38:36 +0100 "Ubuntu user technical support,? not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> On Sun, May 29, 2022 at 12:41:44PM -0400, Robert Heller wrote:
> > At Sun, 29 May 2022 17:27:02 +0100 "Ubuntu user technical support,? not 
> > for general discussions" <ubuntu-users at lists.ubuntu.com> wrote: 
> > 
> > > 
> > > I recently was doing some [re-]configuration of my Lenovo Thinkpad
> > > running [x]ubuntu 21.10 and it failed to reboot.  After a bit of a
> > > worrying interval and lots of failed boots I found that an added disk
> > > drive that has been /dev/sdb1 for a long time (a year and a half or
> > > so) has become /dev/sda1.
> > > 
> > > Since /dev/sdba (or now, /dev/sda1) isn't actually necessary for the
> > > system to run I just commented it out of /etc/fstab and the system now
> > > boots OK.
> > > 
> > > However, some questions:-
> > > 
> > >     Why did it decide to change from /dev/sda to /dev/sdb?  Yes, I
> > >     know I can avoid the problem by using a UUID for the drive in
> > >     fstab but it would have been nice if the problem hadn't happened.
> > 
> > Who knows? My first guess is that /dev/sda died (see below). The thing is, the
> > hard use of device names in /etc/fstab has been depreciated for a very long
> 
> It's deprecated.
> 
> > time now. You should *never* use /dev/sd<mumble> in /etc/fstab. *ALWAYS* use
> > UUID= (or even better LABEL=).
> > 
> > Some possibilities of what can cause drive names to change:
> > 
> > The presence or absense of removable media (like thumb drives).  And which USB 
> > port is used.
> > 
> > BIOS setting changes.
> > 
> > Driver updates.
> > 
> > Random timing in when devices become available.
> > 
> > Hot swapped disks being moved from slot to slot.
> > 
> > RAID disk failure.
> > 
> > > 
> > >     Why didn't the system boot?  When I tried to boot in maintenance
> > >     mode I could see the 90 seconds timeout ending but nothing
> > >     happened afterwards.  Surely, after the timeout, the boot
> > >     should/could continue?  ... and again, yes I know there's options
> > >     to add in fstab to say ignore mount failures.
> > 
> > My *guess* /dev/sda died or is dieing.
> > 
> The system didn't have a /dev/sda, the main system drive is
> /dev/nvme0n1p5 with /boot on /dev/nvme0n1p1.  I don't know why
> when I added the extra drive it became /dev/sdb.  Anyway, as you 
> say, one should use UUIDs now.

I would guess you had another drive of some sort attached.  Maybe a thumb 
drive.  Something claimed /dev/sda.  It is also possible that /dev/nvme0n1 may 
have claimed /dev/sda early in the boot up and maybe with a new kernel or 
driver, that stopped happening.

The slow boot might in fact be a clue...


> 
> Thanks anyway.
> 

-- 
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                                                          




More information about the ubuntu-users mailing list