Gentoo Archives: gentoo-desktop

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-desktop@l.g.o
Subject: [gentoo-desktop] Re: Desktop problem with /dev/hda
Date: Sun, 12 Sep 2010 00:53:53
Message-Id: pan.2010.09.12.00.52.53@cox.net
In Reply to: Re: [gentoo-desktop] Re: Desktop problem with /dev/hda by Lindsay Haisley
1 Lindsay Haisley posted on Sat, 11 Sep 2010 18:36:21 -0500 as excerpted:
2
3 > On Sat, 2010-09-11 at 17:08 -0500, Brent Busby wrote:
4 >> So the switch from /dev/hd* to /dev/sd* for such devices isn't just
5 >> cosmetic -- everything is now being handled by libata (which is the
6 >> Sata drivers), and if you have any Pata device drivers in your kernel
7 >> config, you'll want to get rid of those and replace them with
8 >> equivalent drivers from the Sata section of the kernel.
9 >>
10 >> Not doing this will cause very strange behavior with regard to DVD
11 >> drives in udev and hal, especially if you use Gnome.
12 >
13 > Ugh!! This sounds like the roadblock I ran into! The problem drive,
14 > /dev/hda, holds the root filesystem and several others, and didn't show
15 > up at all in /dev. Since the system also has several SATA drives, I'm
16 > using the sata_promise kernel module for these, but the SATA system on
17 > the MB is managed by a Promise chipset, which supposedly implements
18 > hardware RAID but it's proprietary so I'm just using plain old discrete
19 > non-RAID mode.
20
21 JBOD (just a bunch of disks) mode. I use it here, too. FWIW, I'm running
22 all SATA hard drives but the DVDRWs are PATA. I've been running an sdX
23 config for years (since I switched to kernel 2.6??), but did have to
24 change the fstab lines for the DVDRWs when I switched them over. They're
25 sr0 and sr1 now.
26
27 ...
28
29 From what you wrote earlier, I thought you had all SATA hard drives but
30 were depending on udev's compatibility rules to setup hdX symlinks to the
31 sdX devices, using the hdX symlinks in your fstab. If you're still using
32 pata and the devices themselves were hdX but are now sdX, that's a
33 different issue and there's a bit more excuse... tho as mentioned really
34 only if you've been living in a cave or under a rock for some years.
35
36 If you configure your own kernel, you should have run into that when doing
37 the make oldconfig, and could have adjusted accordingly then. But if you
38 depend on genkernel... well, let's just say I like to know what changes
39 are going on with my kernel, and that's one of the reasons I don't use
40 genkernel. (Tho for all I know, there was a warning when genkernel did
41 the change too, but I wouldn't know, as I don't use it.)
42
43 > I have rather a conflict here, since I already have a /dev/sda.
44
45 See vvv (below, those are arrows).
46
47 > Is there a HOWTO for using libata-supported kernel components, and
48 > configuring them in the kernel?
49
50 Someone familiar with the specific hardware you have might know exactly
51 what order (vvv) the devices would appear in, but I'm not, so it's of no
52 significance to me and I snipped it. I explain the general situation vvv.
53
54 > The linux kernel here already has CONFIG_ATA_PIIX, which supposedly
55 > talks the lingo of the ICH series I/O controller hub. What else do I
56 > need here, or where can I go to learn more?
57
58 As it did with hd* devices, the kernel assigns default sd* device names in
59 the order it detects them.
60
61 Generally speaking, for desktop and SOHO server systems, the detected
62 order remains relatively consistent, so using /dev/sdX type identifiers is
63 fine. Of course, in enterprise equipment with perhaps hundreds of drives
64 attached, that's not the case, but we're not talking that high a level
65 here, and obviously the detected order had remained the same before, so
66 presumably it will continue to do so... with very occasional exceptions
67 that tend to be noted well in advance (and warned about in ewarns for
68 Gentoo users who read them, even if they don't keep up with general Linux
69 news), for those following them.
70
71 The switch to libata and sdX devices by default, for PATA devices as well
72 as the SATA devices that pretty much always were sdX, was one such
73 exception. That happened quite some time ago in the kernel and I've long
74 since forgotten the articles I read on it, but they should be googlable if
75 you're interested.
76
77 The short version, however, is that for users with both PATA and SATA
78 devices who previously had both sdX and hdX drives, obviously, the
79 numbering is going to have to change with the switch to all-sdX. This is
80 a one-time change, however, and at least for consumer/SOHO level systems,
81 once the change is configured for, ordering should remain stable once
82 again for quite some time.
83
84 So here's the deal. You're upgrading over a huge gap, so the transition
85 won't be as smooth as it could be. But you already know the way to make
86 your root filesystem writable and etc from the previous trial, which will
87 help.
88
89 What you need to do is boot the new kernel/udev and note the device
90 ordering. You should have /dev/sdX devices for all hard drives now, both
91 PATA and SATA. What you need to do is figure out what the actual order is
92 -- as I said it should remain stable (as long as you don't change the
93 hardware config), but you have to figure it out, in ordered to put the
94 correct names in fstab.
95
96 Among other things, udev should create symlinks for each device UUID/GUID
97 to the associated name, and if you write down which GUID applies to which
98 device on your current system, you can use that to figure out which sdX
99 they end up on with the new layout.
100
101 One hint is that the kernel will probably pick an adaptor and enumerate
102 everything on it, then go on to the next one. So if you have two adaptors,
103 one with two devices and one with four, and it picks the one with four
104 first, that should fill up sda thru sdd, with sde and sdf from the one
105 with two, following. If it picks the other order, you'd have sda and sdb
106 from the two-drive adaptor, then sdc thru sdf from the four-drive adaptor.
107 As mentioned ^^^, order should remain consistent over boots as long as the
108 hardware config doesn't change, you just have to figure out which one
109 comes first once, and it should remain that way.
110
111 Once you've noted the order and figured out which sdX corresponds to which
112 device, make your rootfs writable as you did before, and change the
113 corresponding fstab and intermediate layer (lvm/dmraid/mdraid/etc) configs
114 so the mapping is to the new device names instead of the old ones. You
115 can then reboot, and it should come up as normal. =:^) (If it doesn't,
116 there's probably a mapping you forgot to change, somewhere.)
117
118 --
119 Duncan - List replies preferred. No HTML msgs.
120 "Every nonfree program has a lord, a master --
121 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-desktop] Re: Desktop problem with /dev/hda Lindsay Haisley <fmouse-gentoo@×××.com>
[gentoo-desktop] Re: LVM and drive renumbering Lindsay Haisley <fmouse-gentoo@×××.com>