You are not logged in.

#1 2009-01-23 11:52:13

darkenergy
Member
Registered: 2008-09-12
Posts: 10

[solved] System disk sometimes /dev/sda sometimes /dev/sdb

Hi,

My system contains two identical hard disks on two separate SATA cards. One disk contains root, /home, swap (all luks encrypted) and /boot. The other disk contains one ext2 formatted partition and is used for backups.

Here's the problem:

Sometimes the system disk is assigned "/dev/sda", but sometimes "/dev/sdb". It seems to be totally random. Ideally, I would like it to always be "/dev/sda" .

(Note /dev/sda1 & /dev/sdb1):

$mount
/dev/mapper/root on / type ext2 (rw)
none on /dev type ramfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
/dev/sdb1 on /boot type ext2 (rw)
/dev/mapper/home on /home type ext2 (rw)
$
$mount
/dev/mapper/root on / type ext2 (rw)
none on /dev type ramfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext2 (rw)
/dev/mapper/home on /home type ext2 (rw)
$

How can I force the system to always assign "/dev/sda" to my system disk?

Thanks.

Last edited by darkenergy (2009-01-28 08:35:51)

Offline

#2 2009-01-23 11:58:02

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: [solved] System disk sometimes /dev/sda sometimes /dev/sdb

by using uuid or label ?


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#3 2009-01-23 12:03:29

Kirurgs
Member
Registered: 2008-10-20
Posts: 144

Re: [solved] System disk sometimes /dev/sda sometimes /dev/sdb

It seems that root, in this case, is defined via label or uuid, so system starts ok even with swapped disks, is it so?
To arrange Your 2 cards in position You need (I assume You have different cards from different vendors), just rearrange responsible modules in MODULES section in rc.conf, that should solve the random disk order...

In modules section I have only modules that have to be loaded in specific order, eg. network cards, because needed modules are auto-loaded anyway, but putting them in rc.conf they are loaded in that specified order...

Last edited by Kirurgs (2009-01-23 12:05:45)

Offline

#4 2009-01-23 12:21:25

darkenergy
Member
Registered: 2008-09-12
Posts: 10

Re: [solved] System disk sometimes /dev/sda sometimes /dev/sdb

It seems that root, in this case, is defined via label or uuid, so system starts ok even with swapped disks, is it so?

Exactly! uuid.

just rearrange responsible modules in MODULES section in rc.conf, that should solve the random disk order...

Thanks, I will try that.

Offline

#5 2009-01-23 14:54:30

darkenergy
Member
Registered: 2008-09-12
Posts: 10

Re: [solved] System disk sometimes /dev/sda sometimes /dev/sdb

Kirurgs, your suggestion did not work as we hoped it would, but it did point me in the right direction:

I simply added the module "hpt3x2n" for my HighPoint SATA interface card to the MODULES list in /etc/mkinitcpio.conf and reinstalled the kernel. So far I have rebooted 5 times, and every time my system disk has been /dev/sda, so things are looking good. I will observe this for a few days and then mark this thread as "solved".


/etc/mkinitcpio.conf :

MODULES="pata_hpt3x2n aes-i586 loop ata_generic scsi_mod dm-crypt fuse nls_cp437 vfat "

Offline

#6 2009-01-23 17:29:19

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: [solved] System disk sometimes /dev/sda sometimes /dev/sdb

odd issue nonetheless imo :s


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#7 2009-01-28 08:37:11

darkenergy
Member
Registered: 2008-09-12
Posts: 10

Re: [solved] System disk sometimes /dev/sda sometimes /dev/sdb

Probably booted 20 times now, the problem seems to be gone. So I'm marking the thread as solved.

Offline

Board footer

Powered by FluxBB