please help with evms/dmsetup weird problem

Ricardo Kleemann <[email protected]> Sat, 11 Oct 2008 16:38:34 -0700
Newsgroups gmane.linux.evms.devel
Message-ID <1223768314.6842.66.camel@laptop1>
Hi,

I have a Ubuntu 8.0.4 Server installation. EVMS gets installed by
default, however what I'm really using is LVM2 and RAID. I'm not really
using evms, even though evms does seem to take control of my devices.

So here's the weird problem I have. I have 4 disks, all of them with a
partition setup for swap. However, I am never able to get swap going. If
I try to do anything with these partitions, the system claims the
devices are busy, even though they really ARE NOT. They're not mounted
anywhere. Swap is not on. They're not part of any physical or logical
volume, neither are they part of any raid arrays.

I can even go as far as deleting the partitions in fdisk, at which point
certainly they're not claimed as used or existing. HOWEVER, as soon as I
go and create the partitions again, then suddenly, automatically, they
mysteriously become "used". Any operation I attempt to do with them,
returns "Device busy".

This has been driving me nuts for days.

I'm guessing evms and dmsetup are being used for the mapper, but I'm not
actually using either for anything. 

But I need help in diagnosing this and determining if it's safe to
completely remove evms from the system. I don't even have to remove it,
really, all I want to do is to be able to use the devices to turn on
swap, without the kernel claiming the devices are busy!

Here's an example... I have /dev/sda3 which currently isn't being used
for anything (and I've been trying to use it for swap). EVMS shows it as
one of its volumes:

$ sudo evms_query volumes
/dev/evms/md/md0
/dev/evms/md/md1
/dev/evms/sda3

Again, even though I'm not using it, dmsetup shows that it is active,
although not open, the output from 'dmsetup info' has:

Name:              sda3
State:             ACTIVE
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      254, 8
Number of targets: 1

Since it shows up in evms_query, what I did was delete it via the
"d:/dev/evms/sda3" command, which does go through and remove the volume:

$ sudo evms_query volumes
/dev/evms/md/md0
/dev/evms/md/md1

$ ls -l /dev/evms
total 0
drwxr-xr-x 2 root root 60 2008-10-11 16:20 dm
drwxr-xr-x 2 root root 80 2008-10-11 14:03 md

And I even went and removed sda3 from dmsetup as well because it was
still showing.

$ sudo dmsetup info|grep sda
Name:              sda3
Name:              sda2
Name:              sda1
$ sudo dmsetup remove sda3
$ sudo dmsetup info|grep sda
Name:              sda2
Name:              sda1

But this thing insists on refusing to let go...

$ sudo mkswap /dev/sda3
/dev/sda3: Device or resource busy

I'm guessing there's still something either with dmsetup or evms that is
still holding the device in the kernel but I simply can't figure this
out.

Any help would be greatly appreciated!

Thanks
Ricardo

Here's the partition info:
$ sudo fdisk -l /dev/sda|grep sda3
/dev/sda3           60318       60801     3887730   82  Linux swap /
Solaris




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Evms-devel mailing list
[email protected]
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel