rsync -avzh <source> <username>@<ip>:<destination>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch -n -5 kubectl get events --all-namespaces=true --field-selector type=Warning |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo ATTENTION: THIS IS UNSAFE! | |
echo Which namespace would you like me to terminate\? | |
read NAMESPACE_TO_DESTROY | |
echo I will terminate namespace $NAMESPACE_TO_DESTROY\! | |
( | |
kubectl proxy & | |
kubectl get namespace $NAMESPACE_TO_DESTROY -o json |jq '.spec = {"finalizers":[]}' >temp.json |
iptables -t nat -A PREROUTING -p tcp --dport 4000 -j DNAT --to-destination 1.1.1.1:3000
iptables -t nat -A POSTROUTING -p tcp -d 2.2.2.2 --dport 4000 -j SNAT --to-source 1.1.1.1
iptables -t nat -A POSTROUTING -j MASQUERADE
Configure MDS (MetaData Server) on a Node which you'd like to set MDS. It sets to [node01] on this exmaple.
ceph-deploy mds create node01
Create at least 2 RADOS pools on MDS Node and activate MetaData Server. For pg_num which is specified at the end of a creating command, refer to official document and decide appropriate value. Documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# insert/update hosts entry | |
ip_address="192.168.x.x" | |
host_name="my.hostname.example.com" | |
# find existing instances in the host file and save the line numbers | |
matches_in_hosts="$(grep -n $host_name /etc/hosts | cut -f1 -d:)" | |
host_entry="${ip_address} ${host_name}" | |
echo "Please enter your password if requested." |
Cheatsheet how to setup a erasure coding pool, add it to a ceph filesystem and configure files/directories to use the ec pool.
root@ceph:~$ ceph osd erasure-code-profile set ec-62-profile k=6 m=2 crush-failure-domain=osd crush-device-class=hdd
root@ceph:~$ ceph osd pool create glacier_data_ec-62 erasure ec-62-profile
root@ceph:~$ ceph osd pool set glacier_data_ec-62 allow_ec_overwrites true
root@ceph:~$ ceph osd pool application enable glacier_data_ec-62 cephfs
root@ceph:~$ ceph fs add_data_pool glacier glacier_data_ec-62
OlderNewer