[clug] achieving persistent device (disk) names

Kim Holburn kim.holburn at nicta.com.au
Wed Dec 14 06:55:17 GMT 2005


Sorry I didn't see Leigh's answer.  Ignore my last post.

On 2005 Dec 14, at 5:37 PM, Kim Holburn wrote:

> I was talking to Michael about this before and I mentioned using  
> labels in fstab.  Does anyone know how to read and write partitions  
> labels?
>
>
>
> Here is an example from a redhat system:
>
> # more /etc/fstab
> LABEL=/        /               ext3    defaults        1 1
> LABEL=/boot    /boot           ext3    defaults        1 2
> LABEL=/boot2   /boot2          ext3    defaults        1 2
> LABEL=/usr     /usr            ext3    defaults        1 2
> LABEL=/var     /var            ext3    defaults        1 2
> none            /dev/pts        devpts  gid=5,mode=620  0 0
> none            /proc           proc    defaults        0 0
> none            /dev/shm        tmpfs   defaults        0 0
> /dev/cdrom      /mnt/cdrom      udf,iso9660 noauto,owner,kudzu,ro 0 0
> /dev/cdrom1     /mnt/cdrom1     udf,iso9660 noauto,owner,kudzu,ro 0 0
> /dev/fd0        /mnt/floppy     auto    noauto,owner,kudzu 0 0
> /dev/hde        /mnt/floppy1    auto    noauto,owner,kudzu 0 0
>
> On 2005 Dec 14, at 4:38 PM, Michael James wrote:
>
>> As the names  /dev/sda,  sdb,  sdc, etc are allocated,
>>  the system disk keeps getting pushed to the end of the list.
>>
>> This is a pain as I have to boot a rescue system
>>  and edit  /etc/fstab and /boot/grub/menu.1st
>>
>> I'd like to offer the system some hints
>>  so it will always find it's system disk.
>> The data disks can be fixed up later.
>>
>> Is udev the way to do this?
>>
>> If it is, what udev rules will ensure a particular SYSFS disk
>>  ALWAYS comes out as /dev/sda?
>>
>> Or if asking for  "sda"  is unwise, (it will probably already exist)
>>  is there a convention?  Something like  "/dev/root"  or  "/dev/ 
>> system"?
>>
>> I tried this in  "/etc/udev/udev.rules"  but nothing happened.
>> BUS="scsi", SYSFS{model}="PERCRAID Mirror ", NAME="root"
>>
>> TIA,
>> michaelj
>> -- 
>> Konqueror has gotten so clever for its own boots
>>   that it has forgotten what a web browser is for.
>> -- 
>> linux mailing list
>> linux at lists.samba.org
>> https://lists.samba.org/mailman/listinfo/linux
>
> -- 
> Kim Holburn
> Security Manager, National ICT Australia Ltd.
> Ph: +61 2 61258620 M: +61 417820641  F: +61 2 6230 6121 aim:// 
> kimholburn
> Email: kim.holburn at nicta.com.au  - PGP Public Key on request   
> callto://kholburn
> Cacert Root Cert: http://www.cacert.org/cacert.crt
> Aust. Spam Act: To stop receiving mail from me: reply and let me know.
>
> Use ISO 8601 dates [YYYY-MM-DD] http://www.saqqara.demon.co.uk/ 
> datefmt.htm
> Democracy imposed from without is the severest form of tyranny.
>                           -- Lloyd Biggle, Jr. Analog, Apr 1961
>
>
> -- 
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux

-- 
Kim Holburn
Security Manager, National ICT Australia Ltd.
Ph: +61 2 61258620 M: +61 417820641  F: +61 2 6230 6121 aim://kimholburn
Email: kim.holburn at nicta.com.au  - PGP Public Key on request   
callto://kholburn
Cacert Root Cert: http://www.cacert.org/cacert.crt
Aust. Spam Act: To stop receiving mail from me: reply and let me know.

Use ISO 8601 dates [YYYY-MM-DD] http://www.saqqara.demon.co.uk/ 
datefmt.htm
Democracy imposed from without is the severest form of tyranny.
                           -- Lloyd Biggle, Jr. Analog, Apr 1961




More information about the linux mailing list