LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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

Reply
 
Search this Thread
Old 10-30-2012, 06:17 AM   #1
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slack(64|32)_v(13.37|14.0), debian6, ubuntu
Posts: 630

Rep: Reputation: 36
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!
 
Old 10-30-2012, 09:04 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,013
Blog Entries: 1

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
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.
Old 10-30-2012, 09:38 AM   #3
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slack(64|32)_v(13.37|14.0), debian6, ubuntu
Posts: 630

Original Poster
Rep: Reputation: 36
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?
 
Old 10-30-2012, 10:12 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,013
Blog Entries: 1

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
Member Response

Hi,

Yes, 'by-id' is useful.
 
Old 10-30-2012, 10:16 AM   #5
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slack(64|32)_v(13.37|14.0), debian6, ubuntu
Posts: 630

Original Poster
Rep: Reputation: 36
thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] RAID 5 with 4 hard disks... array started with only 3 out of 4 disks kikinovak Slackware 9 08-11-2012 06:33 AM
Disks added to RAID5 array. Need to use new space. wavila Linux - Enterprise 1 06-16-2011 02:47 AM
Seeing disks /dev/sda and /dev/sdb Skaperen Linux - Virtualization and Cloud 2 02-02-2011 04:08 PM
How to re-sync disks (/dev/sdc1, /dev/sdc3, etc) FireRaven Linux - Newbie 1 09-30-2010 12:45 AM
Installation Disks not recognized as official disks when booting with floppy coal-fire-ice Mandriva 13 12-09-2004 04:29 PM


All times are GMT -5. The time now is 06:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration