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 |
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.
|
To check the UUIDs type:
Code:
ls -l /dev/disk/by-uuid |
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! |
Quote:
|
:D The internet is international, even when people have to use English.
|
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 |
Quote:
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 |
All times are GMT -5. The time now is 10:06 AM. |