reactivación del test-badblocks destructivo

This commit is contained in:
Sandino Araico Sanchez 2017-07-14 05:44:16 -05:00
parent 5eed27b86c
commit a96bf70d68
4 changed files with 74 additions and 18 deletions

55
autologin.Howto Normal file
View file

@ -0,0 +1,55 @@
https://access.redhat.com/solutions/1220603
rm /etc/systemd/system/getty.target.wants/getty@tty1.service
cat >> /etc/systemd/user/test-mem-hdd.service << EOF
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Hardware tests on tty0
Documentation=/dev/null
After=systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/dev/tty0
[Service]
# the VT is cleared by TTYVTDisallocate
ExecStart=-/sbin/agetty --autologin test --noclear tty0 $TERM
Type=idle
Restart=no
RestartSec=0
UtmpIdentifier=tty0
TTYPath=/dev/tty0
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
[Install]
WantedBy=getty.target
EOF
sed -i '/^root/ a test:x:0:0:test:/root:/usr/local/bin/screen-mem-hdd' /etc/passwd
sed -i '/^root/ a test:$6$RilmkHYl9XJJAYdQ$kNHf8CkSYxOMhUgytSBFIxmg3rSPjsDAjLH3lCDjPP8XzWqUJMw2BIzZsbYmewNfzK2S3QIEWXYtS8QZFij0k1::0:99999:7:::' /etc/shadow

View file

@ -1,3 +1,4 @@
vim
gpm
iptraf-ng
net-tools

View file

@ -7,7 +7,7 @@ echo $$ > /run/test.pid
TEST_CONTAINER=1
export TEST_CONTAINER
scan-netdev
#scan-netdev
#test-memtester
#if [[ -f $OUTPUT_DIR/memtester.fail ]] ; then
# mkdir -p $SNAPSHOT_D
@ -21,30 +21,30 @@ scan-netdev
# sleep 3600
# done
#fi
#test-badblocks
#if [[ -f $OUTPUT_DIR/badblocks.fail ]] ; then
# echo "One or more disks have ${RED}FAILED${OFF} the badblocks test."
# echo "${BLD}Please replace the failing disks and restart this tests again.{OFF}"
# rm -f /run/test.pid
# while [[ 1 ]] ; do
# sleep 3600
# done
#fi
test-badblocks
if [[ -f $OUTPUT_DIR/badblocks.fail ]] ; then
echo "One or more disks have ${RED}FAILED${OFF} the badblocks test."
echo "${BLD}Please replace the failing disks and restart this tests again.{OFF}"
rm -f /run/test.pid
while [[ 1 ]] ; do
sleep 3600
done
fi
#test-memtester summary
#test-badblocks summary
test-badblocks summary
test-fio
test-pmbw
test-linpack
#test-fio
#test-pmbw
#test-linpack
# Take snapshot
mkdir -p $SNAPSHOT_D
cp -af $OUTPUT_DIR/* $SNAPSHOT_D/
rm -f /run/test.pid
#while [[ 1 ]] ; do
while [[ 1 ]] ; do
sleep 3600
#done
done
halt

View file

@ -3,8 +3,8 @@
source /etc/profile
#watcher-memtester &
#watcher-badblocks &
watcher-fio &
watcher-badblocks &
#watcher-fio &
journalctl -f &
while [[ -f /run/test.pid ]] ; do