Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P15
ECC Ansible Disk Check
Active
Public
Actions
Authored by
newellz2
on Dec 22 2017, 1:59 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
ssh ecc-admin@tinkerbell.engr.unr.edu
sudo -i
source
/var/local/python_env/bin/activate
export
PYTHONPATH
=
/opt/imm
cd
/var/local/ansible
~/update-hosts.sh
#updates hosts
cat hosts
#modify with nano
ansible -i /var/local/ansible/hosts labf -m shell -a
"hostname"
#quick test
ansible -i /var/local/ansible/hosts labf -m shell -a
"ntfsfix /dev/sda2"
#run a file system check
ansible -i /var/local/ansible/hosts labf -m shell -a
"ntfsfix -b -d /dev/sda2"
#run a file system check and fix
ansible -i /var/local/ansible/hosts labf -m shell -a
"smartctl -t short /dev/sda"
#run a SMART short test
ansible -i /var/local/ansible/hosts labf -m shell -a
"smartctl -a /dev/sda"
#check test
ansible -i /var/local/ansible/hosts labf -m shell -a
"apt install -y bonnie++"
ansible -i /var/local/ansible/hosts labf -m shell -a
"mount -t ntfs-3g -o remove_hiberfile /dev/sda2 /mnt"
ansible -i /var/local/ansible/hosts labf -m shell -a
"bonnie++ -u root -g root -d /mnt -r 1024"
#run a benchmark to produce any FDMA errors
ansible -i /var/local/ansible/hosts labf -m shell -a
"dmesg | grep FDMA"
#Check for errors
ansible -i /var/local/ansible/hosts labf -m shell -a
"dmesg | grep sda"
#Check for errors
ansible -i /var/local/ansible/hosts labf -m shell -a
"umount /mnt"
#unmount /mnt
cd
/var/local/ansible/smart
ansible-playbook -i ../hosts site.yml
#modify site.yml to have the correct lab
grep
233
/var/tmp/smart/ecc-f*
grep
249
/var/tmp/smart/ecc-f*
ls /var/tmp/smart/*
#One off connection
ssh ecc-f-07
df -h
#free space
#Individual host subset
ansible -i /var/local/ansible/hosts labf -m shell -a
"dmesg | grep sda"
-l ecc-f-07
#Check for errors on ecc-f-07
#Good Output
ecc-f-13
|
SUCCESS
|
rc
=
0
>>
[
1
.365576
]
sd
4
:0:0:0:
[
sda
]
703282608
512
-byte logical blocks:
(
360
GB/335 GiB
)
[
1
.365820
]
sd
4
:0:0:0:
[
sda
]
Write Protect is off
[
1
.365953
]
sd
4
:0:0:0:
[
sda
]
Mode Sense:
00
3a
00
00
[
1
.366051
]
sd
4
:0:0:0:
[
sda
]
Write cache: enabled,
read
cache: enabled, doesn
'
t support DPO or FUA
[
1
.368983
]
sda: sda1 sda2
[
1
.370323
]
sd
4
:0:0:0:
[
sda
]
Attached SCSI disk
Event Timeline
newellz2
created this paste.
Dec 22 2017, 1:59 PM
2017-12-22 13:59:55 (UTC-8)
newellz2
created this object with visibility "Public (No Login Required)".
Log In to Comment