Comments (6)
So using below scripts I am able to create 50 pv and also tested odo which works.
$ cat create_files.sh
#/bin/bash
set -xe
function setup_pv_dir() {
local dir="${1}"
if [[ ! -d "${dir}" ]]; then
sudo mkdir -p "${dir}"
fi
if ! sudo chcon -t svirt_sandbox_file_t "${dir}" &> /dev/null; then
echo "Not setting SELinux content for ${dir}"
fi
sudo chmod 770 "${dir}"
}
basedir=/var/data
setup_pv_dir "${basedir}"
for i in $(seq 1 50); do
setup_pv_dir "${basedir}/pv${i}"
done
$ ssh [email protected] 'bash -s' < create_files.sh
$ cat create_files.sh
#/bin/bash
set -xe
function setup_pv_dir() {
local dir="${1}"
if [[ ! -d "${dir}" ]]; then
sudo mkdir -p "${dir}"
fi
if ! sudo chcon -t svirt_sandbox_file_t "${dir}" &> /dev/null; then
echo "Not setting SELinux content for ${dir}"
fi
sudo chmod 770 "${dir}"
}
basedir=/var/data
setup_pv_dir "${basedir}"
for i in $(seq 1 50); do
setup_pv_dir "${basedir}/pv${i}"
done
[prkumar@prkumar-test ~]$ cat create_pv.sh
#/bin/bash -xe
function generate_pv() {
local basedir="${1}"
local name="${2}"
cat <<EOF
apiVersion: v1
kind: PersistentVolume
metadata:
name: ${name}
labels:
volume: ${name}
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteOnce
- ReadWriteMany
- ReadOnlyMany
hostPath:
path: ${basedir}/${name}
persistentVolumeReclaimPolicy: Recycle
EOF
}
function create_pv() {
local basedir="${1}"
local name="${2}"
if ! oc get pv "${name}" &> /dev/null; then
generate_pv "${basedir}" "${name}" | oc create -f -
else
echo "persistentvolume ${name} already exists"
fi
}
basedir="/var/data"
for i in $(seq 1 50); do
create_pv "${basedir}" "pv${i}"
done
$ export KUBECONFIG=/home/prkumar/.crc/cache/crc_libvirt_v4.1.0.rc0/kubeconfig
$ ./create_pv.sh
persistentvolume/pv1 created
persistentvolume/pv2 created
persistentvolume/pv3 created
persistentvolume/pv4 created
persistentvolume/pv5 created
persistentvolume/pv6 created
persistentvolume/pv7 created
persistentvolume/pv8 created
persistentvolume/pv9 created
persistentvolume/pv10 created
persistentvolume/pv11 created
persistentvolume/pv12 created
persistentvolume/pv13 created
persistentvolume/pv14 created
persistentvolume/pv15 created
persistentvolume/pv16 created
persistentvolume/pv17 created
persistentvolume/pv18 created
persistentvolume/pv19 created
persistentvolume/pv20 created
persistentvolume/pv21 created
persistentvolume/pv22 created
persistentvolume/pv23 created
persistentvolume/pv24 created
persistentvolume/pv25 created
persistentvolume/pv26 created
persistentvolume/pv27 created
persistentvolume/pv28 created
persistentvolume/pv29 created
persistentvolume/pv30 created
persistentvolume/pv31 created
persistentvolume/pv32 created
persistentvolume/pv33 created
persistentvolume/pv34 created
persistentvolume/pv35 created
persistentvolume/pv36 created
persistentvolume/pv37 created
persistentvolume/pv38 created
persistentvolume/pv39 created
persistentvolume/pv40 created
persistentvolume/pv41 created
persistentvolume/pv42 created
persistentvolume/pv43 created
persistentvolume/pv44 created
persistentvolume/pv45 created
persistentvolume/pv46 created
persistentvolume/pv47 created
persistentvolume/pv48 created
persistentvolume/pv49 created
persistentvolume/pv50 created
from snc.
Fuse Online development is also blocked by this.
from snc.
Assigned to @cfergeau as this would likely have to be added to the end of the image generation, right before shut-down and cleanup
from snc.
I'v added a patch doing that to PR #26 , it's only creating one /mnt/pv-data directory/one PV, not clear to me whether one is enough, or if we need to create multiple ones.
from snc.
@cfergeau I am not entirely sure either, but to be on the safe side (thinking mininshift compatible), why don't we create the same amount as before? Or do you see any downsides in having mutiple ones?
from snc.
@cfergeau we should add atleast ~50 pv directory, in minishift we use to 100 by default but I think ~50 is something good amount for any kind of application developer.
from snc.
Related Issues (20)
- Download/use the same podman as for the cluster on linux HOT 1
- Use container image build metadata from brew to determine the image name HOT 1
- [4.16] Use `oc adm prune machineconfigpools` to remove older machine config HOT 4
- [RFE]Create bundle without any capability HOT 8
- [RFE] Create arm64 linux bundles
- Readiness check for Openshift-4.16.x HOT 2
- Error building bundle for 4.16.0-rc1 HOT 3
- Switch to UEFI for vfkit driver and remove kernel related file
- kubelet and crio services not starting properly starting 4.16.0 rcX HOT 7
- 4.16.0-rc4 requires Ingress as capability HOT 1
- [4.16] Cert rotation not happening as expected for rc bits HOT 2
- oc binary included within 4.16.0-rc4 not working on RHEL 8.10 HOT 2
- Update makestep to avoid time drift in the VM as part of chronyd conf
- Flaky error checking the state of pods when running snc
- Error getting `baremetal_runtimecfg` when building 4.16.0-rc.6 HOT 1
- Error starting microshift service on version 4.16.0 bundles
- DNF conflicts during microshift pipeline HOT 3
- Readiness check for Openshift-4.17.x HOT 1
- 4.17.X Patched images cert expiration date only valid for 9 days HOT 5
- 4.17.X Cert rotation mechanism not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snc.