adapted from https://access.redhat.com/solutions/4165791
$ oc api-resources --verbs=list --namespaced -o name | xargs -I {} bash -c "oc get --show-kind --ignore-not-found -n openshift-storage {}"
$ oc api-resources --verbs=list --cached --namespaced -o name | xargs -I {} bash -c "oc get --show-kind --ignore-not-found -n openshift-storage {}"
$ oc api-resources --verbs=list --namespaced -o name | egrep -v "packagemanifests.packages.operators.coreos.com|events" | xargs -I {} bash -c "oc get --show-kind --ignore-not-found -n openshift-storage {}"
$ oc api-resources --verbs=list --cached --namespaced -o name | egrep -iv "packagemanifests.packages.operators.coreos.com|events" | xargs -I {} bash -c "oc get --show-kind --ignore-not-found -n openshift-storage {}"
borrowed from kubernetes/kubernetes#29838
$ oc get event --sort-by='.lastTimestamp'
$ oc get event --sort-by='.metadata.creationTimestamp'
wipefs -a
didn't completely wipe the disk
$ sgdisk --zap-all /dev/sda
Here is a script that will properly wipe the GPT tables and signatures
$ cat <<EOF > ddwipe.sh
#!/bin/bash
DEV="${1}"
END="$(sudo blockdev --getsz ${DEV})"
GPT_END=$(($END - 100))
dd if=/dev/zero of=${DEV} bs=1M count=1
dd if=/dev/zero of=${DEV} bs=512 seek=${GPT_END}
EOF
$ bash -x ddwipe.sh /dev/vdb
From https://bugs.launchpad.net/ubuntu/+source/gdisk/+bug/1303903
$ for i in `oc get nodes -o name | sort -r`; do echo $i; oc debug $i -- chroot /host bash -c "sudo shutdown \\+1 \\&;exit"; done
$ oc patch -n <project-name> <object-kind>/<object-name> --type=merge -p '{"metadata": {"finalizers":null}}'
https://gist.github.com/benstr/8744304
oc delete -n openshift-storage --force --grace-period=0 cephfilesystem.ceph.rook.io/ocs-storagecluster-cephfilesystem cephcluster.ceph.rook.io/ocs-storagecluster-cephcluster cephblockpool.ceph.rook.io/ocs-storagecluster-cephblockpool secret/rook-ceph-mon configmap/rook-ceph-mon-endpoints bucketclass.noobaa.io/noobaa-default-bucket-class storagecluster.ocs.openshift.io/ocs-storagecluster noobaa.noobaa.io/noobaa storagesystem.odf.openshift.io/ocs-storagecluster-storagesystem backingstores.noobaa.io/noobaa-default-backing-store
oc patch -n openshift-storage --type=merge -p '{"metadata": {"finalizers":null}}' cephfilesystem.ceph.rook.io/ocs-storagecluster-cephfilesystem cephcluster.ceph.rook.io/ocs-storagecluster-cephcluster cephblockpool.ceph.rook.io/ocs-storagecluster-cephblockpool secret/rook-ceph-mon configmap/rook-ceph-mon-endpoints bucketclass.noobaa.io/noobaa-default-bucket-class storagecluster.ocs.openshift.io/ocs-storagecluster noobaa.noobaa.io/noobaa storagesystem.odf.openshift.io/ocs-storagecluster-storagesystem backingstores.noobaa.io/noobaa-default-backing-store