On 2012-09-18T18:28:29, Dejan Muhamedagic <de...@suse.de> wrote: > I got a report recently that a Raid1 resource failed to stop. It > turned out that some web management daemon called amDaemon kept > the MD devices open. After commit > 2f8ec082408fb5c825a5fe30ec436c7e5208aa0a (attached), there is a > code now which stops such processes.
Similar problem as we have with file systems, yes. > +get_users_pids() { > + local mddev=$1 > + local outp l > + ocf_log debug "running lsof to list $mddev users..." > + outp=`lsof $mddev | tail -n +2` > + echo "$outp" | awk '{print $2}' | sort -u > + echo "$outp" | while read l; do > + ocf_log warn "$l" > + done > +} Why not use "fuser"? (And I think the ocf_log warn should be dropped before shipping.) The code to do an escalating kill perhaps could be combined with the Filesystem script. Regards, Lars -- Architect Storage/HA SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) "Experience is the name everyone gives to their mistakes." -- Oscar Wilde _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/