From iuculano at debian.org Mon Nov 22 12:16:53 2010 From: iuculano at debian.org (Giuseppe Iuculano) Date: Mon, 22 Nov 2010 12:16:53 +0000 Subject: [Dmraid-debian-commits] [SCM] Maintenance of the dmraid package branch, master, updated. debian/1.0.0.rc16-3-2-g8d857ed Message-ID: The following commit has been merged in the master branch: commit 7b2bf79b870efdddb3941e4e82fe5eca4b715a81 Author: Modestas Vainius Date: Mon Nov 22 13:00:34 2010 +0100 Make dmraid-activate work with DDF1 arrays by special-casing their handling. Similar to ISW case, there do not seem to be a way for getting raid subsets for the physical drive except parsing native log. Closes: #603319 diff --git a/debian/dmraid-activate b/debian/dmraid-activate index f609a9d..7e73473 100644 --- a/debian/dmraid-activate +++ b/debian/dmraid-activate @@ -116,6 +116,58 @@ log_error() fi } +ddf1_virtual_drive_guids() +{ + ddf1_awk_script=$(cat <<'EOF' +BEGIN { + section = "" + disk_ref = "" + guid_i = 0 +} + +function section_begins(name) +{ + section = name + vd_guid = "" + drive_map = 0 +} + +{ + if (!/^0x/ && / at /) { + # Section begins + section_begins(substr($0, 1, match($0, / at /)-1)) + } else if (section == "Disk Data" && /^0x020 reference:[ \t]*[0-9A-Fx]+/) { + disk_ref = $3 + sub(/^0x/, "", disk_ref) + } else if (disk_ref) { + if (section == "Virtual Drive Config Record" && /^0x008 guid:/) { + vd_guid = substr($0, match($0,/\[[0-9a-f ]+\]$/)+1, RLENGTH-2) + gsub(/ /, "", vd_guid) + # IF LSI, do timestamp substitution to get persistent name, see + # 19_ddf1_lsi_persistent_name.patch + if (vd_guid ~ /^4c5349/) + vd_guid = substr(vd_guid, 1, 32) "47114711" substr(vd_guid, 41) + } else if (drive_map) { + # 0: 4BCBB980 @ 0 + if ($2 == disk_ref) { + guids[guid_i] = vd_guid + guid_i++ + } + } else if (vd_guid) { + drive_map = /^Drive map:/ + } + } +} +END { + # Print discovered virtual drive GUIDs which belong to this physical drive + for (guid in guids) + print guids[guid] +} +EOF +) + dmraid -i -n "$1" | awk "$ddf1_awk_script" +} + if grep -qs "\" /proc/cmdline; then log_warning "dmraid disabled by boot option" exit 0 @@ -141,10 +193,10 @@ if [ -z "$Raid_Name" ]; then exit 0 fi -# We need a special case for isw arrays, since it is possible to have several -# subsets of a RAID group, of varying RAID types. case "$Raid_Name" in isw_*) + # We need a special case for isw arrays, since it is possible to have several + # subsets of a RAID group, of varying RAID types. Isw_Group_Name=$Raid_Name Isw_Subsets=$(dmraid -i -n "/dev/$Node_Name" | grep volume | sed 's/.*volume: " *\(.*\)"$/\1/') @@ -154,6 +206,17 @@ case "$Raid_Name" in done break ;; + .ddf1_disks) + # Dummy name for the main DDF1 group. Needs special handling to + # find RAID subsets for this physical drive + Ddf1_guids=`ddf1_virtual_drive_guids "/dev/$Node_Name"` + + for ddf1_guid in $Ddf1_guids + do + activate_array "ddf1_${ddf1_guid}" + done + break + ;; *) activate_array "$Raid_Name" break -- Maintenance of the dmraid package From iuculano at debian.org Mon Nov 22 12:16:56 2010 From: iuculano at debian.org (Giuseppe Iuculano) Date: Mon, 22 Nov 2010 12:16:56 +0000 Subject: [Dmraid-debian-commits] [SCM] Maintenance of the dmraid package branch, master, updated. debian/1.0.0.rc16-3-2-g8d857ed Message-ID: The following commit has been merged in the master branch: commit 8d857eded5c93e8dd19b0c8206ec2590c23ea7ed Author: Giuseppe Iuculano Date: Mon Nov 22 13:03:00 2010 +0100 Updated changelog diff --git a/debian/changelog b/debian/changelog index 7d9462a..0126432 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +dmraid (1.0.0.rc16-4) unstable; urgency=low + + [ Modestas Vainius ] + * [7b2bf79] Make dmraid-activate work with DDF1 arrays by special- + casing their handling. Similar to ISW case, there do not seem to be + a way for getting raid subsets for the physical drive except parsing + native log. (Closes: #603319) + + -- Giuseppe Iuculano Mon, 22 Nov 2010 13:02:29 +0100 + dmraid (1.0.0.rc16-3) unstable; urgency=low * [3bea125] debian/patches/20_fix_isw_sectors_calculation.patch: Fix -- Maintenance of the dmraid package From iuculano at debian.org Mon Nov 22 12:17:08 2010 From: iuculano at debian.org (Giuseppe Iuculano) Date: Mon, 22 Nov 2010 12:17:08 +0000 Subject: [Dmraid-debian-commits] [SCM] Maintenance of the dmraid package annotated tag, debian/1.0.0.rc16-4, created. debian/1.0.0.rc16-4 Message-ID: The annotated tag, debian/1.0.0.rc16-4 has been created at 70da35a62c95f9e53e75d87a8afc213b05494e7b (tag) tagging 8d857eded5c93e8dd19b0c8206ec2590c23ea7ed (commit) replaces debian/1.0.0.rc16-3 tagged by Giuseppe Iuculano on Mon Nov 22 13:16:30 2010 +0100 - Shortlog ------------------------------------------------------------ Debian release 1.0.0.rc16-4 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAkzqXx4ACgkQNxpp46476aqUCwCfXWN9+qqchk4BlAbV0kATHhvo aSMAn33rE26vkyBb44yNbxRIcPNhOc3N =QB/q -----END PGP SIGNATURE----- Giuseppe Iuculano (1): Updated changelog Modestas Vainius (1): Make dmraid-activate work with DDF1 arrays by special-casing their handling. Similar to ISW case, there do not seem to be a way for getting raid subsets for the physical drive except parsing native log. ----------------------------------------------------------------------- -- Maintenance of the dmraid package