1 |
On Thursday 01 July 2010 18:06:54 Nils Larsson wrote: |
2 |
> tor 2010-07-01 klockan 08:49 -0700 skrev Bill Longman: |
3 |
> > On 07/01/2010 08:44 AM, SpaceCake wrote: |
4 |
> > > So, it solves the first problem, identifiying the device, but how can I |
5 |
> > > tell to udev to use always /dev/sds (for example) for this device? |
6 |
> |
7 |
> You need to have the udev rule or the script that it runs look at |
8 |
> something specific(the swaplabel for instance). |
9 |
> |
10 |
> > > I'm thinking how can I instruct udev to turn off swap when the device |
11 |
> > > is removed, but this is another story :) |
12 |
> |
13 |
> I tried doing exactly what you're doing now awhile ago and this is where |
14 |
> I got stuck, swapoff needs the deivce node(path) to still exist, it |
15 |
> can't disable swap without it. I could never get swapoff to run before |
16 |
> udev removed the device node, so I ended up with the system thinking(or |
17 |
> at least reporting) that it had loads more swap than it actually did. |
18 |
|
19 |
It is blindingly obvious what mistake you are both making. |
20 |
|
21 |
You want to remove the device then disable swap. |
22 |
|
23 |
That will never work in a zillion years for all the good reasons mentioned |
24 |
elsewhere in this thread. |
25 |
|
26 |
You MUST disable swap THEN remove the device. This sequence is inviolate. |
27 |
|
28 |
|
29 |
-- |
30 |
alan dot mckinnon at gmail dot com |