Ceph Cruch Map

crunch map

ceph osd crush add-bucket left rack
ceph osd crush add-bucket right rack

ceph osd crush move left root=default
ceph osd crush move right root=default

ceph osd crush move node-1 rack=right
ceph osd crush move node-2 rack=right
ceph osd crush move node-3 rack=right

ceph osd crush move node-4 rack=left
ceph osd crush move node-5 rack=left
ceph osd crush move node-6 rack=left

ceph osd tree

revert changes to default

ceph osd crush move node-1 root=default
ceph osd crush move node-2 root=default
ceph osd crush move node-3 root=default
ceph osd crush move node-4 root=default
ceph osd crush move node-5 root=default
ceph osd crush move node-6 root=default

Journalctl Tricks

journalctl command

vacuum / clean

journalctl --disk-usage
journalctl --vacuum-size=1G
--vacuum-size=BYTES   Reduce disk usage below specified size
--vacuum-files=INT    Leave only the specified number of journal files
--vacuum-time=TIME    Remove journal files older than specified time

read old journal

journcalctl --file /var/log/.../dsdsdsdsdsdsdsds.journal~

goto end of log

sudo journalctl -e
journalctl -e -u certbot.service
journalctl -xeu redis-server.service

list old boots

journalctl --list-boots

Alle Meldungen mit Kennzeichnung error, critical, alert oder emergency anzeigen

journalctl -p err -b

kernel messages only

journalctl -k -e
systemctl list-unit-files
systemctl --failed
# or
systemctl list-units --state=failed
journalctl -xb

Fish shell Add a directory to the path, but only if it exists

Add a directory to the path, but only if it exists.

function add_path_maybe -d "Add a directory to the path, but only if it exists"
    # If the path exists...
    if test -d $argv[1]
        # ...and if it's not already in the PATH...
        if not contains $argv[1] $PATH
            # ...push it to the start of the path.
            set PATH $argv[1] $PATH
        end
    end
end

Sophos Root partition is filling up

Root partition is filling up – please check. Current usage: 85%
Sophos UTM-9
HA Status          : HA MASTER (node id: 1)
System Uptime      : 60 days 6 hours 27 minutes
System Load        : 1.43
System Version     : Sophos UTM 9.715-4
Please refer to the manual for detailed instructions.

Solution

/etc/init.d/postgresql92 rebuild
/etc/init.d/postgresql92 start