* Question about scsi device names @ 2009-06-12 0:36 walt 2009-06-16 19:35 ` Billy Crook 0 siblings, 1 reply; 5+ messages in thread From: walt @ 2009-06-12 0:36 UTC (permalink / raw) To: linux-scsi Hi list, Here is some background for my question: I have a machine with two sata disks, one connected to the onboard sata controller, the other to an add-on ESATA board plugged into the PCIX slot. My puzzle: When I boot a kernel from the 2.6.28 series, the onboard controller's disk gets dubbed /dev/sdb, and the ESATA disk is /dev/sda. When I boot the same machine with a more recent kernel like Linus's 2.6.30 series, the device names are reversed. Is this change in behavior expected based on recent kernel patches? Thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about scsi device names 2009-06-12 0:36 Question about scsi device names walt @ 2009-06-16 19:35 ` Billy Crook 2009-06-16 23:26 ` walt 0 siblings, 1 reply; 5+ messages in thread From: Billy Crook @ 2009-06-16 19:35 UTC (permalink / raw) To: walt; +Cc: linux-scsi It's been long enough someone probably already answered you off list, but just in case you're still wondering, the letter naming of block devices in /dev/ is arbitrary and should be presumed unreliable. It is dependant on the order in which the devices were detected. In your case, it is likely that modules are being loaded in another order than before. This could happen for a variety of reasons including module renames, removals, or additions. To reliably reference block devices, use LABEL=, or UUID= in fstab, or /dev/disk/by-*/* anywhere else. This is particularly useful in SANs or switched storage like FC, iSCSI, or SAS, where the order individual disks are detected can realistically change from second to second. On Thu, Jun 11, 2009 at 19:36, walt<w41ter@gmail.com> wrote: > Hi list, > > Here is some background for my question: > > I have a machine with two sata disks, one connected to the > onboard sata controller, the other to an add-on ESATA board > plugged into the PCIX slot. > > My puzzle: > > When I boot a kernel from the 2.6.28 series, the onboard > controller's disk gets dubbed /dev/sdb, and the ESATA disk > is /dev/sda. > > When I boot the same machine with a more recent kernel like > Linus's 2.6.30 series, the device names are reversed. > > Is this change in behavior expected based on recent kernel > patches? > > Thanks. > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about scsi device names 2009-06-16 19:35 ` Billy Crook @ 2009-06-16 23:26 ` walt 2009-06-17 14:19 ` Konrad Rzeszutek 0 siblings, 1 reply; 5+ messages in thread From: walt @ 2009-06-16 23:26 UTC (permalink / raw) To: linux-scsi Billy Crook wrote: > ... the letter naming of block > devices in /dev/ is arbitrary and should be presumed unreliable. It > is dependant on the order in which the devices were detected. In your > case, it is likely that modules are being loaded in another order than > before. This could happen for a variety of reasons including module > renames, removals, or additions. > > To reliably reference block devices, use LABEL=, or UUID= in fstab, or > /dev/disk/by-*/* anywhere else... Thanks, that's helpful info. The reason this came up is that the sata disk on the onboard controller is the boot disk, and it's annoying to have the boot fail because the ESATA disk is powered on or off, as the case may be. The kernel chooses the root partition based on its own value of rdev, I believe, and that's what I'm trying to set properly. I've been trying various different combos of the label and /dev/disk/foo/bar but in the end rdev just winds up being /dev/sda or /dev/sdb, regardless of what I type. Do you know of any way to get around this problem? Thanks! > On Thu, Jun 11, 2009 at 19:36, walt<w41ter@gmail.com> wrote: >> I have a machine with two sata disks, one connected to the >> onboard sata controller, the other to an add-on ESATA board >> plugged into the PCIX slot. >> >> When I boot a kernel from the 2.6.28 series, the onboard >> controller's disk gets dubbed /dev/sdb, and the ESATA disk >> is /dev/sda. >> >> When I boot the same machine with a more recent kernel like >> Linus's 2.6.30 series, the device names are reversed... ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about scsi device names 2009-06-16 23:26 ` walt @ 2009-06-17 14:19 ` Konrad Rzeszutek 2009-06-17 19:56 ` walt 0 siblings, 1 reply; 5+ messages in thread From: Konrad Rzeszutek @ 2009-06-17 14:19 UTC (permalink / raw) To: walt; +Cc: linux-scsi On Tue, Jun 16, 2009 at 04:26:58PM -0700, walt wrote: > Billy Crook wrote: >> ... the letter naming of block >> devices in /dev/ is arbitrary and should be presumed unreliable. It >> is dependant on the order in which the devices were detected. In your >> case, it is likely that modules are being loaded in another order than >> before. This could happen for a variety of reasons including module >> renames, removals, or additions. >> >> To reliably reference block devices, use LABEL=, or UUID= in fstab, or >> /dev/disk/by-*/* anywhere else... > > Thanks, that's helpful info. The reason this came up is that the sata > disk on the onboard controller is the boot disk, and it's annoying to > have the boot fail because the ESATA disk is powered on or off, as the > case may be. > > The kernel chooses the root partition based on its own value of rdev, Which on most distros is the initrd image (/dev/ram0)? You _need_ to have an initrd image. Then rdev points to (1,0 - /dev/ram0) and executes the /init process which takes care of scaning the disks for the labels and pivots in a root filesystem depending on the label (or the LVM if that is there). ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about scsi device names 2009-06-17 14:19 ` Konrad Rzeszutek @ 2009-06-17 19:56 ` walt 0 siblings, 0 replies; 5+ messages in thread From: walt @ 2009-06-17 19:56 UTC (permalink / raw) To: linux-scsi Konrad Rzeszutek wrote: > On Tue, Jun 16, 2009 at 04:26:58PM -0700, walt wrote: >> The kernel chooses the root partition based on its own value of rdev, > > Which on most distros is the initrd image (/dev/ram0)? > > You _need_ to have an initrd image. Then rdev points to (1,0 - > /dev/ram0) and executes the /init process which takes care of scaning > the disks for the labels and pivots in a root filesystem depending on the label > (or the LVM if that is there). Excellent, thanks very much. This is the first time in many years I've had to worry about a vaguely defined root partition, so I forgot about initrd. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-06-17 19:56 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-06-12 0:36 Question about scsi device names walt 2009-06-16 19:35 ` Billy Crook 2009-06-16 23:26 ` walt 2009-06-17 14:19 ` Konrad Rzeszutek 2009-06-17 19:56 ` walt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).