[gentoo-user] suspend2 with lvm

2006-09-29 Thread Shaochun Wang

Hi Everyone:

I use suspend2 and lvm at the same time. I use a lvm partition
(/dev/vg/swap) as my suspend target by setting
resume2=swap:/dev/vg/swap.

I order to use make it work, I use initramfs. It works properly except
that I get the following message when I shut down the computer:

Unable to shutdown: /dev/vg/swap

After some analyzing, I know it happens because the open count of
/dev/vg/swap is 2 when the script /lib/rcscripts/addons/lvm-stop.sh is
executed.

Maybe this is the problem of baselayout or my initramfs. 
How can I resolve it?

My initramfs is at
http://lcs.ios.ac.cn/~scwang/docs/initramfs_data.cpio.gz

The following is my some information of my system:
$ uname -a
$ Linux x31 2.6.16-suspend2-r8 #40 PREEMPT Fri Sep 29 14:25:38 
  CST 2006 i686 Intel(R) Pentium(R) M processor 1500MHz GNU/Linux

$ lvdisplay /dev/vg/swap
$   --- Logical volume ---
  LV Name/dev/vg/swap
  VG Namevg
  LV UUIDE6oRRu-qkza-XIb5-TnGw-rGak-v7Kr-Jr5qZL
  LV Write Accessread/write
  LV Status  available
  # open 2
  LV Size1000.00 MB
  Current LE 250
  Segments   1
  Allocation inherit
  Read ahead sectors 0
  Block device   254:4


-- 
Shaochun Wang [EMAIL PROTECTED]

GPG Fingerprint: 70C2 6945 0E46 E08B 419A  007C AC5C F21F 358A 0833
You can get my publickey from the following url:
http://lcs.ios.ac.cn/~scwang/docs/scwangpublickey.gpg
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] suspend2 with lvm

2006-09-29 Thread Richard Fish

On 9/29/06, Shaochun Wang [EMAIL PROTECTED] wrote:

Unable to shutdown: /dev/vg/swap

After some analyzing, I know it happens because the open count of
/dev/vg/swap is 2 when the script /lib/rcscripts/addons/lvm-stop.sh is
executed.

Maybe this is the problem of baselayout or my initramfs.
How can I resolve it?


I assume this is when you fully shutdown the system (shutdown -h now
or similar)?

If so, my first instinct is to simply ignore it, since it is totally
harmless.  But I suppose you could put this in your
/etc/conf.d/local.stop:

echo 0x /proc/suspend2/resume2

I'm not currently using suspend2, but IIRC, this should clear the
reference that suspend2 has on the device.

-Richard
--
gentoo-user@gentoo.org mailing list