lvm: Deactivate lvs during bootstrap

When using FC storage, physical volumes are connected during boot, and vdsm
logical volumes are auto-activated by both /etc/rc.sysinit and
/etc/init.d/netfs startup scripts. These logical volumes do not pick changes
done by the SPM on the storage, which may lead to data corruption sooner or
later, when a vm is trying to write to logical volume with stale meta data.

This patch check all vdsm logical volumes during lvm bootstrap and
deactivate them if possible. Special logical volumes are refreshed,
since they are accessed early when connecting to storage pool, possibly
before lvm bootstrap is done. Open logical volumes are skipped because
we assume that they use correct meta data when opened.

To fix the auto-activation during boot, we could perform this only on
the first start of the service and limit the operation to FC storage.
However, we decided to use this on all block storage types, and on every
start of the service, as additional layer of protection from logical
volumes left active after unclean shutdown of the service, or other
failures to deactivate logical volumes.

Deactivation adds up to two lvchange calls for each volume group with
active logical volumes. After the first service start, logical volumes
are typically inactive and this change adds minimal additional cost,
refreshing active special logical volumes.

Depends on http://gerrit.ovirt.org/#/c/21500/ for refreshing multiple
logical volumes in one call.

Change-Id: I5f142ebca7a00d45f2500ad2631fab2366f2f7db
Bug-Url: https://bugzilla.redhat.com/1009812
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/21291
Reviewed-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/21501
Reviewed-by: Allon Mureinik <amureini@redhat.com>