Changeset 3432 in MondoRescue
- Timestamp:
- Aug 28, 2015, 2:34:47 AM (10 years ago)
- Location:
- branches/3.2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/MondoRescue/lib/MondoRescue/Disk.pm
r3369 r3432 64 64 return ($type); 65 65 } 66 67 -
branches/3.2/MondoRescue/lib/MondoRescue/LVM.pm
r3312 r3432 160 160 161 161 The LVM hash is indexed by VGs, provided by the vg_name attribute of the pvs command 162 162 163 vg_name - Name of the volume group linked to this PV 163 164 … … 169 170 170 171 The structure contains an array of PVs called pvs and starting at 1, containing the name of the PV as provided by the pv_name attribute of the pvs command 172 171 173 pv_name - Name of the physical volume PV 172 174 -
branches/3.2/mindi/analyze-my-lvm
r3312 r3432 82 82 local device stripes stripesize device fname allocation output readahead 83 83 fname=$MINDI_TMP/PLF.$$.txt 84 fname2=$MINDI_TMP/PLF2.$$.txt 84 85 device=$1 85 86 output="" … … 89 90 [ "$stripesize" = "m" ] && stripesize=`GetValueFromField $fname "Stripe size (KByte)"`k 90 91 [ "$stripesize" = "k" ] && stripesize="" 91 allocation=`GetValueFromField $fname "LV Size"` 92 [ ! "`echo "$allocation" | grep "[k,m,g,t]"`" ] && allocation="$allocation"m 93 if echo "$allocation" | grep -E '^.*g$' > /dev/null 2> /dev/null ; then 94 val=`echo "$allocation" | sed s/g//` 95 allocation=`echo "$val" | awk '{c=$1; printf "%d", c*1024;}'`m 96 fi 92 currentLE=`GetValueFromField $fname "Current LE"` 93 vgname=`GetValueFromField $fname "VG Name"` 94 $LVMCMD vgdisplay $vgname | cat > $fname2 95 totalLE=`GetValueFromField $fname2 "Total PE"` 96 allocation=`perl -e '$per='$currentLE'*100/'$totalLE' ; print int($per+0.5)."%VG";'` 97 97 readahead=`GetValueFromField $fname "Read ahead sectors"` 98 rm -f $fname 98 rm -f $fname $fname2 99 99 [ "$stripes" ] && output="$output -i $stripes" 100 100 [ "$stripesize" ] && output="$output -I $stripesize" 101 [ "$allocation" ] && output="$output - L$allocation"101 [ "$allocation" ] && output="$output -l $allocation" 102 102 [ "$readahead" ] && output="$output -r $readahead" 103 103 echo "$output" -
branches/3.2/mindi/mindi
r3430 r3432 144 144 if [ _"$2" != _"" ]; then 145 145 grep -Ev "tar: Removing [a-z ]*\`/\'" "$2" >> $LOGFILE 146 fi147 rm -f "$2"146 rm -f "$2" 147 fi 148 148 } 149 149 -
branches/3.2/mondo/src/common/libmondo-devices.c
r3431 r3432 1091 1091 1092 1092 if (device_raw[0] != '/' && !strstr(device_raw, ":/")) { 1093 log_msg(1, "%s needs to have a '/' prefixed - I'll do it", 1094 device_raw); 1093 log_msg(1, "%s needs to have a '/' prefixed - I'll do it", device_raw); 1095 1094 mr_asprintf(tmp, "/%s", device_raw); 1096 1095 } else { … … 1099 1098 log_msg(1, "Is %s mounted?", tmp); 1100 1099 if (!strcmp(tmp, "/proc") || !strcmp(tmp, "proc")) { 1101 log_msg(1, 1102 "I don't know how the heck /proc made it into the mountlist. I'll ignore it."); 1100 log_msg(1, "I don't know how the heck /proc made it into the mountlist. I'll ignore it."); 1103 1101 mr_free(tmp); 1104 1102 return(FALSE); … … 1124 1122 mr_free(device_with_tab); 1125 1123 paranoid_pclose(fin); 1124 1126 1125 mr_asprintf(tmp, "%s | grep -E \"^%s\" > /dev/null 2> /dev/null", SWAPLIST_COMMAND, device_with_space); 1127 1126 mr_free(device_with_space);
Note:
See TracChangeset
for help on using the changeset viewer.