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

Chris Green cl at isbd.net
Sun May 29 17:38:36 UTC 2022


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.

Thanks anyway.

-- 
Chris Green




More information about the ubuntu-users mailing list