IoT - Setup Raspi 3 for nodeRED & InfluxDB

Logbook for basic setup of Raspberry Pi 3

raspbian/debian installieren
Linux node-red 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
locale must be "en_GB.UTF-8 UTF-8"
sudo apt-get update
sudo apt-get upgrade
---------------------------------------------------------------------------------------------
user anlegen
adduser dietmar
adduser dietmar sudo
---------------------------------------------------------------------------------------------
Diverses
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install smartmontools
sudo apt-get install dialog
sudo apt-get install iotop
sudo apt-get install dstat
sudo apt-get install hdparm
sudo apt-get install mosquitto-clients
DiskIO monitoren
sudo iotop -o
sudo dstat -cd --disk-util --disk-tps
sudo hdparm -tT /dev/sda
sudo smartctl -a /dev/sda
---------------------------------------------------------------------------------------------
externe SSD formatieren
sudo apt-get install gparted
https://superuser.com/questions/662614/raspberry-pi-how-to-format-hdd
https://wiki.debian.org/SSDOptimization
https://mike632t.wordpress.com/2016/01/20/optimizing-the-filesystem-when-using-an-ssd/

sudo fdisk -l
Disk /dev/sda: 238,5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0290a00a
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 500118191 500116144 238,5G 83 Linux
sudo mkfs /dev/sda1
mke2fs 1.43.4 (31-Jan-2017)
Ein Dateisystems mit 62514518 (4k) Blöcken und 15630336 Inodes wird erzeugt.
UUID des Dateisystems: f5a3c0d0-5f2b-416b-ae45-bee08728f553
Superblock-Sicherungskopien gespeichert in den Blöcken:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
beim Anfordern von Speicher für die Gruppentabellen: erledigt
Inode-Tabellen werden geschrieben: erledigt
Die Superblöcke und die Informationen über die Dateisystemnutzung werden
geschrieben: erledigt
sudo mkdir /influx-db
sudo chmod 775 /influx-db
sudo mount /dev/sda1 /influx-db/
extern SSD mounten
sudo blkid
/dev/mmcblk0: PTUUID="000d1e7f" PTTYPE="dos"
/dev/mmcblk0p1: LABEL="RECOVERY" UUID="EDC2-0C1D" TYPE="vfat" PARTUUID="000d1e7f-01"
/dev/mmcblk0p5: LABEL="SETTINGS" UUID="7d26cfab-ceed-4e80-8302-021cd4772682" TYPE="ext4" PARTUUID="000d1e7f-05"
/dev/mmcblk0p6: LABEL="boot" UUID="51FD-3FCB" TYPE="vfat" PARTUUID="000d1e7f-06"
/dev/mmcblk0p7: LABEL="root" UUID="88831db3-513c-4635-8159-8d96bee38ae1" TYPE="ext4" PARTUUID="000d1e7f-07"
/dev/mmcblk0p8: LABEL="data" UUID="2e2964fe-4eca-454d-be74-4d4977e6c989" TYPE="ext4" PARTUUID="000d1e7f-08"
/dev/sda1: UUID="f5a3c0d0-5f2b-416b-ae45-bee08728f553" TYPE="ext2" PARTUUID="0290a00a-01"
sudo vi /etc/fstab
Zeile einfügen /dev/disk/by-uuid/f5a3c0d0-5f2b-416b-ae45-bee08728f553 /influx-db ext2 defaults,noatime 0 2