Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/mdadm/files: raid-start.sh-2.6.3-r2 64-md-raid.rules-2.6.3-r2 digest-mdadm-2.6.3-r2 raid-stop.sh-2.6.3-r2
Date: Wed, 03 Oct 2007 12:28:08
Message-Id: E1Id2sI-0004Sy-HP@stork.gentoo.org
1 robbat2 07/10/03 11:58:46
2
3 Added: raid-start.sh-2.6.3-r2 64-md-raid.rules-2.6.3-r2
4 digest-mdadm-2.6.3-r2 raid-stop.sh-2.6.3-r2
5 Log:
6 Add udev rules per bug #182960. Add support for partitioned md devices per #123380. Rip out the old raidtools support since raidtools is long gone.
7 (Portage version: 2.1.3.11)
8
9 Revision Changes Path
10 1.1 sys-fs/mdadm/files/raid-start.sh-2.6.3-r2
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-2.6.3-r2?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-2.6.3-r2?rev=1.1&content-type=text/plain
14
15 Index: raid-start.sh-2.6.3-r2
16 ===================================================================
17 # /lib/rcscripts/addons/raid-start.sh: Setup raid volumes at boot
18 # Copyright 1999-2005 Gentoo Foundation
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-2.6.3-r2,v 1.1 2007/10/03 11:58:45 robbat2 Exp $
21
22 [ -f /proc/mdstat ] || exit 0
23
24 # We could make this dynamic, but eh
25 #[ -z ${MAJOR} ] && export MAJOR=$(awk '$2 == "md" { print $1 }' /proc/devices)
26 MAJOR=9
27
28 # Try to make sure the devices exist before we use them
29 create_devs() {
30 local node dir minor
31 for node in $@ ; do
32 [ "${node#/dev}" != "${node}" ] && node="/dev/${node}"
33 [ -e "${node}" ] && continue
34
35 dir="${node%/*}"
36 [ ! -d "${dir}" ] && mkdir -p "${dir}"
37
38 minor="${node##*/}"
39 mknod "${node}" b ${MAJOR} "${minor##*md}" &> /dev/null
40 done
41 }
42
43 # Start software raid with mdadm (new school)
44 mdadm_conf="/etc/mdadm/mdadm.conf"
45 [ -e /etc/mdadm.conf ] && mdadm_conf="/etc/mdadm.conf"
46 if [ -x /sbin/mdadm -a -f "${mdadm_conf}" ] ; then
47 devs="$(awk '/^[[:space:]]*ARRAY/ { print $2 }' ${mdadm_conf})"
48 if [ -n "${devs}" ]; then
49 create_devs ${devs}
50 ebegin "Starting up RAID devices (mdadm)"
51 output=$(mdadm -As 2>&1)
52 ret=$?
53 [ ${ret} -ne 0 ] && echo "${output}"
54 eend ${ret}
55 fi
56 fi
57
58 partitioned_devs="$(find /dev -maxdepth 1 -name 'md_d*')"
59 if [ -n "${partitioned_devs}" ]; then
60 ebegin "Creating RAID device partitions"
61 /sbin/blockdev ${partitioned_devs}
62 eend 0
63 # wait because vgscan runs next, and we want udev to fire
64 sleep 1
65 fi
66
67 # vim:ts=4
68
69
70
71 1.1 sys-fs/mdadm/files/64-md-raid.rules-2.6.3-r2
72
73 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/mdadm/files/64-md-raid.rules-2.6.3-r2?rev=1.1&view=markup
74 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/mdadm/files/64-md-raid.rules-2.6.3-r2?rev=1.1&content-type=text/plain
75
76 Index: 64-md-raid.rules-2.6.3-r2
77 ===================================================================
78 # md links hook into "change" events, when the array becomes available
79
80 SUBSYSTEM!="block", GOTO="md_end"
81 KERNEL!="md[0-9]*", GOTO="md_end"
82 ACTION!="add|change", GOTO="md_end"
83
84 ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
85
86 IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
87 ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}"
88 ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
89
90 IMPORT{program}="vol_id --export $tempnode"
91 OPTIONS="link_priority=100"
92 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
93 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
94
95 LABEL="md_end"
96
97
98
99 1.1 sys-fs/mdadm/files/digest-mdadm-2.6.3-r2
100
101 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/mdadm/files/digest-mdadm-2.6.3-r2?rev=1.1&view=markup
102 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/mdadm/files/digest-mdadm-2.6.3-r2?rev=1.1&content-type=text/plain
103
104 Index: digest-mdadm-2.6.3-r2
105 ===================================================================
106 MD5 2d3950028253a856f065763e5bd78b1c mdadm-2.6.3.tar.bz2 151822
107 RMD160 236f38c021d92e387cf00f66a28d1a35d160740b mdadm-2.6.3.tar.bz2 151822
108 SHA256 5da1da7e2e9df39071016e6914769f685574dc50d94b6b2bbfaec18e376c070c mdadm-2.6.3.tar.bz2 151822
109
110
111
112 1.1 sys-fs/mdadm/files/raid-stop.sh-2.6.3-r2
113
114 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/mdadm/files/raid-stop.sh-2.6.3-r2?rev=1.1&view=markup
115 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/mdadm/files/raid-stop.sh-2.6.3-r2?rev=1.1&content-type=text/plain
116
117 Index: raid-stop.sh-2.6.3-r2
118 ===================================================================
119 # /lib/rcscripts/addons/raid-stop.sh: Stop raid volumes at shutdown
120 # Copyright 1999-2005 Gentoo Foundation
121 # Distributed under the terms of the GNU General Public License v2
122 # $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-stop.sh-2.6.3-r2,v 1.1 2007/10/03 11:58:45 robbat2 Exp $
123
124 [ -f /proc/mdstat ] || exit 0
125
126 # Stop software raid with mdadm (new school)
127 mdadm_conf="/etc/mdadm/mdadm.conf"
128 [ -e /etc/mdadm.conf ] && mdadm_conf="/etc/mdadm.conf"
129 if [ -x /sbin/mdadm -a -f "${mdadm_conf}" ] ; then
130 ebegin "Shutting down RAID devices (mdadm)"
131 output=$(mdadm -Ss 2>&1)
132 ret=$?
133 [ ${ret} -ne 0 ] && echo "${output}"
134 eend ${ret}
135 fi
136
137 # vim:ts=4
138
139
140
141 --
142 gentoo-commits@g.o mailing list