Skip to content

Commit 518e637

Browse files
authored
Merge pull request #767 from rl-msft/master
addin local-storage clean up
2 parents 46d7ea3 + bdccbc0 commit 518e637

File tree

1 file changed

+37
-0
lines changed
  • samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu

1 file changed

+37
-0
lines changed

samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,40 @@ In this example, we will deploy Kubernetes over multiple Linux machines (physica
3131
Simply type in "local-storage" twice (once for data, once for logs) when facing the following prompt by azdata :
3232

3333
`Kubernetes Storage Class - Config Path: spec.storage.data.className - Description: This indicates the name of the Kubernetes Storage Class to use. You must pre-provision the storage class and the persistent volumes or you can use a built in storage class if the platform you are deploying provides this capability. - Please provide a value:`
34+
35+
### local-storage clean up
36+
37+
If you removed BDC cluster that was previously deployed on Kubernetes cluster that was built using the sample scripts in this guide, you may want to clean the local-storage before using the cluster to deploy new BDC
38+
39+
to clean the storage you need to follow these steps
40+
41+
1) on each worker node make sure ‘/mnt/local-storage’ has only folder structure with no files, you can run ‘tree /mnt/local-storage’ for quick check
42+
2) if you see any files you need to remove them
43+
3) remount the volumes
44+
45+
You can use the following script to clean the volumes.
46+
47+
**WARNNING**: running this script will **REMOVE** all files that may exists under /mnt/local-storage folders
48+
49+
run the following command to create the script
50+
51+
```sh
52+
cat > clean-volumes-agents.sh <<EOF
53+
#!/bin/bash -e
54+
55+
# num of persistent volumes
56+
PV_COUNT=25
57+
58+
for i in \$(seq 1 \$PV_COUNT); do
59+
60+
vol="vol\$i"
61+
62+
sudo rm -rf /mnt/local-storage/\$vol/*
63+
64+
mount --bind /mnt/local-storage/\$vol /mnt/local-storage/\$vol
65+
66+
done
67+
EOF
68+
69+
chmod +x clean-volumes-agents.sh
70+
```

0 commit comments

Comments
 (0)