On Thursday 01 July 2010 18:06:54 Nils Larsson wrote:
> tor 2010-07-01 klockan 08:49 -0700 skrev Bill Longman:
> > On 07/01/2010 08:44 AM, SpaceCake wrote:
> > > So, it solves the first problem, identifiying the device, but how can I
> > > tell to udev to use always /dev/sds (for example) for this device?
> 
> You need to have the udev rule or the script that it runs look at
> something specific(the swaplabel for instance).
> 
> > > I'm thinking how can I instruct udev to turn off swap when the device
> > > is removed, but this is another story :)
> 
> I tried doing exactly what you're doing now awhile ago and this is where
> I got stuck, swapoff needs the deivce node(path) to still exist, it
> can't disable swap without it. I could never get swapoff to run before
> udev removed the device node, so I ended up with the system thinking(or
> at least reporting) that it had loads more swap than it actually did.
 
It is blindingly obvious what mistake you are both making.

You want to remove the device then disable swap.

That will never work in a zillion years for all the good reasons mentioned 
elsewhere in this thread.

You MUST disable swap THEN remove the device. This sequence is inviolate.


-- 
alan dot mckinnon at gmail dot com

Reply via email to