> juicefs format redis://your-redis-host:6379/1 myjfs
> juicefs mount -d redis://your-redis-host:6379/1 /mnt/juicefs
> df -h /mnt/juicefs
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
JuiceFS:myjfs 1.0Pi 0Bi 1.0Pi 0% 0 10485760 0% /mnt/juicefs
> cp -r ~/dataset /mnt/juicefs/
path = '/mnt/juicefs/dataset/days.txt'
days_file = open(path, 'r')
days = days_file.read()
new_path = '/mnt/juicefs/new_days.txt'
new_days = open(new_path, 'w')
title = 'Days of the Week\n'
new_days.write(title)
print(title)
new_days.write(days)
print(days)
days_file.close()
new_days.close()
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: web-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Pi
storageClassName: juicefs-sc
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-run
spec:
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: linuxserver/nginx
ports:
- containerPort: 80
volumeMounts:
- mountPath: /config
name: web-data
volumes:
- name: web-data
persistentVolumeClaim:
claimName: web-pvc
> kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
juicefs-sc csi.juicefs.com Retain Immediate false 88m
> hadoop fs -ls jfs://myjfs
CREATE TABLE IF NOT EXISTS person
(
name STRING,
age INT
) LOCATION 'jfs://myjfs/tmp/person';
> juicefs gateway redis://localhost:6379/1 localhost:9000
> aws --endpoint-url http://localhost:9000 s3 ls s3://myjfs