Gentoo Archives: gentoo-amd64

From: "P.V.Anthony" <pvantony@×××××××××××.sg>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: Drive asignments for sata drives
Date: Tue, 13 Mar 2007 09:10:14
Message-Id: 45F669F2.30302@singnet.com.sg
In Reply to: [gentoo-amd64] Re: Drive asignments for sata drives by Bernhard Auzinger
1 Bernhard Auzinger wrote:
2 > Am Montag 12 März 2007 schrieb Marcus D. Hanwell:
3 >> On Monday 12 March 2007 17:00:09 Bob Sanders wrote:
4 >>> P.V.Anthony, mused, then expounded:
5 >>>> Currently in the fstab the boot and root partitions are set and working
6 >>>> great. Once a new sata drive connected, the drive assignments change.
7 >>>> Initially the / (root) is /dev/sda2. Once another sata drive is added
8 >>>> the / (root) becomes say /dev/sdb2.
9 >>>>
10 >>>> Is there any way that this can be fixed even when more drives are added
11 >>>> or removed?
12 >>> Typically, on the same controller, the lowest numbered port becomes the
13 >>> first drive. The description of the symptom leads me to believe that
14 >>> your /dev/sda drive is attached to port 2 instead of being attached to
15 >>> port 1. Have you tried moving your SATA cable to a different port?
16 >> I had the same problem and despite my existing drive being connected to
17 >> what was labelled on the motherboard as SATA1 it in fact was not! Trial and
18 >> error gave me the correct one... It would be useful if the nodes were more
19 >> fixed but most systems do not change after initial set up and this
20 >> situation can be fixed quite easily.
21 >
22 > Another way would be to use udev and the partitions uuid to mount the
23 > partition.
24 >
25 > With
26 >
27 > -> udevinfo --query=all --root --name sdb2 | grep uuid
28 >
29 > you get the uuid of the partition (in this case sda1). The output looks like:
30 >
31 > -> S: disk/by-uuid/24034503-e89e-4e6d-96b6-5dbc2e9b83cf
32 >
33 > Then you can mount the drive by simply typing (with the output that gives you
34 > the command above on your machine)
35 >
36 > -> mount UUID=24034503-e89e-4e6d-96b6-5dbc2e9b83cf /mnt_point
37 >
38 > or adding a line like
39 >
40 > -> UUID=3f465a84-8eac-4207-aeb6-b9178329af4f /mnt_point your_fs your_opts 0 2
41 >
42 > to your fstab
43 >
44 > With this solution the drives(partitions) should always be mounted at the same
45 > mount point, no matter at which controller it is attached physically.
46 >
47 > rgds
48 > Bernhard
49
50 Thanks to all who have responded to this email. The information sent
51 have solved my problems with the sata drives. I am very happy.
52
53 For the record, I have used the above solution and it is working great.
54
55 I hope one day grub will allow "root=UUID=something" then the problem is
56 completely solved.
57
58 I am very happy. Thank you all very much for helping.
59
60 P.V.Anthony
61
62 --
63 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] Re: Drive asignments for sata drives dustin@×××××××.us