All of lore.kernel.org
 help / color / mirror / Atom feed
* Unable to deactivate lv, pehaps due to semaphore problem...
@ 2014-11-27 14:26 Gianluca Cecchi
  2014-11-27 14:33 ` Zdenek Kabelac
  0 siblings, 1 reply; 15+ messages in thread
From: Gianluca Cecchi @ 2014-11-27 14:26 UTC (permalink / raw)
  To: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 3338 bytes --]

Hello,
I'm unable to deactivate an lvm.

My system is RHEL 6.5 with lvm2-2.02.100-8.el6.x86_64 and kernel
2.6.32-431.29.2.el6.x86_64

I get error code 5 with message
  Logical volume VG_AAA_TEMP/LV_AAA_TEMP in use.

You can find output of
lvchange -d -d -d -d -d -d -an VG_AAA_TEMP/LV_AAA_TEMP
here:
https://drive.google.com/file/d/0BwoPbcrMv8mvTjlBMkRUbG9nczA/view?usp=sharing

Recreating sources from the related src.rpm the problem (as stated anyway
in error message too) is in code

activate/activate.c:711   Logical volume in use

that is
        while (open_count_check_retries--) {
                if (info->open_count > 0) {
                        if (open_count_check_retries) {
                                usleep(OPEN_COUNT_CHECK_USLEEP_DELAY);
                                log_debug_activation("Retrying open_count
check for %s/%s.",
                                                     lv->vg->name,
lv->name);
                                if (!lv_info(cmd, lv, 0, info, 1, 0))
                                        return -1;
                                continue;
                        }
                        log_error("Logical volume %s/%s in use.",
                                  lv->vg->name, lv->name);
                        return 0;
                } else
                        break;
        }

In fact I get this information querying device:

[root@orapr2 activate]# dmsetup info --checks
360a9800037543544465d424130533177
Name:              360a9800037543544465d424130533177
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      23
Major, minor:      253, 4
Number of targets: 1
UUID: mpath-360a9800037543544465d424130533177

[root@orapr2 activate]# dmsetup table 360a9800037543544465d424130533177
0 2097152 multipath 4 queue_if_no_path pg_init_retries 50
retain_attached_hw_handler 1 alua 2 1 round-robin 0 4 1 66:160 1 69:192 1
133:224 1 8:288 1 round-robin 0 4 1 8:96 1 68:48 1 129:32 1 130:128 1

I got in past days a problem related to sempahores
(maximum number of semaphore sets has been exceeded)
and I suspect that some resource could have been incorrectly locked.

The device is sort of
  [root@orapr2 ~]# multipath -l  360a9800037543544465d424130533177
360a9800037543544465d424130533177 dm-4 NETAPP,LUN
size=1.0G features='4 queue_if_no_path pg_init_retries 50
retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=0 status=active
| |- 1:0:1:7  sdaq 66:160  active undef  running
| |- 1:0:2:7  sdco 69:192  active undef  running
| |- 2:0:2:7  sdho 133:224 active undef  running
| `- 2:0:3:7  sdiy 8:288   active undef  running
`-+- policy='round-robin 0' prio=0 status=enabled
  |- 1:0:0:7  sdg  8:96    active undef  running
  |- 2:0:0:7  sdbp 68:48   active undef  running
  |- 1:0:3:7  sdeq 129:32  active undef  running
  `- 2:0:1:7  sdfm 130:128 active undef  running

and the filesystem on it has been successfully umounted, but

[root@orapr2 ~]# lvs VG_AAA_TEMP/LV_AAA_TEMP
  LV          VG          Attr       LSize    Pool Origin Data%  Move Log
Cpy%Sync Convert
  LV_AAA_TEMP VG_AAA_TEMP -wi-ao---- 1020.00m

How can I see the responsible for the reference that apparently keeps it
open?

Open count:        1
so I can check and eventually fix??

Thanks in advance.

Gianluca

[-- Attachment #1.2: Type: text/html, Size: 4801 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-11-27 17:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-27 14:26 Unable to deactivate lv, pehaps due to semaphore problem Gianluca Cecchi
2014-11-27 14:33 ` Zdenek Kabelac
2014-11-27 15:01   ` Gianluca Cecchi
2014-11-27 15:24     ` Zdenek Kabelac
2014-11-27 15:36       ` Gianluca Cecchi
2014-11-27 15:43         ` Zdenek Kabelac
2014-11-27 15:56           ` Gianluca Cecchi
2014-11-27 16:05             ` Zdenek Kabelac
2014-11-27 16:27               ` Gianluca Cecchi
2014-11-27 16:35                 ` Zdenek Kabelac
2014-11-27 16:46                   ` Gianluca Cecchi
2014-11-27 17:04                     ` Zdenek Kabelac
2014-11-27 17:18                       ` Gianluca Cecchi
2014-11-27 17:21                         ` Zdenek Kabelac
2014-11-27 17:49                           ` Gianluca Cecchi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.