Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-30-2012, 06:17 AM
|
#1
|
Member
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 667
Rep:
|
added a couple of new disks and now /dev/sd* disks are all messed up
hello everyone,
I added a couple of SATA disks in a pc that already has 11 disks.
However, since the sata ports I started using, are "presented" to the kernel earlier than some of the other SATA ports (and all the IDE ports),these new disks get the mount point names of other disks.
Instead I want to give mount point names after the existing disks. in which file of the udev should I provide the necessary rules to do that??
or is there a better way to assing alphabetical order for the /dev/sd* mount points??
thank you!
|
|
|
10-30-2012, 09:04 AM
|
#2
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,979
|
Member Response
Hi,
You could consider 'UUID';
Quote:
NAME
uuid - DCE compatible Universally Unique Identifier library
SYNOPSIS
#include <uuid.h>
DESCRIPTION
The UUID library is used to generate unique identifiers for objects that may be accessible beyond the local system. This
library generates UUIDs compatible with those created by the Open Software Foundation (OSF) Distributed Computing Environ-
ment (DCE) utility uuidgen.
The UUIDs generated by this library can be reasonably expected to be unique within a system, and unique across all sys-
tems. They could be used, for instance, to generate unique HTTP cookies across multiple web servers without communication
between the servers, and without fear of a name clash.
CONFORMING TO
OSF DCE 1.1
AUTHOR
Theodore Y. Ts'o
AVAILABILITY
libuuid is part of the util-linux package since version 2.15.1 and is available from ftp://ftp.ker-
nel.org/pub/linux/utils/util-linux/.
SEE ALSO
uuid_clear(3), uuid_compare(3), uuid_copy(3), uuid_generate(3), uuid_is_null(3), uuid_parse(3), uuid_time(3),
uuid_unparse(3)
util-linux May 2009 UUID(3)
|
This way you will have a 'UUID' for each. Try: 'ls -l /dev/disk/by-uuid' to get identifiers. Then change your '/etc/fstab' to reflect the disk identification;
Quote:
ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Oct 26 07:47 02a8fbd0-77f9-4145-94e7-e3ec947f47a4 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 26 07:47 15d48839-1a84-4534-98ad-166749141843 -> ../../sda5
lrwxrwxrwx 1 root root 10 Oct 26 07:47 56075048-6587-420d-8b85-d487004abb6b -> ../../sda6
lrwxrwxrwx 1 root root 10 Oct 26 07:47 62383ed9-0b44-4f0a-8442-d8b577d10aea -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 26 07:47 7511198c-4ec4-41eb-b5fa-0476c8ae85f1 -> ../../sda3
lrwxrwxrwx 1 root root 10 Oct 26 07:47 791d3662-dccb-4872-959b-72933368ba2e -> ../../sda8
lrwxrwxrwx 1 root root 10 Oct 26 08:18 7de50eba-660e-4538-ae54-5bac260d7947 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Oct 26 07:47 803CABC83CABB814 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Oct 26 07:47 8442AA3F42AA3638 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Oct 26 08:18 9C64D17064D14DA0 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Oct 26 07:47 bcd302c6-fa2c-44dd-9a60-10e90610048f -> ../../sda9
lrwxrwxrwx 1 root root 10 Oct 26 07:47 d97d882e-aa2b-4431-a80e-42ae6a136a7a -> ../../sda7
lrwxrwxrwx 1 root root 10 Oct 26 07:47 ef08a3c2-ec35-4752-b6b3-d11fbbf321c5 -> ../../sdd1
|
|
|
1 members found this post helpful.
|
10-30-2012, 09:38 AM
|
#3
|
Member
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 667
Original Poster
Rep:
|
interesting indeed,
my uuid is a little empty
Quote:
root@stargaze:~# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Oct 30 12:01 10EC0ADBEC0ABACC -> ../../sdl1
lrwxrwxrwx 1 root root 10 Oct 30 12:01 16cada04-1785-4692-86d3-010ffe674a34 -> ../../dm-0
lrwxrwxrwx 1 root root 9 Oct 30 12:01 3c446b8d-6c92-4cfb-b78b-130b2f6778e6 -> ../../md0
lrwxrwxrwx 1 root root 10 Oct 30 12:01 885b4e2b-7d6c-4e2f-9e86-d7410af8d40d -> ../../sdm2
lrwxrwxrwx 1 root root 9 Oct 30 14:10 9D81-D1C2 -> ../../sdn
lrwxrwxrwx 1 root root 9 Oct 30 10:08 a22a4023-8d70-4508-b9f5-4d4332e7b66b -> ../../md2
lrwxrwxrwx 1 root root 10 Oct 30 12:01 f5f201c6-32b3-45b6-a737-14880aaec8aa -> ../../sdm1
lrwxrwxrwx 1 root root 9 Oct 30 12:01 fbb28b63-4879-4dee-a435-5b99d684527b -> ../../md1
|
but you gave me the idea to use the /dev/disk/by-id/
which will be pretty stable. no?
|
|
|
10-30-2012, 10:12 AM
|
#4
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,979
|
Member Response
Hi,
Yes, 'by-id' is useful.
|
|
|
10-30-2012, 10:16 AM
|
#5
|
Member
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 667
Original Poster
Rep:
|
thanks!
|
|
|
All times are GMT -5. The time now is 05:10 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|