* [gentoo-user] activating swap by udev event
@ 2010-07-01 13:49 SpaceCake
2010-07-01 14:05 ` Nils Larsson
2010-07-01 14:16 ` Neil Bothwick
0 siblings, 2 replies; 20+ messages in thread
From: SpaceCake @ 2010-07-01 13:49 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
Hi,
I would like to increase the speed of my machine by putting some swap on a
fast pendrive. It is working manually by starting a script
swapon -s
swapon -p -1 /dev/sdb1
swapoff /dev/sda6
swapon -p -2 /dev/sda6
swapon -s
but, I would like to make it automatic by creating an udev rule, so when I
plug in that device the swap space is automatically activated and the
priority is changed. I've tried to google for a solution like this, but I
did not find. Maybe you already have some script at hand :) can you please
share this with me?
Thanks
Laszlo
[-- Attachment #2: Type: text/html, Size: 614 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 13:49 [gentoo-user] activating swap by udev event SpaceCake
@ 2010-07-01 14:05 ` Nils Larsson
2010-07-01 14:16 ` Neil Bothwick
1 sibling, 0 replies; 20+ messages in thread
From: Nils Larsson @ 2010-07-01 14:05 UTC (permalink / raw
To: gentoo-user
tor 2010-07-01 klockan 15:49 +0200 skrev SpaceCake:
> Hi,
>
>
> I would like to increase the speed of my machine by putting some swap
> on a fast pendrive. It is working manually by starting a script
>
> swapon -s
> swapon -p -1 /dev/sdb1
> swapoff /dev/sda6
> swapon -p -2 /dev/sda6
> swapon -s
>
> but, I would like to make it automatic by creating an udev rule, so
> when I plug in that device the swap space is automatically activated
> and the priority is changed. I've tried to google for a solution like
> this, but I did not find. Maybe you already have some script at
> hand :) can you please share this with me?
>
> Thanks
> Laszlo
>
I tried doing something like this awhile ago. The problem I encountered
was that I couldn't disable the swap once the the device was removed,
swapoff couldn't find the device path(as it wasn't there anymore) but
the system thought the swap was still there. So plugging and unplugging
the swap stick got my system thinking it had loads of swap.
But I didn't experiment all that much, maybe there's a way. Tricking
udev to hold on to the device node until swap is disabled might be
possible.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 13:49 [gentoo-user] activating swap by udev event SpaceCake
2010-07-01 14:05 ` Nils Larsson
@ 2010-07-01 14:16 ` Neil Bothwick
2010-07-01 15:17 ` SpaceCake
1 sibling, 1 reply; 20+ messages in thread
From: Neil Bothwick @ 2010-07-01 14:16 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 764 bytes --]
On Thu, 1 Jul 2010 15:49:08 +0200, SpaceCake wrote:
> I would like to increase the speed of my machine by putting some swap
> on a fast pendrive. It is working manually by starting a script
>
> swapon -s
> swapon -p -1 /dev/sdb1
> swapoff /dev/sda6
> swapon -p -2 /dev/sda6
> swapon -s
>
> but, I would like to make it automatic by creating an udev rule, so
> when I plug in that device the swap space is automatically activated
> and the priority is changed.
Create the udev rule in the usual way and add
RUN="/path/to/your/script"
You must use a full path when running a program from a udev rule and the
program should exit quickly as udev blocks while it is running.
--
Neil Bothwick
What colour is a chameleon on a mirror?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 14:16 ` Neil Bothwick
@ 2010-07-01 15:17 ` SpaceCake
2010-07-01 15:26 ` Neil Bothwick
0 siblings, 1 reply; 20+ messages in thread
From: SpaceCake @ 2010-07-01 15:17 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]
I've never created udev rule so the usal way does not tell me too much :)
I've checked the net for examples but it looks like very complicated for me
:)
My usb stick looks like this
Bus 007 Device 015: ID 058f:6387 Alcor Micro Corp. Transcend JetFlash Flash
Drive
Can you share with me some example how can I use this info on udev rules?
Thanks
Laszlo
2010/7/1 Neil Bothwick <neil@digimed.co.uk>
> On Thu, 1 Jul 2010 15:49:08 +0200, SpaceCake wrote:
>
> > I would like to increase the speed of my machine by putting some swap
> > on a fast pendrive. It is working manually by starting a script
> >
> > swapon -s
> > swapon -p -1 /dev/sdb1
> > swapoff /dev/sda6
> > swapon -p -2 /dev/sda6
> > swapon -s
> >
> > but, I would like to make it automatic by creating an udev rule, so
> > when I plug in that device the swap space is automatically activated
> > and the priority is changed.
>
> Create the udev rule in the usual way and add
>
> RUN="/path/to/your/script"
>
> You must use a full path when running a program from a udev rule and the
> program should exit quickly as udev blocks while it is running.
>
>
> --
> Neil Bothwick
>
> What colour is a chameleon on a mirror?
>
[-- Attachment #2: Type: text/html, Size: 1667 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 15:17 ` SpaceCake
@ 2010-07-01 15:26 ` Neil Bothwick
2010-07-01 15:44 ` SpaceCake
0 siblings, 1 reply; 20+ messages in thread
From: Neil Bothwick @ 2010-07-01 15:26 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
On Thu, 1 Jul 2010 17:17:15 +0200, SpaceCake wrote:
> I've never created udev rule so the usal way does not tell me too
> much :) I've checked the net for examples but it looks like very
> complicated for me :)
http://www.reactivated.net/writing_udev_rules.html
> My usb stick looks like this
>
> Bus 007 Device 015: ID 058f:6387 Alcor Micro Corp. Transcend JetFlash
> Flash Drive
>
> Can you share with me some example how can I use this info on udev
> rules?
SUBSYSTEMS=="usb", KERNEL=="sd[a-z]1", ATTRS{idVendor}=="058f", ATTRS{idProduct}=="6387", RUN="/path/to/your/script"
That's all on one line.
--
Neil Bothwick
Like an atheist in a grave: all dressed up and no place to go.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 15:26 ` Neil Bothwick
@ 2010-07-01 15:44 ` SpaceCake
2010-07-01 15:49 ` Bill Longman
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: SpaceCake @ 2010-07-01 15:44 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]
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? Also I'm
thinking how can I instruct udev to turn off swap when the device is
removed, but this is another story :)
Thanks
L:
2010/7/1 Neil Bothwick <neil@digimed.co.uk>
> On Thu, 1 Jul 2010 17:17:15 +0200, SpaceCake wrote:
>
> > I've never created udev rule so the usal way does not tell me too
> > much :) I've checked the net for examples but it looks like very
> > complicated for me :)
>
> http://www.reactivated.net/writing_udev_rules.html
>
> > My usb stick looks like this
> >
> > Bus 007 Device 015: ID 058f:6387 Alcor Micro Corp. Transcend JetFlash
> > Flash Drive
> >
> > Can you share with me some example how can I use this info on udev
> > rules?
>
> SUBSYSTEMS=="usb", KERNEL=="sd[a-z]1", ATTRS{idVendor}=="058f",
> ATTRS{idProduct}=="6387", RUN="/path/to/your/script"
>
> That's all on one line.
>
> --
> Neil Bothwick
>
> Like an atheist in a grave: all dressed up and no place to go.
>
[-- Attachment #2: Type: text/html, Size: 1644 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 15:44 ` SpaceCake
@ 2010-07-01 15:49 ` Bill Longman
2010-07-01 15:59 ` SpaceCake
2010-07-01 16:06 ` Nils Larsson
2010-07-01 16:05 ` Alex Schuster
2010-07-01 16:08 ` Neil Bothwick
2 siblings, 2 replies; 20+ messages in thread
From: Bill Longman @ 2010-07-01 15:49 UTC (permalink / raw
To: gentoo-user
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? Also
> I'm thinking how can I instruct udev to turn off swap when the device is
> removed, but this is another story :)
Here's what I have in my /etc/fstab file for one of my USB keys. I
assume you could just change it to say swap instead.
<fs> <mntpt> <fs> <opts> <dump/pass>
UUID=BA62-89BD /mnt/key auto noauto,user,exec,nosuid 0 0
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 15:49 ` Bill Longman
@ 2010-07-01 15:59 ` SpaceCake
2010-07-01 18:59 ` Bill Longman
2010-07-01 16:06 ` Nils Larsson
1 sibling, 1 reply; 20+ messages in thread
From: SpaceCake @ 2010-07-01 15:59 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 832 bytes --]
that's good if I want to mount at a specific location, but for swap I need
the device name, but this is changes depending on how many other usb drives
are connected. Looks lik this is a tricky question :)
L:
2010/7/1 Bill Longman <bill.longman@gmail.com>
> 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? Also
> > I'm thinking how can I instruct udev to turn off swap when the device is
> > removed, but this is another story :)
>
> Here's what I have in my /etc/fstab file for one of my USB keys. I
> assume you could just change it to say swap instead.
>
> <fs> <mntpt> <fs> <opts> <dump/pass>
> UUID=BA62-89BD /mnt/key auto noauto,user,exec,nosuid 0 0
>
>
[-- Attachment #2: Type: text/html, Size: 1218 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 15:59 ` SpaceCake
@ 2010-07-01 18:59 ` Bill Longman
2010-07-01 19:21 ` Neil Bothwick
0 siblings, 1 reply; 20+ messages in thread
From: Bill Longman @ 2010-07-01 18:59 UTC (permalink / raw
To: gentoo-user
On 07/01/2010 08:59 AM, SpaceCake wrote:
> that's good if I want to mount at a specific location, but for swap I
> need the device name, but this is changes depending on how many other
> usb drives are connected. Looks lik this is a tricky question :)
No, you don't *NEED* the device name to mount swap, you can use a UUID
or a filesystem label:
# swapon -h
Usage:
swapon -a [-e] [-v] [-f] enable all swaps from /etc/fstab
swapon [-p priority] [-v] [-f] <special> enable given swap
swapon -s display swap usage summary
swapon -h display help
swapon -V display version
The <special> parameter:
{-L label | LABEL=label} LABEL of device to be used
{-U uuid | UUID=uuid} UUID of device to be used
<device> name of device to be used
<file> name of file to be used
Just put
LABEL=cakeswap none swap sw,user 0 0
in your fstab
and use "mkswap -L cakeswap" on your USB stick.
Certainly, you'd want to use "swapoff" *before* you removed the stick,
so that's going to have to be a manual step so I think you're stuck
unsticking your stick.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 18:59 ` Bill Longman
@ 2010-07-01 19:21 ` Neil Bothwick
0 siblings, 0 replies; 20+ messages in thread
From: Neil Bothwick @ 2010-07-01 19:21 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 533 bytes --]
On Thu, 01 Jul 2010 11:59:43 -0700, Bill Longman wrote:
> > that's good if I want to mount at a specific location, but for swap I
> > need the device name, but this is changes depending on how many other
> > usb drives are connected. Looks lik this is a tricky question :)
>
> No, you don't *NEED* the device name to mount swap, you can use a UUID
> or a filesystem label:
You have the device name in a UDEV rule, it is /dev/%k.
--
Neil Bothwick
deja noo - reminds you of the last time you visited Scotland
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 15:49 ` Bill Longman
2010-07-01 15:59 ` SpaceCake
@ 2010-07-01 16:06 ` Nils Larsson
2010-07-01 16:30 ` Albert Hopkins
2010-07-01 19:46 ` Alan McKinnon
1 sibling, 2 replies; 20+ messages in thread
From: Nils Larsson @ 2010-07-01 16:06 UTC (permalink / raw
To: gentoo-user
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.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 16:06 ` Nils Larsson
@ 2010-07-01 16:30 ` Albert Hopkins
2010-07-01 16:45 ` Nils Larsson
2010-07-01 16:49 ` SpaceCake
2010-07-01 19:46 ` Alan McKinnon
1 sibling, 2 replies; 20+ messages in thread
From: Albert Hopkins @ 2010-07-01 16:30 UTC (permalink / raw
To: gentoo-user
On Thu, 2010-07-01 at 18:06 +0200, 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.
This is a bad thing to do. If you have pages swapped out to the device
and you remove the device before putting those pages elsewhere then you
have effectively hosed your system. If it doesn't fail immediately then
as soon as the kernel tries to swap in those pages and finds out the
device it's on can't be accessed then you are in for a world of pain.
I guess the deeper question (although entirely rhetorical AFAIC) is why
would someone want to swap out to a removable device?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 16:30 ` Albert Hopkins
@ 2010-07-01 16:45 ` Nils Larsson
2010-07-01 16:49 ` SpaceCake
1 sibling, 0 replies; 20+ messages in thread
From: Nils Larsson @ 2010-07-01 16:45 UTC (permalink / raw
To: gentoo-user
> I guess the deeper question (although entirely rhetorical AFAIC) is why
> would someone want to swap out to a removable device?
Hot-pluggable swapspace. For various desperate and/or just-in-case
scenarios. One might argue that if you find there you did it wrong in
the first place.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 16:30 ` Albert Hopkins
2010-07-01 16:45 ` Nils Larsson
@ 2010-07-01 16:49 ` SpaceCake
1 sibling, 0 replies; 20+ messages in thread
From: SpaceCake @ 2010-07-01 16:49 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1893 bytes --]
This is a shame but the idea coming from Windows world. In Win7/Vista there
is a feature called ready boost which I suppose do something similar... or
maybe not :) the main goal is to break the bottleneck of the slow HDD, but
it is maybe a better idea to put some part of the system on a SDHC card
which can reside in my bulting SD slot :) I know, this is also removable :)
L:
2010/7/1 Albert Hopkins <marduk@letterboxes.org>
> On Thu, 2010-07-01 at 18:06 +0200, 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.
>
> This is a bad thing to do. If you have pages swapped out to the device
> and you remove the device before putting those pages elsewhere then you
> have effectively hosed your system. If it doesn't fail immediately then
> as soon as the kernel tries to swap in those pages and finds out the
> device it's on can't be accessed then you are in for a world of pain.
>
> I guess the deeper question (although entirely rhetorical AFAIC) is why
> would someone want to swap out to a removable device?
>
>
>
[-- Attachment #2: Type: text/html, Size: 2391 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 16:06 ` Nils Larsson
2010-07-01 16:30 ` Albert Hopkins
@ 2010-07-01 19:46 ` Alan McKinnon
2010-07-01 21:50 ` Neil Bothwick
1 sibling, 1 reply; 20+ messages in thread
From: Alan McKinnon @ 2010-07-01 19:46 UTC (permalink / raw
To: gentoo-user; +Cc: Nils Larsson
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
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 19:46 ` Alan McKinnon
@ 2010-07-01 21:50 ` Neil Bothwick
2010-07-01 21:59 ` Alan McKinnon
0 siblings, 1 reply; 20+ messages in thread
From: Neil Bothwick @ 2010-07-01 21:50 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
On Thu, 1 Jul 2010 21:46:15 +0200, Alan McKinnon wrote:
> 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.
You could use a udev rule to enable the swap, but it has to be removed
manually. But it does raise the question of why you would want swap on a
USB stick in the first place. It must be slower than hard disk swap, and
will wear out the flash memory. Instead of all this messing around, just
increase the size of your swap partition, or add another one.
--
Neil Bothwick
Rainbows are just to look at, not to really understand.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 21:50 ` Neil Bothwick
@ 2010-07-01 21:59 ` Alan McKinnon
0 siblings, 0 replies; 20+ messages in thread
From: Alan McKinnon @ 2010-07-01 21:59 UTC (permalink / raw
To: gentoo-user; +Cc: Neil Bothwick
On Thursday 01 July 2010 23:50:56 Neil Bothwick wrote:
> On Thu, 1 Jul 2010 21:46:15 +0200, Alan McKinnon wrote:
> > 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.
>
> You could use a udev rule to enable the swap, but it has to be removed
> manually. But it does raise the question of why you would want swap on a
> USB stick in the first place. It must be slower than hard disk swap, and
> will wear out the flash memory. Instead of all this messing around, just
> increase the size of your swap partition, or add another one.
Or deal with the actual underlying issue which is probably
"get more RAM"
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 15:44 ` SpaceCake
2010-07-01 15:49 ` Bill Longman
@ 2010-07-01 16:05 ` Alex Schuster
2010-07-01 16:09 ` Neil Bothwick
2010-07-01 16:08 ` Neil Bothwick
2 siblings, 1 reply; 20+ messages in thread
From: Alex Schuster @ 2010-07-01 16:05 UTC (permalink / raw
To: gentoo-user
SpaceCake writes:
> 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?
I think, you can's. But you can add SYMLINK="swap" to make the device
appear as /dev/swap, too.
> Also I'm thinking how can I instruct udev to turn off swap when the
> device is removed, but this is another story :)
I doubt this is possible at all. If you unplug it, the memory that has
been swapped there is lost.
Wonko
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 16:05 ` Alex Schuster
@ 2010-07-01 16:09 ` Neil Bothwick
0 siblings, 0 replies; 20+ messages in thread
From: Neil Bothwick @ 2010-07-01 16:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
On Thu, 1 Jul 2010 18:05:46 +0200, Alex Schuster 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?
>
> I think, you can's. But you can add SYMLINK="swap" to make the device
> appear as /dev/swap, too.
That's a better method anyway, later versions of udev complain if you
try to rename a device to a non-kernel name.
--
Neil Bothwick
Guns don't kill people--it's those little pieces of lead.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] activating swap by udev event
2010-07-01 15:44 ` SpaceCake
2010-07-01 15:49 ` Bill Longman
2010-07-01 16:05 ` Alex Schuster
@ 2010-07-01 16:08 ` Neil Bothwick
2 siblings, 0 replies; 20+ messages in thread
From: Neil Bothwick @ 2010-07-01 16:08 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 392 bytes --]
On Thu, 1 Jul 2010 17:44:24 +0200, 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)
I take it you haven't read the link I posted?
BTW, please don't top-post on this list.
--
Neil Bothwick
Programmer (n): A red-eyed, mumbling mammal capable of conversing
with inanimate objects.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2010-07-01 22:02 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-01 13:49 [gentoo-user] activating swap by udev event SpaceCake
2010-07-01 14:05 ` Nils Larsson
2010-07-01 14:16 ` Neil Bothwick
2010-07-01 15:17 ` SpaceCake
2010-07-01 15:26 ` Neil Bothwick
2010-07-01 15:44 ` SpaceCake
2010-07-01 15:49 ` Bill Longman
2010-07-01 15:59 ` SpaceCake
2010-07-01 18:59 ` Bill Longman
2010-07-01 19:21 ` Neil Bothwick
2010-07-01 16:06 ` Nils Larsson
2010-07-01 16:30 ` Albert Hopkins
2010-07-01 16:45 ` Nils Larsson
2010-07-01 16:49 ` SpaceCake
2010-07-01 19:46 ` Alan McKinnon
2010-07-01 21:50 ` Neil Bothwick
2010-07-01 21:59 ` Alan McKinnon
2010-07-01 16:05 ` Alex Schuster
2010-07-01 16:09 ` Neil Bothwick
2010-07-01 16:08 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox