Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Drive names change with kernel upgrade
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Carnildo
Guru
Guru


Joined: 17 Jun 2004
Posts: 594

PostPosted: Tue Jan 29, 2013 10:54 am    Post subject: Drive names change with kernel upgrade Reply with quote

I've got a computer with a boot drive attached via PATA (Intel 945 chipset) and five SATA hard drives attached to a 3ware 9500 RAID controller in JBOD mode. When booting a 2.6.38 kernel, the boot drive is /dev/sda and the RAID disks are /dev/sdb through /dev/sdf. With a 3.5.7 kernel, the boot drive is /dev/sdf and the RAID disks are /dev/sda through /dev/sde. How do I get the names back the way they were?

For bonus points, the kernel upgrade is preparation for adding another five disks attached to an Areca ARC-1120 RAID controller (probably in JBOD mode as well). Is this going to scramble my drive names again, and if so, how do I prevent it?
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Tue Jan 29, 2013 11:12 am    Post subject: Reply with quote

Chances are adding the disks will scramble the order.
The general solution is not to rely on this order.
The exact solution varies on the exact problem.
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Tue Jan 29, 2013 11:17 am    Post subject: Reply with quote

I am not sure, where that behaviour comes from, but at least on my FreeBSD Server, the harddrive on a addin card are listed before the onboard ones.

Assuming, that Linux behaves the same way, you drives will be moved around again. On the bright side, they will be in the same order, but the first drive might be off (e.g sda -> sdf or similar).

On way to avoid this problem is to access the drives via labels or uuid, though uuid might be the better solution in your case.
uuid and label can be using in grub as well as in fstab.


I hope that helps in some way.
V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
Carnildo
Guru
Guru


Joined: 17 Jun 2004
Posts: 594

PostPosted: Tue Jan 29, 2013 9:41 pm    Post subject: Reply with quote

VoidMage wrote:
Chances are adding the disks will scramble the order.
The general solution is not to rely on this order.
The exact solution varies on the exact problem.

The exact problems are:
1) The kernel panics about not being able to find root on startup
2) If I bypass 1) by passing a "root=" parameter from the LILO prompt, my software RAID array fails to build
3) Because the order is different between 2.6.38 and 3.5.7, if I change config files to solve 1) and 2), I lose the ability to drop back to an older kernel if the 3.5.7 kernel has problems.
Back to top
View user's profile Send private message
Carnildo
Guru
Guru


Joined: 17 Jun 2004
Posts: 594

PostPosted: Tue Jan 29, 2013 10:27 pm    Post subject: Reply with quote

Veldrin wrote:
On way to avoid this problem is to access the drives via labels or uuid, though uuid might be the better solution in your case.
uuid and label can be using in grub as well as in fstab.

/dev/disk/by-path/ looks like the IDs will change if I move the RAID cards around, /dev/disk/by-uuid doesn't have entries for my RAID disks, and /dev/disk/by-id/ doesn't look entirely sane (for example, my boot disk has two entries, as "/dev/disk/by-id/ata-CF_CARD_4GB_0" and "/dev/disk/by-id/scsi-SATA_CF_CARD_4GB_0").
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Tue Jan 29, 2013 10:30 pm    Post subject: Reply with quote

As for 1), booting by PARTUUID might be the solution, though that requires gpt-partitioned disk (though 3.8 will have a patch, that will enable something similar for MBR).
As for 3), Veldrin probably already covered it.
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 229
Location: Detroit, MI, USA

PostPosted: Thu Jan 31, 2013 2:22 am    Post subject: Reply with quote

The most reliable method would be to mount your root file system using a UUID. This requires the use of an initramfs.
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Mon Feb 04, 2013 2:45 am    Post subject: Reply with quote

Userspace will work on 2.6.38 and 3.5.7 with the same
linux-headers version? I doubt it. (Some kernel datatypes
exported to userspace will be too different for kernels
that far apart. Some exported by one kernel may not
even exist in the other kernel.)
_________________
TIA
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum