Oracle归档日志满了的问题

Oracle归档日志满了,狂打警告导致磁盘满了的问题
现象是oracle连接报错:ORA-00257: archiver error. Connect internal only, until freed.
登录服务器查看磁盘满了,原因是归档日志满了

1、登录
su - oracle
sqlplus /nolog
connect /as sysdba

2、检查flash recovery area的使用情况
select * from V$FLASH_RECOVERY_AREA_USAGE;
已经占用了99.62%

3、查询日志目录位置
show parameter recover;
db_recovery_file_dest /oracle/app/oracle/fast_recovery_area

4、备份(测试环境略过)

5、在删除归档日志后,必须用RMAN维护控制文件,否则空间显示仍然不释放
rman target sys/pass
检查一些无用的archivelog
RMAN> crosscheck archivelog all;
删除截止到前一天的所有archivelog
RMAN> delete archivelog until time 'sysdate-1';

6、删除alert日志
/oracle/app/oracle/diag/rdbms/posp/airtrip/alert下
/oracle/app/oracle/diag/tnslsnr/HKDB01/listener/alert下
的log_xxx.xml文件
rm -rf log_*.log

参考资料:
https://blog.csdn.net/cw370008359/article/details/51023794

CentOS搭建k8s集群(5)—Helm包管理工具

Helm是用来管理Kubernetes发布包的工具,使用方法类似于yum、npm工具
原来:手写yaml –> xxx.yaml –> kubectl apply -f –> 获取xxx组件
现在:values.yaml –> xxx.yaml –> helm install/upgrade –> 获取xxx组件

PS:以下操作都在master机器上
1、安装Helm
Helm3.x版本移除了tiller依赖,所以只有一个helm文件
cd /tmp
wget https://get.helm.sh/helm-v3.3.0-rc.1-linux-amd64.tar.gz
tar -zxvf helm-v3.3.0-rc.1-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/helm

2、配置环境变量
vi /etc/profile
加入:
export KUBECONFIG=/root/.kube/config
执行:
source /etc/profile

3、安装Helm Chart仓库
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/

4、显示仓库charts信息
helm repo update
helm search repo stable

未完待续。。。

参考资料:
https://github.com/helm/helm/releases
https://helm.sh/docs/intro/quickstart/

CentOS搭建k8s集群(4)—添加工作节点

1、在node1和node2执行
kubeadm join 192.168.101.1:6443 --token mu949z.xkhkw4tq7t79z4v6 \
--discovery-token-ca-cert-hash sha256:0a381d7f750bda8d639b7132bf4db942710d2042b2cef0c6ffe6aa49a4603f5d \
--ignore-preflight-errors=Swap

2、返回
W0713 04:55:55.810886 12707 join.go:346] [preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.
[preflight] Running pre-flight checks
[WARNING Swap]: running with swap on is not supported. Please disable swap
error execution phase preflight: couldn't validate the identity of the API Server: could not find a JWS signature in the cluster-info ConfigMap for token ID "mu949z"
To see the stack trace of this error execute with --v=5 or higher

继续阅读CentOS搭建k8s集群(4)—添加工作节点

CentOS搭建k8s集群(3)—安装pod网络

1、安装flannel network
cd ~
wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubectl apply -f kube-flannel.yml
podsecuritypolicy.policy/psp.flannel.unprivileged created
clusterrole.rbac.authorization.k8s.io/flannel created
clusterrolebinding.rbac.authorization.k8s.io/flannel created
serviceaccount/flannel created
configmap/kube-flannel-cfg created
daemonset.apps/kube-flannel-ds-amd64 created
daemonset.apps/kube-flannel-ds-arm64 created
daemonset.apps/kube-flannel-ds-arm created
daemonset.apps/kube-flannel-ds-ppc64le created
daemonset.apps/kube-flannel-ds-s390x created

2、pod概念
pod是k8s最小管理单位,它是一个或多个容器的组合

3、flannel network
用于集群中各个pod互相通讯的网络,Kubernetes支持Flannel、Calico、Weave network等多种cni网络Drivers

4、查看集群节点状态,变为Ready
kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s-master Ready master 2d21h v1.18.5

继续阅读CentOS搭建k8s集群(3)—安装pod网络

CentOS搭建k8s集群(2)—初始化主节点

三、创建单个控制面板(主节点)集群
1、初始化主节点
由于测试环境原因,忽略一些错误
kubeadm init --pod-network-cidr=10.122.0.0/16 \
--ignore-preflight-errors=Swap

参数说明:
–apiserver-advertise-address:指定用master的哪个IP地址与cluster的其他节点通信
–service-cidr:指定service网络的范围,即负载均衡VIP使用的IP地址段
–pod-network-cidr:指定pod网络的范围,即pod的IP地址段
–ignore-preflight-errors=:忽略运行时的错误

2、如果初始化失败,查看原因
systemctl status kubelet
journalctl -xeu kubelet

重置:
systemctl stop kubelet
kubeadm reset
systemctl daemon-reload

继续阅读CentOS搭建k8s集群(2)—初始化主节点

CentOS搭建k8s集群(1)—软件安装

一、环境准备(所有节点)
1、节点信息
k8s-master:192.168.101.1
k8s-node1:192.168.101.2
k8s-node2:192.168.101.3

2、系统信息
CentOS Linux release 7.8.2003 (Core)

3、关闭selinux
sed -i 's/enforcing/disabled/' /etc/selinux/config
setenforce 0

4、关闭防火墙
systemctl stop firewalld
systemctl disable firewalld

5、关闭swap(测试环境可不关闭)
vi /etc/fstab
去除swap配置,并reboot
PS:为了应用发生OOM时,使其被系统kill掉,及时发现问题

6、设置主机名和hosts
主节点:k8s-master
工作节点1:k8s-node1
工作节点2:k8s-node2
vi /etc/hosts
1)k8s-master节点
127.0.0.1 k8s-master
192.168.101.2 k8s-node1
192.168.101.3 k8s-node2

2)k8s-node1节点
127.0.0.1 k8s-node1
192.168.101.1 k8s-master
192.168.101.3 k8s-node2

3)k8s-node2节点
127.0.0.1 k8s-node2
192.168.101.1 k8s-master
192.168.101.2 k8s-node1

继续阅读CentOS搭建k8s集群(1)—软件安装