Welcome! Log In Create A New Profile

Advanced

ZyXEL 326, USB drive and hard disc switch device names between boots. Is that normal?

Posted by raffe 
ZyXEL 326, USB drive and hard disc switch device names between boots. Is that normal?
March 31, 2024 03:16AM
I did find something strange: The device names for hard drives and USB-drives can switch between boots.

This is both from the same device.

Just after I have updated from 6.6.2 to 6.7.5, before reboot USB is:
sdb1:
root@debian:/boot# lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda         8:0    1  10.9T  0 disk
├─sda1      8:1    1 139.7G  0 part /
└─sda2      8:2    1  10.8T  0 part /media/data
sdb         8:16   1 114.6G  0 disk
└─sdb1      8:17   1 114.6G  0 part
sdc         8:32   1  10.9T  0 disk
└─sdc1      8:33   1  10.9T  0 part /media/data2
mtdblock0  31:0    0     2M  0 disk
mtdblock1  31:1    0     2M  0 disk
mtdblock2  31:2    0     2M  0 disk
mtdblock3  31:3    0    15M  0 disk
mtdblock4  31:4    0   110M  0 disk
mtdblock5  31:5    0    15M  0 disk
mtdblock6  31:6    0   110M  0 disk
After reboot USB is:
sdc1::
root@debian:/boot# lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda         8:0    1  10.9T  0 disk
├─sda1      8:1    1 139.7G  0 part /
└─sda2      8:2    1  10.8T  0 part /media/data
sdb         8:16   1  10.9T  0 disk
└─sdb1      8:17   1  10.9T  0 part /media/data2
sdc         8:32   1 114.6G  0 disk
└─sdc1      8:33   1 114.6G  0 part
mtdblock0  31:0    0     2M  0 disk
mtdblock1  31:1    0     2M  0 disk
mtdblock2  31:2    0     2M  0 disk
mtdblock3  31:3    0    15M  0 disk
mtdblock4  31:4    0   110M  0 disk
mtdblock5  31:5    0    15M  0 disk
mtdblock6  31:6    0   110M  0 disk

Is that normal or should I be worried?
Re: ZyXEL 326, USB drive and hard disc switch device names between boots. Is that normal?
March 31, 2024 02:26PM
raffe,

> I did find something strange: The device names for
> hard drives and USB-drives can switch between
> boots.
>
> This is both from the same device.
>
> Just after I have updated from 6.6.2 to 6.7.5,
> before reboot USB is:
> sdb1:
>
> root@debian:/boot# lsblk
> NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
> sda         8:0    1  10.9T  0 disk
> ├─sda1      8:1    1 139.7G  0 part /
> └─sda2      8:2    1  10.8T  0 part
> /media/data
> sdb         8:16   1 114.6G  0 disk
> └─sdb1      8:17   1 114.6G  0 part
> sdc         8:32   1  10.9T  0 disk
> └─sdc1      8:33   1  10.9T  0 part
> /media/data2
> mtdblock0  31:0    0     2M  0 disk
> mtdblock1  31:1    0     2M  0 disk
> mtdblock2  31:2    0     2M  0 disk
> mtdblock3  31:3    0    15M  0 disk
> mtdblock4  31:4    0   110M  0 disk
> mtdblock5  31:5    0    15M  0 disk
> mtdblock6  31:6    0   110M  0 disk
>
> After reboot USB is:
> sdc1::
>
> root@debian:/boot# lsblk
> NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
> sda         8:0    1  10.9T  0 disk
> ├─sda1      8:1    1 139.7G  0 part /
> └─sda2      8:2    1  10.8T  0 part
> /media/data
> sdb         8:16   1  10.9T  0 disk
> └─sdb1      8:17   1  10.9T  0 part
> /media/data2
> sdc         8:32   1 114.6G  0 disk
> └─sdc1      8:33   1 114.6G  0 part
> mtdblock0  31:0    0     2M  0 disk
> mtdblock1  31:1    0     2M  0 disk
> mtdblock2  31:2    0     2M  0 disk
> mtdblock3  31:3    0    15M  0 disk
> mtdblock4  31:4    0   110M  0 disk
> mtdblock5  31:5    0    15M  0 disk
> mtdblock6  31:6    0   110M  0 disk
>
>
> Is that normal or should I be worried?

Yes, it is normal when you have multiple drives attached.

That's why we're booting with the bootarg root=LABEL=rootfs. And set it up so that only the rootfs drive has the label rootfs.

See it in your command line:
cat /proc/cmdline
If it is not root=LABEL=rootfs then there will be intermittent problem in booting.

Linux kernel will assign device name (ie. drive letter) to whichever drive comes up first. Usually, the HDD will be first, but it is not a guarantee. And for example, if you have 2 HDDs in the slots, then the device names for these 2 HDDs are likely to change from one boot to another.

And a mix of USB and HDD drives can also be assined different device names (not often, but it will happen sometime).

See this post I wrote long ago (linked topic in the Wiki thread):

Booting process in depth discussion
https://forum.doozan.com/read.php?3,19093

The bottom line is all disk drive partitions should have label. And only one should use the label rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: