1 |
On Mon, Oct 3, 2011 at 11:40 AM, Grant Edwards |
2 |
<grant.b.edwards@×××××.com> wrote: |
3 |
> Just recently I've run in to problems because my hard drives are not |
4 |
> detected in a predictable order, so my fstab that mount /dev/sdb1 and |
5 |
> /dev/sdc1 sometimes result in directory trees in the wrong places |
6 |
> (/dev/sda seems consistent, but I don't know why). |
7 |
> |
8 |
> What's the recommended way to fix this? |
9 |
|
10 |
You can set labels to all the partitions, and set /etc/fstab to use |
11 |
them: my fstab looks like: |
12 |
|
13 |
LABEL=Gentoo / ext4 noatime 0 1 |
14 |
LABEL=Swap none swap sw 0 0 |
15 |
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 |
16 |
tmpfs /tmp tmpfs defaults,nosuid 0 0 |
17 |
|
18 |
I believe this is the recommended way to use fstab in distros like |
19 |
Fedora and OpenSUSE, because of your use case exactly. |
20 |
|
21 |
You can set labels to ext[234] partitions with e2label, and for NTFS |
22 |
partitions you can use ntfslabel, and to swap partitions with mkswap. |
23 |
I suppose every filesystem in the world has a similar tool to set its |
24 |
label. |
25 |
|
26 |
Regards. |
27 |
-- |
28 |
Canek Peláez Valdés |
29 |
Posgrado en Ciencia e Ingeniería de la Computación |
30 |
Universidad Nacional Autónoma de México |