Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #225207 > unrolled thread

[Sid] ahci: disk order

Started byGrzesiek Sójka <pld@sojka.co>
First post2020-07-24 19:40 +0200
Last post2020-07-24 21:30 +0200
Articles 7 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  [Sid] ahci: disk order Grzesiek Sójka <pld@sojka.co> - 2020-07-24 19:40 +0200
    Re: [Sid] ahci: disk order Cindy Sue Causey <butterflybytes@gmail.com> - 2020-07-24 20:10 +0200
    Re: [Sid] ahci: disk order Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-24 21:00 +0200
      Re: [Sid] ahci: disk order Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-24 21:10 +0200
        Re: [Sid] ahci: disk order Reco <recoverym4n@enotuniq.net> - 2020-07-24 21:10 +0200
          Re: [Sid] ahci: disk order Grzesiek Sójka <pld@sojka.co> - 2020-07-25 14:50 +0200
    Re: [Sid] ahci: disk order Stefan Monnier <monnier@iro.umontreal.ca> - 2020-07-24 21:30 +0200

#225207 — [Sid] ahci: disk order

FromGrzesiek Sójka <pld@sojka.co>
Date2020-07-24 19:40 +0200
Subject[Sid] ahci: disk order
Message-ID<Aw9PQ-1Ht-3@gated-at.bofh.it>
Hi there,

I noticed that SATA disks appear in random order. More precisely, I have 
two disks, HDD and SSD. Sometimes HDD=/dev/sda, SSD=/dev/sdb and 
sometimes HDD=/dev/sdb, SSD=/dev/sda. Is there any way to fix the disk 
order? I would like the disk connected to port 1 to be sda, disk 
connected to port 2 to be sdb and so on (like it was in the past)

Thanks in advance for any help.

[toc] | [next] | [standalone]


#225209

FromCindy Sue Causey <butterflybytes@gmail.com>
Date2020-07-24 20:10 +0200
Message-ID<AwaiS-272-15@gated-at.bofh.it>
In reply to#225207
On 7/24/20, Grzesiek Sójka <pld@sojka.co> wrote:
> Hi there,
>
> I noticed that SATA disks appear in random order. More precisely, I have
> two disks, HDD and SSD. Sometimes HDD=/dev/sda, SSD=/dev/sdb and
> sometimes HDD=/dev/sdb, SSD=/dev/sda. Is there any way to fix the disk
> order? I would like the disk connected to port 1 to be sda, disk
> connected to port 2 to be sdb and so on (like it was in the past)
>
> Thanks in advance for any help.


DISCLAIMER: I acknowledge this is the kind of information request
redirect that gets dissed, but still... :)

Are you working on a project that could implement "label" instead? I
LOVE THEM... ever since I finally understood them.

Over time, I've gone from /dev/sdx to "UUID=" to... LABEL. For /dev &
UUID, I ALWAYS had to do what I'm imagining you doing on some level. I
ALWAYS had to rely on something like "blkid" to get things pointed in
the right direction.

These days, I still do turn to blkid for reassurance once in a while,
mostly just to confirm if something is or is NOT actually functionally
plugged in. Otherwise, I've got labels that are "rational" *to my
brain* such that I can whip them out in e.g. terminal commands without
having to stop and look at anything first...

Gparted is where I set mine up, by the way. EVERY ONE needs to be
different for this to work successfully. There appears to be one
possible exception to that, but just.. *GACK* on that (GRUB v. GPT)
topic.

You pick memorable names that are uniquely identifiable so that
there's no chance of a system-wide clash. Mine are named based on the
function of the partition and that partition's hand chosen physical
hard drive ID, e.g. "nikon-hd1".

Those labels work in /etc/fstab, "sudo mount", and other fun places..
that I can't remember offhand just now

Just thinking out loud..

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with birdseed *

[toc] | [prev] | [next] | [standalone]


#225212

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2020-07-24 21:00 +0200
Message-ID<Awb5g-2nl-3@gated-at.bofh.it>
In reply to#225207

[Multipart message — attachments visible in raw view] — view raw

On Vi, 24 iul 20, 19:39:21, Grzesiek Sójka wrote:
> Hi there,
> 
> I noticed that SATA disks appear in random order. More precisely, I have two
> disks, HDD and SSD. Sometimes HDD=/dev/sda, SSD=/dev/sdb and sometimes
> HDD=/dev/sdb, SSD=/dev/sda. Is there any way to fix the disk order?

Not that I know of.

> I would
> like the disk connected to port 1 to be sda, disk connected to port 2 to be
> sdb and so on (like it was in the past)

It might be possible with some special udev rules, or you could use 
LABELs or UUIDs instead, like the rest of the world ;)

What specific problem is this creating for you?

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#225213

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2020-07-24 21:10 +0200
Message-ID<AwbeV-2Gh-1@gated-at.bofh.it>
In reply to#225212

[Multipart message — attachments visible in raw view] — view raw

On Vi, 24 iul 20, 21:58:26, Andrei POPESCU wrote:
> On Vi, 24 iul 20, 19:39:21, Grzesiek Sójka wrote:
> > Hi there,
> > 
> > I noticed that SATA disks appear in random order. More precisely, I have two
> > disks, HDD and SSD. Sometimes HDD=/dev/sda, SSD=/dev/sdb and sometimes
> > HDD=/dev/sdb, SSD=/dev/sda. Is there any way to fix the disk order?
> 
> Not that I know of.
> 
> > I would
> > like the disk connected to port 1 to be sda, disk connected to port 2 to be
> > sdb and so on (like it was in the past)
> 
> It might be possible with some special udev rules,

Correction: probably not, since those names are assigned by the kernel.

> or you could use LABELs or UUIDs instead, like the rest of the world 
> ;)
> 
> What specific problem is this creating for you?

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#225216

FromReco <recoverym4n@enotuniq.net>
Date2020-07-24 21:10 +0200
Message-ID<AwbeW-2Gh-21@gated-at.bofh.it>
In reply to#225213
	Hi.

On Fri, Jul 24, 2020 at 10:03:01PM +0300, Andrei POPESCU wrote:
> On Vi, 24 iul 20, 21:58:26, Andrei POPESCU wrote:
> > On Vi, 24 iul 20, 19:39:21, Grzesiek Sójka wrote:
> > > Hi there,
> > > 
> > > I noticed that SATA disks appear in random order. More precisely, I have two
> > > disks, HDD and SSD. Sometimes HDD=/dev/sda, SSD=/dev/sdb and sometimes
> > > HDD=/dev/sdb, SSD=/dev/sda. Is there any way to fix the disk order?
> > 
> > Not that I know of.
> > 
> > > I would
> > > like the disk connected to port 1 to be sda, disk connected to port 2 to be
> > > sdb and so on (like it was in the past)
> > 
> > It might be possible with some special udev rules,
> 
> Correction: probably not, since those names are assigned by the kernel.

A correction over the correction ;) :

- it's possible, it's called RENAME= in udev rules.
- it's unneeded in about every case, given that wonderful /dev/disk
  directory.
- and if it is needed for some reason, one's always better to use SYMLINK
  over the RENAME.

Reco

[toc] | [prev] | [next] | [standalone]


#225244

FromGrzesiek Sójka <pld@sojka.co>
Date2020-07-25 14:50 +0200
Message-ID<AwrML-48k-11@gated-at.bofh.it>
In reply to#225216
On 2020-07-24 21:08, Reco wrote:
> 	Hi.
> 
> On Fri, Jul 24, 2020 at 10:03:01PM +0300, Andrei POPESCU wrote:
>> On Vi, 24 iul 20, 21:58:26, Andrei POPESCU wrote:
>>> On Vi, 24 iul 20, 19:39:21, Grzesiek Sójka wrote:
>>>> Hi there,
>>>>
>>>> I noticed that SATA disks appear in random order. More precisely, I have two
>>>> disks, HDD and SSD. Sometimes HDD=/dev/sda, SSD=/dev/sdb and sometimes
>>>> HDD=/dev/sdb, SSD=/dev/sda. Is there any way to fix the disk order?
>>>
>>> Not that I know of.
>>>
>>>> I would
>>>> like the disk connected to port 1 to be sda, disk connected to port 2 to be
>>>> sdb and so on (like it was in the past)
>>>
>>> It might be possible with some special udev rules,
>>
>> Correction: probably not, since those names are assigned by the kernel.
> 
> A correction over the correction ;) :
> 
> - it's possible, it's called RENAME= in udev rules.
> - it's unneeded in about every case, given that wonderful /dev/disk
>    directory.
> - and if it is needed for some reason, one's always better to use SYMLINK
>    over the RENAME.

Thanks for the info

[toc] | [prev] | [next] | [standalone]


#225223

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2020-07-24 21:30 +0200
Message-ID<Awbyh-2MR-13@gated-at.bofh.it>
In reply to#225207
> HDD=/dev/sdb, SSD=/dev/sda. Is there any way to fix the disk order? I would

The usual recommendation is to change the way you work such that you
don't depend on those names.

Personally, I use LVM so all my "partitions" (called "logical volumes")
have a name that I chose.  I started using LVM for other reasons (the
flexibility it offers in terms of manipulation of "partitions"), but the
naming turned out to be an invaluable side benefit.


        Stefan

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web