View previous topic :: View next topic |
Author |
Message |
Carnildo Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 17 Jun 2004 Posts: 595
|
Posted: Tue Jan 29, 2013 10:54 am Post subject: Drive names change with kernel upgrade |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
VoidMage Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/16259984764821973534cdc.gif)
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Tue Jan 29, 2013 11:12 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Veldrin Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/StarCraft/starcraft_protoss_darktempl.gif)
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Tue Jan 29, 2013 11:17 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Carnildo Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 17 Jun 2004 Posts: 595
|
Posted: Tue Jan 29, 2013 9:41 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Carnildo Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 17 Jun 2004 Posts: 595
|
Posted: Tue Jan 29, 2013 10:27 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
VoidMage Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/16259984764821973534cdc.gif)
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Tue Jan 29, 2013 10:30 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
floppymaster Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/3240287164cd34bcc99923.png)
Joined: 07 Jul 2010 Posts: 231 Location: Detroit, MI, USA
|
Posted: Thu Jan 31, 2013 2:22 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
wcg Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 06 Jan 2009 Posts: 588
|
Posted: Mon Feb 04, 2013 2:45 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|