ALT Linux Bugzilla
– Attachment 3363 Details for
Bug 19150
Исправление поддержки device-mapper
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Use dmsetup info to obtain needed info.
0001-Fix-device-mapper-support.patch (text/plain), 3.85 KB, created by
Kirill A. Shutemov
on 2009-03-12 13:15:56 MSK
(
hide
)
Description:
Use dmsetup info to obtain needed info.
Filename:
MIME Type:
Creator:
Kirill A. Shutemov
Created:
2009-03-12 13:15:56 MSK
Size:
3.85 KB
patch
obsolete
>From 02abd65c7030057d6da6c88345530fa0c4d0bfff Mon Sep 17 00:00:00 2001 >From: Kirill A. Shutemov <kirill@shutemov.name> >Date: Thu, 12 Mar 2009 11:55:13 +0200 >Subject: [PATCH] Fix device-mapper support > >dmsetup in ALT Linux hasn't 'export' command. Use 'dmsetup info' to >obtain needed information. > >Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> >--- > configure.ac | 1 + > extras/Makefile.am | 1 + > extras/dm_export/Makefile.am | 5 +++++ > extras/dm_export/dm_export | 12 ++++++++++++ > rules/Makefile.am | 2 +- > rules/altlinux/64-device-mapper.rules | 11 +++++++---- > 6 files changed, 27 insertions(+), 5 deletions(-) > create mode 100644 extras/dm_export/Makefile.am > create mode 100755 extras/dm_export/dm_export > >diff --git a/configure.ac b/configure.ac >index ac921a7..3f38924 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -89,6 +89,7 @@ AC_CONFIG_FILES([ > extras/Makefile > extras/ata_id/Makefile > extras/cdrom_id/Makefile >+ extras/dm_export/Makefile > extras/edd_id/Makefile > extras/hotplug/Makefile > extras/path_id/Makefile >diff --git a/extras/Makefile.am b/extras/Makefile.am >index 790e26f..36f2bfa 100644 >--- a/extras/Makefile.am >+++ b/extras/Makefile.am >@@ -3,6 +3,7 @@ include $(top_srcdir)/Makefile.am.inc > SUBDIRS = \ > ata_id \ > cdrom_id \ >+ dm_export \ > edd_id \ > hotplug \ > path_id \ >diff --git a/extras/dm_export/Makefile.am b/extras/dm_export/Makefile.am >new file mode 100644 >index 0000000..0b04031 >--- /dev/null >+++ b/extras/dm_export/Makefile.am >@@ -0,0 +1,5 @@ >+include $(top_srcdir)/Makefile.am.inc >+ >+udevhomedir = $(udev_prefix)/lib/udev >+dist_udevhome_SCRIPTS = \ >+ dm_export >diff --git a/extras/dm_export/dm_export b/extras/dm_export/dm_export >new file mode 100755 >index 0000000..94938cf >--- /dev/null >+++ b/extras/dm_export/dm_export >@@ -0,0 +1,12 @@ >+#!/bin/sh -e >+ >+major=$1 >+minor=$2 >+ >+dm_get() { >+ /sbin/dmsetup info -o $1 -c --noheadings -j$major -m$minor >+} >+ >+echo "DM_NAME=$(dm_get name)" >+echo "DM_UUID=$(dm_get uuid)" >+echo "DM_SUSPENDED=$(dm_get suspended)" >diff --git a/rules/Makefile.am b/rules/Makefile.am >index e455c79..e77a4e7 100644 >--- a/rules/Makefile.am >+++ b/rules/Makefile.am >@@ -16,7 +16,7 @@ dist_altudevrules_DATA = \ > altlinux/20-hotplug-scripts.rules \ > altlinux/40-alsa.rules \ > packages/64-md-raid.rules \ >- suse/64-device-mapper.rules \ >+ altlinux/64-device-mapper.rules \ > altlinux/70-permissions.rules \ > altlinux/94-pam-console.rules > >diff --git a/rules/altlinux/64-device-mapper.rules b/rules/altlinux/64-device-mapper.rules >index 15e7ddf..6f9c88b 100644 >--- a/rules/altlinux/64-device-mapper.rules >+++ b/rules/altlinux/64-device-mapper.rules >@@ -5,19 +5,22 @@ KERNEL=="device-mapper", SYMLINK+="mapper/control" > KERNEL!="dm-*", GOTO="device_mapper_end" > ACTION!="add|change", GOTO="device_mapper_end" > >-IMPORT{program}="/sbin/dmsetup export -j%M -m%m" >+IMPORT{program}="dm_export %M %m" > ENV{DM_NAME}!="?*", GOTO="device_mapper_end" > > SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}", OPTIONS+="string_escape=replace" > ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace" > >-ENV{DM_STATE}=="SUSPENDED", GOTO="device_mapper_end" >-ENV{DM_TARGET_TYPES}=="|*error*", GOTO="device_mapper_end" >+ENV{DM_SUSPENDED}=="Suspended", GOTO="device_mapper_end" >+ >+#FIXME >+#ENV{DM_TARGET_TYPES}=="|*error*", GOTO="device_mapper_end" > > IMPORT{program}="vol_id --export $tempnode" > OPTIONS+="link_priority=-100" > OPTIONS+="watch" >-ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90" >+# FIXME >+#ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90" > ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" > ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" > >-- >1.6.1.3.GIT >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19150
: 3363