Gentoo Archives: gentoo-amd64

From: Volker Armin Hemmann <volker.armin.hemmann@××××××××××××.de>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: conversion sda to lvm2 questions
Date: Fri, 12 Oct 2007 12:40:53
Message-Id: 200710121429.05913.volker.armin.hemmann@tu-clausthal.de
In Reply to: [gentoo-amd64] Re: conversion sda to lvm2 questions by Duncan <1i5t5.duncan@cox.net>
1 On Freitag, 12. Oktober 2007, Duncan wrote:
2
3 >
4 > Configuring mount-devices, you use /dev/sdX or /dev/srX, depending.
5 > (I'm not actually sure which one IDE drives use -- I run SATA drives but
6 > have my DVD burners on PATA still, using the libata drivers, and they
7 > get /dev/srX not /dev/sdX.) Basically, try both from grub and see which
8 > works. Once you figure out which devices it's using (srX or sdX), you'll
9 > need to setup your fstab using the correct ones.
10
11 no. just no.
12
13 The right thing, is not to mount by partition naming, but by uuid. That way it
14 does not matter if the partition is called 'hda2' or 'sda2' or 'srX' or 'sgX'
15 or whatever. Just mount by-uuid. It always works and it is great. Moved
16 around a partition? created some before it? No problem, because you don't
17 mount '/dev/hda2' you
18 mount '/dev/disk/by-uuid/c1a84bd9-91f1-420e-9880-d4290599a399'
19 >
20 > Keep in mind that it's possible your device numbering will change as
21 > well, particularly if you already had some SATA or SCSI devices. That's
22 > the most common problem people run into -- their device numbers changing
23 > around on them, because the kernel will load the drivers and test the
24 > drives in a different order than it did previously. Another variation on
25 > the same problem is that devices such as thumb drives and MP3 players
26 > typically load as SCSI devices, so once you switch to SCSI for your
27 > normal drives, you may find the device numbering changing depending on
28 > whether your MP3player/thumb-drive is plugged in or not at boot. One
29 > typical solution to this problem, if you find you have it, is using the
30 > other shortcuts automatically created by UDEV. Here, I use /dev/disk/by-
31 > label/xxxxx for my USB drive mount-devices in fstab, thus allowing me to
32 > keep them straight, and access them consistently regardless of whether I
33 > have one or more than one plugged in at once.
34
35 and all that problems can be solved with mounting by uuid for the harddisks.
36
37 *restdeletedwithoutreading*
38 --
39 gentoo-amd64@g.o mailing list