-
Notifications
You must be signed in to change notification settings - Fork 0
/
integritysetup.sh
34 lines (27 loc) · 1.16 KB
/
integritysetup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# vim:set syntax=sh:
# kate: syntax bash;
# SPDX-License-Identifier: CC-BY-SA-4.0
# Copyright 2021 Jakob Meng, <[email protected]>
exit # do not run any commands when file is executed
#
# integritysetup
#
# Ref.:
# man integritysetup
integritysetup format /dev/disk/by-id/DEVICE
integritysetup open /dev/disk/by-id/DEVICE NAME_integrity
integritysetup close NAME_integrity
# Benchmark
# NOTE: Have a look on chapter about Benchmarking as well!
mkfs.ext4 /dev/mapper/NAME_integrity
mount /dev/mapper/NAME_integrity /mnt/tmp1/
mkfs.ext4 /dev/disk/by-id/DEVICE_WITHOUT_INTEGRITYSETUP_FOR_COMPARISON
mount /dev/disk/by-id/DEVICE_WITHOUT_INTEGRITYSETUP_FOR_COMPARISON /mnt/tmp2/
mkdir /mnt/tmp1/test && chown nobody /mnt/tmp1/test/
mkdir /mnt/tmp2/test && chown nobody /mnt/tmp2/test/
sudo -u nobody bonnie++ -b -d /mnt/tmp1/test/ -r 1000 # no write buffering
sudo -u nobody bonnie++ -b -d /mnt/tmp2/test/ -r 1000 # no write buffering
sudo -u nobody bonnie++ -d /mnt/tmp2/test/ -r 1000 # write buffering
sudo -u nobody bonnie++ -d /mnt/tmp1/test/ -r 1000 # write buffering
# use bon_csv2html and bon_csv2txt to convert CSV data to HTML and plain-ascii respectively