From: Albert Hopkins <marduk@letterboxes.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] activating swap by udev event
Date: Thu, 01 Jul 2010 12:30:27 -0400 [thread overview]
Message-ID: <1278001827.9444.7.camel@paska> (raw)
In-Reply-To: <1278000414.11343.10.camel@growl>
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?
next prev parent reply other threads:[~2010-07-01 16:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1278001827.9444.7.camel@paska \
--to=marduk@letterboxes.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox