Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37483610
en ru br
Репозитории ALT
S:0.5.0-alt1
5.1: 0.4.2-alt1
4.1: 0.4.1-alt1
4.0: 0.4.2-alt1
www.altlinux.org/Changes

Группа :: Система/Настройка/Прочее
Пакет: installer-feature-server-raid-fixup

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

installer-feature-server-raid-fixup-0.4.2/000075500000000000000000000000001101531554100205075ustar00rootroot00000000000000installer-feature-server-raid-fixup-0.4.2/Makefile000064400000000000000000000004121101531554100221440ustar00rootroot00000000000000install2_dir=$(datadir)/install2

install:
install -d $(install2_dir)
[ -d initinstall.d ] && cp -a initinstall.d $(install2_dir) ||:
[ -d preinstall.d ] && cp -a preinstall.d $(install2_dir) ||:
[ -d postinstall.d ] && cp -a postinstall.d $(install2_dir) ||:
installer-feature-server-raid-fixup-0.4.2/initinstall.d/000075500000000000000000000000001101531554100232635ustar00rootroot00000000000000installer-feature-server-raid-fixup-0.4.2/initinstall.d/80-slow-md-sync000075500000000000000000000006341101531554100257750ustar00rootroot00000000000000#!/bin/sh -efu
# virtually stop md sync -- due to /dev/dm-*, it can't understand
# that some of these might share physical disks (to delay them)
# blame: Michael Shigorin <mike@altlinux.org>, 2008

sync_speed_later=12 # Kb/s
sysmdknobs="/proc/sys/dev/raid/"

[ ! -d "$sysmdknobs" ] || {
echo "$sync_speed_later" > "$sysmdknobs/speed_limit_min"
echo "$sync_speed_later" > "$sysmdknobs/speed_limit_max"
}
installer-feature-server-raid-fixup-0.4.2/postinstall.d/000075500000000000000000000000001101531554100233055ustar00rootroot00000000000000installer-feature-server-raid-fixup-0.4.2/postinstall.d/80-mdadm000075500000000000000000000006671101531554100245530ustar00rootroot00000000000000#!/bin/sh
# try to set internal write-intent bitmaps at least on arrays
# which managed to sync up during installation (probably / only)
# see also https://bugzilla.altlinux.org/show_bug.cgi?id=14877

grep ^md /proc/mdstat || exit 0

. install2-init-functions

for array in /dev/md[0-9]*; do
# we don't even want to check /sys/block/mdX/md/array_state
# since that can be clean/active/active-idle
mdadm -G "$array" -b internal ||:
done
installer-feature-server-raid-fixup-0.4.2/preinstall.d/000075500000000000000000000000001101531554100231065ustar00rootroot00000000000000installer-feature-server-raid-fixup-0.4.2/preinstall.d/80-mdadm000075500000000000000000000036661101531554100243560ustar00rootroot00000000000000#!/bin/sh -efu
# ***** BEGIN LICENSE BLOCK *****
# * Copyright (C) 2007 Alexey Gladkov <legion@altlinux.org>
# * Copyright (C) 2008 Michael Shigorin <mike@altlinux.org>
# *
# * This program is free software; you can redistribute it and/or modify
# * it under the terms of the GNU General Public License as published by
# * the Free Software Foundation; either version 2 of the License, or
# * (at your option) any later version.
# *
# * This program is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# * GNU General Public License for more details.
# *
# * You should have received a copy of the GNU General Public License
# * along with this program; if not, write to the Free Software
# * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
# ***** END LICENSE BLOCK *****

. install2-init-functions

# software raid (Kb/s)
sync_speed_min=10000
sync_speed_max=100000

conf="$destdir/etc/mdadm.conf"
fstab="$destdir/etc/fstab"

[ -s "$fstab" ] || exit 0

# look into the root (or for)
rootdev="`awk '/[[:space:]]\/[[:space:]]/ { print $1; }' "$fstab"`"

# resolve further if not a device yet
case "$rootdev" in
UUID=*|LABEL=*)
rootdev="`blkid -l -t "$rootdev" | cut -f1 -d:`";;
esac

# shouldn't happen -- log it then?
[ -n "$rootdev" ] || exit 0

# this doesn't try to solve the runtime raid management issues
# but at least fixes install-time; also comments out root dev
exec_chroot mdadm --examine --scan \
| sed "s,^ARRAY[[:space:]]\+$rootdev[[:space:]].*$,#&," \
>> "$conf"

# ah, and previous EOF is no more
sed -i '/## EOF ##/d' "$conf" && echo '## EOF ##' >> "$conf" ||:

# get root raid sync speed up, if applicable
rootmdknobs="/sys/block/${rootdev#/dev/}/md/"
[ ! -d "$rootmdknobs" ] || {
echo "$sync_speed_min" > "$rootmdknobs/sync_speed_min"
echo "$sync_speed_max" > "$rootmdknobs/sync_speed_max"
}
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin