[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: where does CRC store its data?



Hi Marvin,

Did you ever use minishift? It behaves in the same way, all the data is inside the CRC VM.  If you manage to get into the CRC VM, and you get to /mnt/pv-data then you'd see lots of directories pv0001, pv0002 etc.  If you create yourself a PVC then it will automatically attach to an existing PV's, so yes you can use it for applications if you want.

minishift used to have an option, "minishift ssh", which would ssh into the VM that minishift was running inside.  But I can't see that as a command-line option for crc.  

On my windows installation of crc (it has since expired), I found the ssh private key for the instance at

C:\Users\<username>\.crc\machines\crc

You can get the ip of the VM with "crc ip"

I'm not totally sure what the ssh username is, but it's probably one of crc, core, openshift.  

ssh -i C:\Users\<username>\.crc\machines\crc\id_rsa  <ssh username>@<vm ip address>

Otherwise, a slightly shady way of getting to the host is to start a special pod and get a root shell, using one of the techniques here: https://gist.github.com/jjo/a8243c677f7e79f2f1d610f02365fdd7
I used that technique once when ssh had died and I wanted to restart ssh without restarting the whole machine.
You might need to use kubeadmin or some privileged user.

Anyway, good luck.

On Fri, 22 Nov 2019 at 11:44, Just Marvin <marvin the cynical robot gmail com> wrote:
Hi,

    On my host system, I see:

[zaphod oc6010654212 code]$ oc get pv
NAME     CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                                                 STORAGECLASS   REASON   AGE
pv0001   100Gi      RWO,ROX,RWX    Recycle          Bound       openshift-image-registry/crc-image-registry-storage                           22d
pv0002   100Gi      RWO,ROX,RWX    Recycle          Available                                                                                 22d
pv0003   100Gi      RWO,ROX,RWX    Recycle          Available                                                                                 22d
pv0004   100Gi      RWO,ROX,RWX    Recycle          Available                                                                                 22d
.
.
.
pv0030   100Gi      RWO,ROX,RWX    Recycle          Available                                                                                 22d
[zaphod oc6010654212 code]$ oc describe pv pv0001
Name:            pv0001
Labels:          volume=pv0001
Annotations:     pv.kubernetes.io/bound-by-controller: yes
Finalizers:      [kubernetes.io/pv-protection]
StorageClass:    
Status:          Bound
Claim:           openshift-image-registry/crc-image-registry-storage
Reclaim Policy:  Recycle
Access Modes:    RWO,ROX,RWX
VolumeMode:      Filesystem
Capacity:        100Gi
Node Affinity:   <none>
Message:        
Source:
    Type:          HostPath (bare host directory volume)
    Path:          /mnt/pv-data/pv0001
    HostPathType:  
Events:            <none>
[zaphod oc6010654212 code]$ ls -l /mnt/pv-data/pv0001
ls: cannot access /mnt/pv-data/pv0001: No such file or directory
[zaphod oc6010654212 code]$ ls -l /mnt
total 0

    What gives? Where is CRC actually storing the data in its registry, etc? More importantly, if I want to use one of those unbound pv's for applications, can I?

Regards,
Marvin
_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]