Re: Predictable disk device numbering

2011-02-04 Thread Christopher Zimmermann
On 02/04/11 15:10, Matthias Guedemann wrote:
> On Fri, 4 Feb 2011 14:32:15 +0100, Christopher Zimmermann 
>  wrote:
>> I have a similar problem since I an using softraid to encrypt /var and
>> /home. The softraid device is usually on sd0. But when I have an usb
>> mass storage device plugged in during boot up it gets assigned to sd0
>> and softraid gets sd1. Still, my fstab tries to mount from /dev/sd0X.
>> This can be annoying.
> 
> it is, but an easy way to avoid this is to use the UID to mount. If your
> sd0X has no UID, simply open it with disklabel and save without other
> changes - this generates one. You can then change /dev/sd0X to UID.X in
> your fstab.
> 
> Matthias
> 
> 


Thanks! Just what I needed :)



Re: Predictable disk device numbering

2011-02-04 Thread Nick Holland

On 02/04/2011 08:32 AM, Christopher Zimmermann wrote:

Hi,

I have a similar problem since I an using softraid to encrypt /var and
/home. The softraid device is usually on sd0. But when I have an usb
mass storage device plugged in during boot up it gets assigned to sd0
and softraid gets sd1. Still, my fstab tries to mount from /dev/sd0X.
This can be annoying.
Is there no way to reserve sd0 or tell bioctl to use a higher number for
the softraid sdX? With vnd(3) this is not so much of a problem, because
vnd(3) devices won't conflict with unpredictable things like usb-sticks,
which share the sd(4) namespace.


Christopher

man diskmap
man mount  (search for UID)

Nick.



Re: Predictable disk device numbering

2011-02-04 Thread Matthias Guedemann
On Fri, 4 Feb 2011 14:32:15 +0100, Christopher Zimmermann  
wrote:
> I have a similar problem since I an using softraid to encrypt /var and
> /home. The softraid device is usually on sd0. But when I have an usb
> mass storage device plugged in during boot up it gets assigned to sd0
> and softraid gets sd1. Still, my fstab tries to mount from /dev/sd0X.
> This can be annoying.

it is, but an easy way to avoid this is to use the UID to mount. If your
sd0X has no UID, simply open it with disklabel and save without other
changes - this generates one. You can then change /dev/sd0X to UID.X in
your fstab.

Matthias



Re: Predictable disk device numbering

2011-02-04 Thread Christopher Zimmermann
Hi,

I have a similar problem since I an using softraid to encrypt /var and
/home. The softraid device is usually on sd0. But when I have an usb
mass storage device plugged in during boot up it gets assigned to sd0
and softraid gets sd1. Still, my fstab tries to mount from /dev/sd0X.
This can be annoying.
Is there no way to reserve sd0 or tell bioctl to use a higher number for
the softraid sdX? With vnd(3) this is not so much of a problem, because
vnd(3) devices won't conflict with unpredictable things like usb-sticks,
which share the sd(4) namespace.


Christopher