~ubuntu-branches/ubuntu/vivid/lvm2/vivid

« back to all changes in this revision

Viewing changes to udev/69-dm-lvm-metad.rules

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2012-05-01 20:27:50 UTC
  • mto: (3.1.23 sid)
  • mto: This revision was merged to the branch mainline in revision 72.
  • Revision ID: package-import@ubuntu.com-20120501202750-gljjjtblowwq9mw8
Tags: upstream-2.02.95
ImportĀ upstreamĀ versionĀ 2.02.95

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
 
2
#
 
3
# This file is part of LVM2.
 
4
 
 
5
# Udev rules for LVM.
 
6
#
 
7
# Scan all block devices having a PV label for LVM metadata.
 
8
# Store this information in LVMetaD (the LVM metadata daemon) and maintain LVM
 
9
# metadata state for improved performance by avoiding further scans while
 
10
# running subsequent LVM commands or while using lvm2app library.
 
11
# Also, notify LVMetaD about any relevant block device removal.
 
12
#
 
13
# This rule is essential for having the information in LVMetaD up-to-date.
 
14
# It also requires blkid to be called on block devices before so only devices
 
15
# used as LVM PVs are processed (ID_FS_TYPE="LVM2_member" or "LVM1_member").
 
16
 
 
17
SUBSYSTEM!="block", GOTO="lvm_end"
 
18
 
 
19
# Device-mapper devices are processed only on change event or on supported synthesized event.
 
20
KERNEL=="dm-[0-9]*", ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="lvm_end"
 
21
 
 
22
# Only process devices already marked as a PV - this requires blkid to be called before.
 
23
ENV{ID_FS_TYPE}=="LVM2_member|LVM1_member", RUN+="$env{DM_SBIN_PATH}/pvscan --cache --major $major --minor $minor"
 
24
 
 
25
LABEL="lvm_end"