Merge branch 'master' into fetlab

This commit is contained in:
Daniel A. Maierhofer
2018-10-27 00:39:23 +02:00
21 changed files with 3180 additions and 63 deletions

View File

@@ -20,11 +20,7 @@ Configure the clock: NTP Server: tutimea.tuwien.ac.at
Detect disks, partition disks: manual
RAID1 md0 with both SSDs https://blog.sleeplessbeastie.eu/2013/10/04/how-to-configure-software-raid1-during-installation-process/
/dev/nvmeXn1p1 32GB primary Volume für / in btrfs 32GB
/dev/nvmeXn1p5 1.5 GB logical Volume
/dev/nvmeXn1p6 1.5 GB logical Volume
/dev/nvmeXn1p7 1.5 GB logical Volume
/dev/nvmeXn1p8 1.5 GB logical Volume
/dev/nvmeXn1p9 90 GB logical Volume
/dev/nvmeXn1p2 80 GB primary Volume
ZFS RAIDZ-2 on is already on 4 x 6TB disks = 12TB 0 spares
partition1 ariane-root btrfs noatime, discard
Generic Kernel
@@ -79,8 +75,7 @@ zpool create -o ashift=12 -o autoexpand=on -o autoreplace=on -O atime=off -O com
/dev/mapper/ata-WDC_WD60EFRX-68L0BN1_WD-WX21D36PPLPH-part1 \
/dev/mapper/ata-WDC_WD60EFRX-68L0BN1_WD-WX21D36PP0K1-part1 \
/dev/mapper/ata-WDC_WD60EFRX-68L0BN1_WD-WXB1HB4MJCMM-part1
zpool add zv1 log mirror /dev/nvme0n1p5 /dev/nvme1n1p5
zpool create -o ashift=12 -O atime=off -O compression=lz4 ssd mirror /dev/disk/by-id/nvme-INTEL_SSDPEKKW128G7_BTPY63830DUM128A-part9 /dev/disk/by-id/nvme-INTEL_SSDPEKKW128G7_BTPY63750L9G128A-part9
zpool create -o ashift=12 -O atime=off -O compression=lz4 ssd mirror /dev/disk/by-id/nvme-INTEL_SSDPEKKW128G7_BTPY63830DUM128A-part2 /dev/disk/by-id/nvme-INTEL_SSDPEKKW128G7_BTPY63750L9G128A-part2
```
### Create datasets
```shell
@@ -91,7 +86,7 @@ chown root:nogroup /zv1/homes
chown root:2000 /zv1/daten/ /zv1/fotos/
zfs create -o canmount=off -o setuid=off -o exec=off ssd/var
zfs create -o com.sun:auto-snapshot=false -o mountpoint=/var/lib/nfs ssd/var/nfs
zfs create -o com.sun:auto-snapshot=false ssd/var/cache
zfs create -o com.sun:auto-snapshot=false -o exec=on ssd/var/cache
zfs create ssd/var/log
zfs create -o exec=on ssd/var/lxc
mv /var/cache/* /ssd/var/cache/
@@ -154,6 +149,7 @@ zpool list -v
zpool get all
zpool history
zpool scrub zv1
zfs list -o space
```
### show and delete all snapshots
```shell
@@ -166,6 +162,16 @@ mdadm --misc --detail /dev/md0
echo check > /sys/block/md0/md/sync_action
watch -n 0.1 cat /proc/mdstat
```
## Start System
```shell
zfs_mount.sh mount # Enter Passphrase
# start all LXC containers
```
## Reboot System
```shell
# stop all LXC containers
zfs_mount.sh reboot
```
## Shutdown System
```shell
# stop all LXC containers

View File

@@ -1,16 +0,0 @@
Disk /dev/nvme1n1: 119.2 GiB, 128035676160 bytes, 250069680 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: 0x35c808a6
Device Boot Start End Sectors Size Id Type
/dev/nvme1n1p1 2048 62500863 62498816 29.8G fd Linux raid autodetect
/dev/nvme1n1p2 62502910 250068991 187566082 89.4G 5 Extended
/dev/nvme1n1p5 62504960 65435647 2930688 1.4G 83 Linux
/dev/nvme1n1p6 65437696 68368383 2930688 1.4G 83 Linux
/dev/nvme1n1p7 68370432 71301119 2930688 1.4G 83 Linux
/dev/nvme1n1p8 71303168 74233855 2930688 1.4G 83 Linux
/dev/nvme1n1p9 74235904 250068991 175833088 83.9G 83 Linux

View File

@@ -7,9 +7,4 @@ Disk identifier: 0x21183a98
Device Boot Start End Sectors Size Id Type
/dev/nvme0n1p1 2048 62500863 62498816 29.8G fd Linux raid autodetect
/dev/nvme0n1p2 62502910 250068991 187566082 89.4G 5 Extended
/dev/nvme0n1p5 62504960 65435647 2930688 1.4G 83 Linux
/dev/nvme0n1p6 65437696 68368383 2930688 1.4G 83 Linux
/dev/nvme0n1p7 68370432 71301119 2930688 1.4G 83 Linux
/dev/nvme0n1p8 71303168 74233855 2930688 1.4G 83 Linux
/dev/nvme0n1p9 74235904 250068991 175833088 83.9G 83 Linux
/dev/nvme0n1p2 62500864 230273023 167772160 80G 83 Linux

View File

@@ -1,4 +1,12 @@
# Gitea LDAP Authentication settings
# Gitea
## Setup using installer, create user root
```shell
INSTALL_LOCK to false
```
## Gitea LDAP Authentication settings
- Authentication Type: `LDAP (via BindDN)`
- Authentication Name: `LDAP`
@@ -7,7 +15,9 @@
- Port: `389`
- User Search Base: `dc=fet,dc=htu,dc=tuwien,dc=ac,dc=at`
- User Filter: `(&(objectClass=posixAccount)(uid=%s))`
- Admin Filter: `(memberOf=cn=admin,ou=groups,dc=fet,dc=htu,dc=tuwien,dc=ac,dc=at)`
- Admin Filter: doesn't work, otherwise `(memberOf=cn=admin,ou=groups,dc=fet,dc=htu,dc=tuwien,dc=ac,dc=at)`
- First name attribute: `givenName`
- Surname attribute: `sn`
- Email attribute: `mail`
No Bind-DN and password needed!

View File

@@ -1,4 +1,28 @@
# sojus
## test if backups work
```shell
cd /home/backup/repos/
borg list <repo>/system
borg check -v <repo>/system
```
## test if backups work from remote
```shell
/etc/cron.d/borgbackup_system_create_sojus
cat /var/log/borg/system_create_sojus.lastlog
```
## retrieve files from backup
```shell
cd /home/backup/repos/
borg mount <repo>/system /mnt/
```
retrieve backup data from /mnt
```shell
borg umount /mnt
```
## create big backup locally
```shell
cryptsetup luksOpen /dev/disk/by-id/ata-<ID>-part1 ata-<ID>-part1