LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-05-2012, 01:56 PM   #1
zimbot
Member
 
Registered: Nov 2005
Location: cincinnati , ohio . USA
Distribution: ubuntu , Opensuse , CentOS
Posts: 179

Rep: Reputation: 17
to add hard drive to fstab


I recently rebuilt a system by replacing the boot drive.
and installe opensuse 12.1 64bit from the dvd.
all is well.

but here is a thing I also have 3 1TB drives that are raided together in this box.
When I did the install mentioned above these (all 3 ) were unPowered so they were not 'seen'

I have looked at my fstab and did some googling..
i am rather certain that i need to add ( loosley speaking )
mount by id##bigIdNum### 1 1.

so my Q is how do do a 'probe' to see that id num

also.

i have a copy of my PRevious fstab..same machine , smae raid cntrler same 3 drives... would the id ###bigIdNum be the same? seems like it should be.

so that line in my previous fstab ---should work?

thanks
 
Old 05-05-2012, 02:49 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
The "id ###bigIdNum" is called UUID and is only set to a new value when you format the partition, so your previous line should work.
 
1 members found this post helpful.
Old 05-05-2012, 02:55 PM   #3
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
To check the UUIDs type:
Code:
ls -l /dev/disk/by-uuid
 
1 members found this post helpful.
Old 05-05-2012, 05:45 PM   #4
zimbot
Member
 
Registered: Nov 2005
Location: cincinnati , ohio . USA
Distribution: ubuntu , Opensuse , CentOS
Posts: 179

Original Poster
Rep: Reputation: 17
wonderful

I thought the uuid would be the same .
thanks for the word.
also -- i would like to take a moment to say how absolutely wonderful it is to ask a Q and get a response from germany and the UK.....
I love this world!
 
Old 05-05-2012, 05:50 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by zimbot View Post
also -- i would like to take a moment to say how absolutely wonderful it is to ask a Q and get a response from germany and the UK.....
I love this world!
Wonderful, isn't it. No nations in LinuxWorld.
 
Old 05-05-2012, 05:53 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
The internet is international, even when people have to use English.
 
Old 05-14-2012, 12:47 PM   #7
TheBigMing
Member
 
Registered: Dec 2008
Location: east anglia
Distribution: SuSE, antiX
Posts: 45

Rep: Reputation: 8
I tend to run 'fdisk -l' which provides an output something like this:

Device Boot Start End Blocks Id System
/dev/sda1 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 138618879 69206016 7 HPFS/NTFS/exFAT
/dev/sda3 * 138620926 1204279295 532829185 f W95 Ext'd (LBA)
/dev/sda4 1204279296 1250252799 22986752 27 Hidden NTFS WinRE
/dev/sda5 138620928 170063871 15721472 83 Linux
/dev/sda6 170065920 201519103 15726592 83 Linux
/dev/sda7 201521152 232974335 15726592 83 Linux
/dev/sda8 232976384 264429567 15726592 83 Linux
/dev/sda9 264431616 1191686143 463627264 83 Linux
/dev/sda10 1191688192 1204279295 6295552 82 Linux swap / Solaris

The output from "ls /dev/disk/by-uuid/" looks like this:

0b97651a-5f2b-4872-9463-35937194bde7 95309357-232d-49f2-9b2f-5eb8156ab882
3450F02350EFEA16 b8521e14-6947-4f42-a593-c90a5cfc99b5
577fb4aa-6d1a-422b-87be-e127ab96913f CCDEA062DEA04694
7d589e60-7820-4ac5-b39c-15d8b652d54e EA0CA49C0CA46573
84c2a6e0-c2a4-49e2-beeb-e3e84c7cf684

It is difficult to marry the two together.

However, SuSE has used, for some time, /dev/disk/by-id/. The output from "ls /dev/disk/by-id/" looks pretty much as follows:

ata-SAMSUNG_HM641JI_S26XJ9AB526974
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part1
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part10
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part2
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part3
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part4
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part5
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part6
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part7
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part8
ata-SAMSUNG_HM641JI_S26XJ9AB526974-part9
ata-SlimtypeDVD_A_DS8A5SH_104250078804
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part1
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part10
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part2
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part3
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part4
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part5
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part6
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part7
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part8
scsi-SATA_SAMSUNG_HM641JIS26XJ9AB526974-part9
wwn-0x50024e920551987c
wwn-0x50024e920551987c-part1
wwn-0x50024e920551987c-part10
wwn-0x50024e920551987c-part2
wwn-0x50024e920551987c-part3
wwn-0x50024e920551987c-part4
wwn-0x50024e920551987c-part5
wwn-0x50024e920551987c-part6
wwn-0x50024e920551987c-part7
wwn-0x50024e920551987c-part8
wwn-0x50024e920551987c-part9

and the entries in "fstab" will be (sort of) as follows:

/dev/disk/by-id/ata-SAMSUNG_HM641JI_S26XJ9AB526974-part10 swap swap defaults 0 0
/dev/disk/by-id/ata-SAMSUNG_HM641JI_S26XJ9AB526974-part5 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-SAMSUNG_HM641JI_S26XJ9AB526974-part9 /home ext3 acl,user_xattr 1 2

This is obviously a much easier way of seeing what's going on.

Also, I like to set up my various removable devices as I want. If you plug them in and run "/dev/disk/by-id/" you can find the name, create the entry in "fstab" and create the directory "/media/SanDisk16gb" (for example - see below).

There is a problem, however, with SuSE.12.1. For me, at any rate, the directories created in "/media" are not persistent; reboot and they are gone. I've created a "MkDir" script with lots of "mkdir /media/??????????" lines in it to get over this.

Maybe somebody knows a better way?

Hope this helps.

ming


/dev/disk/by-id usb-SanDisk_Cruzer_Slice_194252189652A504-0:0-part5 /media/SanDisk16gb ext3 acl,noauto,rw,exec,suid,user 1 2

/dev/disk/by-id/ata-SlimtypeDVD_A_DS8A5SH_104250078804 /media/cdrom iso9660 noauto,ro,user 0 0
 
Old 05-16-2012, 01:59 AM   #8
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Quote:
Originally Posted by zimbot View Post
I thought the uuid would be the same .
thanks for the word.
also -- i would like to take a moment to say how absolutely wonderful it is to ask a Q and get a response from germany and the UK.....
I love this world!
As tobiSGD said, the UUID is assigned to a partition when the partition is formatted. Be aware that if you ever need to replace the drive the UUIDs of the new drive will be different (why I don't use UUIDs).

Another method of mounting is to use labels when formatting. The fstab entry would then be something like: "LABEL=boot /boot ext4 acl,user_xattr 1 2" (for a separate boot partition)". See manpage for mount options.

Tom
 
  


Reply



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
Add flash drive to fstab file Gam3r21 Linux - Newbie 11 04-01-2011 01:10 AM
How to mount network ntfs drive on linux server and add it on FSTAB rahilmaknojia Linux - Newbie 9 01-28-2011 01:24 AM
mounting external hard drive in /etc/fstab Micro420 Linux - Newbie 1 11-07-2006 05:12 AM
fstab hard drive mount eastj1974 Linux - Newbie 2 07-05-2003 02:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 09:24 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration