### JuiceFS Gateway Synopsis and Example Source: https://juicefs.com/docs/cloud/reference/commands_reference Synopsis and an example for starting an S3 gateway with JuiceFS. Requires setting MinIO credentials. ```bash juicefs gateway [command options] VOLUME-NAME ADDRESS ``` ```bash export MINIO_ROOT_USER=admin export MINIO_ROOT_PASSWORD=12345678 juicefs gateway testVolume localhost:9000 ``` -------------------------------- ### Get File System List Request Example Source: https://juicefs.com/docs/cloud/reference/console_api This snippet shows an example of a GET request to retrieve a list of file systems. Ensure the Host header and Authorization token are correctly set. ```http GET /api/v1/volumes Host: juicefs.com Authorization: 4dca13af31e45740c1c1fe3acaca8752a093b43ccc169f890f1305f51f038bf8 ... ``` -------------------------------- ### Install JuiceFS in Dockerfile Source: https://juicefs.com/docs/community/juicefs_on_docker Example of installing the JuiceFS client binary during the image build process using the official installation script. ```dockerfile FROM ubuntu:22.04 ... # Use the official one-click installation script RUN curl -sSL https://d.juicefs.com/install | sh - ``` -------------------------------- ### JuiceFS Gateway Example Source: https://juicefs.com/docs/cloud/commands_reference Starts an S3 gateway for a specified JuiceFS volume. Ensure MinIO environment variables are set if using MinIO. ```bash export MINIO_ROOT_USER=admin export MINIO_ROOT_PASSWORD=12345678 juicefs gateway testVolume localhost:9000 ``` -------------------------------- ### Download, Compile, and Install LTP Source: https://juicefs.com/docs/community/posix_compatibility Steps to obtain, build, and install the LTP test suite from its source archive. ```bash tar -xvf ltp-full-20260529.tar.xz cd ltp-full-20260529 ./configure make all make install ``` -------------------------------- ### Install JuiceFS Client Binary Source: https://juicefs.com/docs/community/getting-started/installation Installs the extracted JuiceFS client binary to /usr/local/bin using the 'install' command. Requires superuser privileges. ```bash sudo install juicefs /usr/local/bin ``` -------------------------------- ### Start Redis via Homebrew Source: https://juicefs.com/docs/community/mount_juicefs_at_boot_time Command to ensure the Redis server starts automatically at boot. ```bash brew services start redis ``` -------------------------------- ### Install JuiceFS using wget Source: https://juicefs.com/docs/cloud/getting_started Installs the JuiceFS binary to `/usr/local/bin` using wget. Ensure the directory is in your PATH. ```bash wget https://juicefs.com/static/juicefs -O /usr/local/bin/juicefs && chmod +x /usr/local/bin/juicefs ``` -------------------------------- ### Install Google Cloud SDK Source: https://juicefs.com/docs/cloud/reference/how_to_set_up_object_storage This command downloads and installs the Google Cloud SDK, which is required for authenticating with Google Cloud Storage. ```bash curl https://sdk.cloud.google.com | bash ``` -------------------------------- ### Interactive JuiceFS mount example Source: https://juicefs.com/docs/cloud/getting_started An example of the interactive prompts when mounting JuiceFS for the first time. Credentials are required for the initial mount. ```bash $ sudo juicefs mount myjfs /jfs Token for myjfs: xxxxx Access key ID for oss://juicefs-myjfs: xxxxx Access key secret for oss://juicefs-myjfs: xxxxx OK, myjfs is ready at /jfs. ``` -------------------------------- ### Install JuiceFS Client Source: https://juicefs.com/docs/community/getting-started/standalone Installs the JuiceFS client using a one-click script. This is the recommended method for Linux and macOS users. ```bash curl -sSL https://d.juicefs.com/install | sh - ``` -------------------------------- ### Install FoundationDB Clients (RHEL) Source: https://juicefs.com/docs/community/databases_for_metadata Installs the FoundationDB client library on RHEL-based systems using an .rpm package. ```bash curl -O https://github.com/apple/foundationdb/releases/download/6.3.25/foundationdb-clients-6.3.25-1.el7.x86_64.rpm ``` ```bash sudo rpm -Uvh foundationdb-clients-6.3.25-1.el7.x86_64.rpm ``` -------------------------------- ### Install FoundationDB Clients (Debian) Source: https://juicefs.com/docs/community/databases_for_metadata Installs the FoundationDB client library on Debian-based systems using a .deb package. ```bash curl -O https://github.com/apple/foundationdb/releases/download/6.3.25/foundationdb-clients_6.3.25-1_amd64.deb ``` ```bash sudo dpkg -i foundationdb-clients_6.3.25-1_amd64.deb ``` -------------------------------- ### Install JuiceFS Client (Ubuntu apt) Source: https://juicefs.com/docs/community/getting-started/installation Installs the JuiceFS client package from the added PPA repository using apt-get. ```bash sudo apt-get install juicefs ``` -------------------------------- ### Install WSL Source: https://juicefs.com/docs/community/tutorials/juicefs_on_wsl Commands to install the default Linux distribution or a specific one via PowerShell or Command Prompt. ```bash wsl --install ``` ```bash wsl --install -d ubuntu ``` -------------------------------- ### Install JuiceFS using curl Source: https://juicefs.com/docs/cloud/getting_started Installs the JuiceFS binary to `/usr/local/bin` using curl. Ensure the directory is in your PATH. ```bash curl -L https://juicefs.com/static/juicefs -o /usr/local/bin/juicefs && chmod +x /usr/local/bin/juicefs ``` -------------------------------- ### Install Samba on Linux Source: https://juicefs.com/docs/community/deployment/samba Commands to install the Samba package using standard Linux package managers. ```bash sudo apt install samba ``` ```bash sudo dnf install samba ``` -------------------------------- ### Kubelet Service File Example Source: https://juicefs.com/docs/csi/administration/going-production Examine the kubelet service file to determine how it is configured (command-line arguments or configuration file). This example shows environment variables pointing to configuration files. ```bash $ systemctl cat kubelet # /lib/systemd/system/kubelet.service ... [Service] Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf" Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml" ... ``` -------------------------------- ### Start Prometheus Service Source: https://juicefs.com/docs/community/administration/monitoring Execute this command to start the Prometheus service using the specified configuration file. Access the Prometheus interface at http://localhost:9090. ```bash ./prometheus --config.file=prometheus.yml ``` -------------------------------- ### Install JuiceFS Python SDK Source: https://juicefs.com/docs/community/deployment/python_sdk Install the compiled JuiceFS Python SDK using pip. Ensure the wheel file is present on the target machine. ```bash pip install juicefs-1.3.0-py3-none-any.whl ``` -------------------------------- ### Start Spark Thrift Server Source: https://juicefs.com/docs/community/hadoop_java_sdk Starts the Spark Thrift Server with specified master, memory, executor, and configuration settings. Ensure SPARK_HOME is set. ```bash ${SPARK_HOME}/sbin/start-thriftserver.sh \ --master yarn \ --driver-memory 8g \ --executor-memory 10g \ --executor-cores 3 \ --num-executors 3 \ --conf spark.locality.wait=100 \ --conf spark.sql.crossJoin.enabled=true \ --hiveconf hive.server2.thrift.port=10001 ``` -------------------------------- ### Main Function Example Source: https://juicefs.com/docs/cloud/reference/console_api A simple main function demonstrating how to call getVolumes and handle potential errors. ```Go func main() { if err := getVolumes(); err != nil { fmt.Printf("request error: %s", err) } } ``` -------------------------------- ### Format JuiceFS with Redis Cluster Source: https://juicefs.com/docs/community/redis_best_practices Example command for formatting a JuiceFS file system using a Redis Cluster setup. ```bash juicefs format redis://127.0.0.1:7000,127.0.0.1:7001,127.0.0.1:7002/1 myjfs ``` -------------------------------- ### Example Request for Creating a File System Source: https://juicefs.com/docs/cloud/reference/console_api This is an example of an HTTP POST request to create a file system. It includes host, content-type, and a JSON body. ```http POST /api/v1/volumes?a=1&a=2&b=3&c=4 Host: juicefs.com Content-Type: application/json ... {"name": "test", "bucket": "https://test.s3.us-east-1.amazonaws.com"} ``` -------------------------------- ### Configure Prometheus Scraping with PodMonitor Source: https://juicefs.com/docs/csi/monitoring Example of a PodMonitor Custom Resource Definition (CRD) to configure Prometheus to scrape metrics from the JuiceFS CSI driver. This requires Prometheus Operator to be installed. ```yaml # csi-podmonitor.yaml apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: name: juicefs-csi namespace: juicefs labels: app: juicefs-csi spec: selector: matchLabels: app.kubernetes.io/name: juicefs-csi-driver podMetricsEndpoints: - port: metrics interval: 15s ``` -------------------------------- ### JuiceFS Log Format - Get Attributes Operation Source: https://juicefs.com/docs/cloud/administration/fault_diagnosis_and_analysis Example log entry for a 'getattr' operation in JuiceFS, showing user, group, process ID, inode, status, and file attributes. ```text # getattr, arguments (inode) [uid:0,gid:0,pid:1631098] getattr (1): OK (1,[drwxrwxrwx:0040777,19977521,0,0,1634886025,1663052916,1663052916,9265059409920]) <0.000002> ``` -------------------------------- ### Kubernetes Deployment for JuiceFS S3 Gateway Source: https://juicefs.com/docs/csi/guide/generic-applications Configures a Kubernetes Deployment to run the JuiceFS S3 Gateway. It includes commands for authentication, mounting the file system, and starting the gateway, along with environment variable setup from secrets. ```yaml apiVersion: apps/v1 kind: Deployment metadata: # Customize name and namespace name: juicefs-gateway namespace: default spec: replicas: 1 selector: matchLabels: app: juicefs-gateway juicefs-role: gateway template: metadata: labels: app: juicefs-gateway juicefs-role: gateway spec: containers: - name: juicefs-gateway command: - sh - -c - | # Below shell code is only needed in on-premise environments, which unpacks JSON and set its key-value pairs as environment variables for keyval in $(echo $ENVS | sed -e 's/": "/=/g' -e 's/{"//g' -e 's/", "/ /g' -e 's/"}//g' ); do echo "export $keyval" eval export $keyval done # Authenticate and mount JuiceFS, all environment variables comes from the volume credentials within the Kubernetes Secret # ref: https://juicefs.com/docs/cloud/getting_started#create-file-system /usr/bin/juicefs auth --token=${TOKEN} --access-key=${ACCESS_KEY} --secret-key=${SECRET_KEY} ${VOL_NAME} # ref: https://juicefs.com/docs/zh/cloud/reference/commands_reference#gateway /usr/bin/juicefs gateway $VOL_NAME 0.0.0.0:9000 --cache-dir=/data/jfsCache env: # The secret containing volume credentials, must reside in the same namespace # ref: https://juicefs.com/docs/zh/csi/guide/pv#cloud-service - name: VOL_NAME valueFrom: secretKeyRef: key: name name: juicefs-secret - name: ACCESS_KEY valueFrom: secretKeyRef: key: access-key name: juicefs-secret - name: SECRET_KEY valueFrom: secretKeyRef: key: secret-key name: juicefs-secret - name: TOKEN valueFrom: secretKeyRef: key: token name: juicefs-secret # Only needed in on-prem environments - name: ENVS valueFrom: secretKeyRef: key: envs name: juicefs-secret - name: MINIO_ROOT_USER valueFrom: secretKeyRef: key: MINIO_ROOT_USER name: juicefs-secret - name: MINIO_ROOT_PASSWORD valueFrom: secretKeyRef: key: MINIO_ROOT_PASSWORD name: juicefs-secret ports: - containerPort: 9000 # Use mount image # ref: https://juicefs.com/docs/zh/csi/guide/custom-image image: juicedata/mount:ee-5.0.14-a38b96d # Adjust resource definition accordingly # ref: https://juicefs.com/docs/zh/csi/guide/resource-optimization#mount-pod-resources resources: requests: memory: 500Mi volumeMounts: - mountPath: /data/jfsCache name: cache-dir - mountPath: /root/.juicefs name: jfs-root-dir volumes: # Adjust cache directory, define multiple volumes if need to use multiple cache directories # ref: https://juicefs.com/docs/cloud/guide/cache#client-read-cache - name: cache-dir hostPath: path: /data/jfsCache type: DirectoryOrCreate - name: jfs-root-dir emptyDir: {} ``` -------------------------------- ### Load and test LaunchAgent Source: https://juicefs.com/docs/community/mount_juicefs_at_boot_time Commands to register the service with launchctl and verify the mount point. ```bash launchctl load ~/Library/LaunchAgents/io.juicefs..plist launchctl start ~/Library/LaunchAgents/io.juicefs. ls ``` -------------------------------- ### JuiceFS Mount Examples with RDMA Source: https://juicefs.com/docs/cloud/guide/distributed-cache-rdma Demonstrates how to mount JuiceFS for a cache server node and a pure client node, specifying RDMA network interfaces and cache configurations. ```bash # Cache server node juicefs mount $VOLUME_NAME /jfs-cache --cache-group=cg --rdma-network=ib0:ib2 \ --cache-dir=/data/cache* --cache-size=-1 --buffer-size=8192 --max-downloads=800 # Pure client node juicefs mount $VOLUME_NAME /jfs --cache-group=cg --no-sharing \ --rdma-network=ib0:ib1 --max-write=1M --cache-size=0 --max-downloads=600 --buffer-size=8192 ``` -------------------------------- ### Install JuiceFS Client on macOS using Homebrew Source: https://juicefs.com/docs/community/getting-started/installation Use this command to install the JuiceFS client on macOS if you have Homebrew installed. ```bash brew install juicefs ``` -------------------------------- ### Install JuiceFS Python SDK Source: https://juicefs.com/docs/cloud/deployment/python-sdk Install the JuiceFS Python SDK using pip. Ensure Python 3.8 or above is installed. ```bash pip install https://static.juicefs.com/misc/juicefs-5.2.9.202508121612-py3-none-any.whl ``` -------------------------------- ### Install Sidecar Directly with CertManager Source: https://juicefs.com/docs/csi/getting_started Execute the installation script directly to install the JuiceFS CSI driver in sidecar mode with CertManager. ```bash ./juicefs-csi-webhook-install.sh install --with-certmanager ``` -------------------------------- ### Install JuiceFS CSI Sidecar Directly Source: https://juicefs.com/docs/csi/getting_started Execute the installation script directly to install the JuiceFS CSI driver in sidecar mode. ```bash ./juicefs-csi-webhook-install.sh install ``` -------------------------------- ### Gateway Execution Output Source: https://juicefs.com/docs/cloud/guide/gateway Example output showing successful gateway startup and available access endpoints. ```text 2023/03/21 20:15:49.945403 juicefs[97188] : connected to 47.103.20.252:9308 [client.go:874] 2023/03/21 20:15:49.965411 juicefs[97188] : Cache: /Users/herald/.juicefs/cache/jfs8 capacity: 102400 MB [disk_cache.go:747] Endpoint: http://127.0.0.1:9000 Browser Access: http://127.0.0.1:9000 Object API (Amazon S3 compatible): Go: https://docs.min.io/docs/golang-client-quickstart-guide Java: https://docs.min.io/docs/java-client-quickstart-guide Python: https://docs.min.io/docs/python-client-quickstart-guide JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide .NET: https://docs.min.io/docs/dotnet-client-quickstart-guide ``` -------------------------------- ### Install Rancher Source: https://juicefs.com/docs/community/juicefs_on_rancher Run this command to install Rancher on a Linux system using Docker. Ensure Docker is installed and meets the specified version requirements. ```bash sudo docker run --privileged -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher ``` -------------------------------- ### Start WebDAV server Source: https://juicefs.com/docs/cloud/webdav Launch the WebDAV server using the specified file system name and address. ```bash juicefs webdav myjfs localhost:9007 ``` -------------------------------- ### Generate JuiceFS CSI Sidecar Installation YAML Source: https://juicefs.com/docs/csi/getting_started Download and execute the installation script to generate the sidecar installation YAML file. Review this file before applying. ```bash wget https://raw.githubusercontent.com/juicedata/juicefs-csi-driver/master/scripts/juicefs-csi-webhook-install.sh chmod +x ./juicefs-csi-webhook-install.sh ./juicefs-csi-webhook-install.sh print > juicefs-csi-sidecar.yaml ``` -------------------------------- ### Example Custom Values Configuration Source: https://juicefs.com/docs/csi/getting_started A sample values file configuration showing custom image repositories. ```yaml kubeletDir: image: repository: registry.example.com/juicefs-csi-driver dashboardImage: repository: registry.example.com/csi-dashboard sidecars: livenessProbeImage: repository: registry.example.com/k8scsi/livenessprobe nodeDriverRegistrarImage: repository: registry.example.com/k8scsi/csi-node-driver-registrar csiProvisionerImage: repository: registry.example.com/k8scsi/csi-provisioner csiResizerImage: repository: registry.example.com/k8scsi/csi-resizer ``` -------------------------------- ### JuiceFS Changelog Example Source: https://juicefs.com/docs/community/administration/changelog Illustrates the changelog format with sample entries for CREATE, WRITE, and UNLINK operations, showing timestamps, arguments, results, session IDs, and transaction IDs. ```text 101: 1716440752.123456789|CREATE(1,report.txt,1000,1000,1,420,18,,Keep,true):1024|(3,88) 102: 1716440753.000000000|WRITE(1024,0,0,233344,4096,1716440753,0):1|(3,89) 103: 1716440760.000000000|UNLINK(1,report.txt,0,false,true):1024|(3,90) ``` -------------------------------- ### Install JuiceFS Client (Custom Location) Source: https://juicefs.com/docs/community/getting-started/installation Installs the latest JuiceFS client to a specified custom directory, such as /tmp. Use this option if you need to install to a non-default location. ```bash curl -sSL https://d.juicefs.com/install | sh -s /tmp ``` -------------------------------- ### Apply Exports and Start NFS Services Source: https://juicefs.com/docs/cloud/deployment/nfs Apply the NFS export configuration and start the NFS server services. Use `systemctl` to enable and start the services on RHEL-based systems or Debian/Ubuntu. ```bash sudo exportfs -rav # Debian / Ubuntu sudo systemctl enable --now nfs-kernel-server # RHEL / CentOS / Rocky / AlmaLinux sudo systemctl enable --now nfs-server ``` -------------------------------- ### Install JuiceFS Client (Snapcraft) Source: https://juicefs.com/docs/community/getting-started/installation Installs the JuiceFS client using the Snap package manager. This method is suitable for Ubuntu 16.04+ and other systems supporting Snap. ```bash sudo snap install juicefs ``` -------------------------------- ### Install JuiceFS Kubectl Plugin via Krew Source: https://juicefs.com/docs/csi/troubleshooting Installs the JuiceFS kubectl plugin using krew, a plugin manager for kubectl. Ensure krew is already installed in your cluster before running these commands. ```bash kubectl krew update kubectl krew install jfs ``` -------------------------------- ### Install JuiceFS Kubectl Plugin Source: https://juicefs.com/docs/csi/troubleshooting Installs the JuiceFS kubectl plugin using a one-click script. This script automatically detects your system architecture and installs the latest version to the default path /usr/local/bin. ```bash # default installation path is /usr/local/bin curl -sSL https://d.juicefs.com/kubectl-jfs-install | sh - ``` -------------------------------- ### Common JuiceFS Hadoop Configuration Example Source: https://juicefs.com/docs/community/hadoop_java_sdk This example demonstrates a typical configuration for JuiceFS within a Hadoop environment. Remember to replace placeholder variables like {HOST}, {PORT}, and {DB} with your actual values. ```xml fs.jfs.impl io.juicefs.JuiceFileSystem fs.AbstractFileSystem.jfs.impl io.juicefs.JuiceFS juicefs.meta redis://{HOST}:{PORT}/{DB} juicefs.cache-dir /data*/jfs juicefs.cache-size 1024 juicefs.access-log /tmp/juicefs.access.log ``` -------------------------------- ### Install fsspec Source: https://juicefs.com/docs/community/deployment/python_sdk Install the fsspec library, which is required to use JuiceFS with the fsspec interface. ```bash # Install fsspec pip install fsspec ``` -------------------------------- ### Install Samba Packages Source: https://juicefs.com/docs/cloud/deployment/samba Commands to install Samba and CIFS utilities on Debian and RHEL-based distributions. ```bash # Debian and derivatives apt install -y samba cifs-utils # RHEL and derivatives yum install -y samba* cifs-utils ``` -------------------------------- ### Verify mount success Source: https://juicefs.com/docs/community/clouds/digitalocean Example output indicating a successful file system mount. ```text 2021/08/23 16:39:14.202151 juicefs[2869081] : Meta address: rediss://default@private-db-redis-sgp1-03138-do-user-2500071-0.b.db.ondigitalocean.com:25061/1 2021/08/23 16:39:14.234925 juicefs[2869081] : AOF is not enabled, you may lose data if Redis is not shutdown properly. 2021/08/23 16:39:14.235536 juicefs[2869081] : Ping redis: 446.247µs 2021/08/23 16:39:14.236231 juicefs[2869081] : Data use space://juicefs/mystor/ 2021/08/23 16:39:14.236540 juicefs[2869081] : Disk cache (/var/jfsCache/6b0452fc-0502-404c-b163-c9ab577ec766/): capacity (1024 MB), free ratio (10%), max pending pages (15) 2021/08/23 16:39:14.738416 juicefs[2869081] : OK, mystor is ready at mnt ``` -------------------------------- ### Navigate to LTP Installation Directory Source: https://juicefs.com/docs/community/posix_compatibility Changes the current directory to the location where LTP test tools are installed. ```bash cd /opt/ltp ``` -------------------------------- ### Initialize Client class Source: https://juicefs.com/docs/cloud/deployment/python-sdk The Client class handles authentication and session establishment with the Metadata Service. ```python class Client(name, *, token="", conf_dir="", console_url="https://juicefs.com", bucket=None, access_key=None, secret_key=None, session_token=None, shards=0, storage_class=None, bucket2=None, access_key2=None, secret_key2=None, session_token2=None, shards2=0, storage_class2=None, rsa_key_path="", rsa_passphrase=None, internal=False, external=False, max_uploads=20, max_downloads=200, prefetch=1, put_timeout="60s", get_timeout="5s", upload_limit='', download_limit='', writeback=False, metacache=True, max_cached_inodes=500000, opencache=False, attr_cache="1s", entry_cache="0s", dir_entry_cache="1s", buffer_size="300M", cache_size="100M", free_space_ratio=0.1, cache_dir="memory", cache_evict="2-random", cache_expire="0s", verify_cache_checksum="full", cache_group="", group_ip="", group_weight=100, group_weight_unit="0M", group_port=0, no_sharing=False, cache_partial_only=False, cache_large_write=False, fill_group_cache=False, cache_priority=0, mount_point="/jfs", access_log="", debug=False, flip=False, **kwargs) ``` -------------------------------- ### Install kirk Test Runner Source: https://juicefs.com/docs/community/posix_compatibility Installs kirk, the recommended test runner for LTP, using pip. ```bash pip install kirk ``` -------------------------------- ### Enable and Start JuiceFS Mount with systemd Source: https://juicefs.com/docs/community/mount_juicefs_at_boot_time After creating the systemd.mount configuration file, create the necessary symlink and then enable and start the JuiceFS mount service using systemctl commands. ```bash ln -s /usr/local/bin/juicefs /sbin/mount.juicefs ``` ```bash systemctl enable juicefs.mount ``` ```bash systemctl start juicefs.mount ``` -------------------------------- ### Verify JuiceFS Installation Source: https://juicefs.com/docs/community/clouds/qcloud Run the juicefs command to verify the installation and view the available command-line options. ```bash $ juicefs NAME: juicefs - A POSIX file system built on Redis and object storage. USAGE: juicefs [global options] command [command options] [arguments...] VERSION: 0.15.2 (2021-07-07T05:51:36Z 4c16847) COMMANDS: format format a volume mount mount a volume umount unmount a volume gateway S3-compatible gateway sync sync between two storage rmr remove directories recursively info show internal information for paths or inodes bench run benchmark to read/write/stat big/small files gc collect any leaked objects fsck Check consistency of file system profile analyze access log status show status of JuiceFS warmup build cache for target directories/files dump dump metadata into a JSON file load load metadata from a previously dumped JSON file help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --verbose, --debug, -v enable debug log (default: false) --quiet, -q only warning and errors (default: false) --trace enable trace log (default: false) --no-agent disable pprof (:6060) agent (default: false) --help, -h show help (default: false) --version, -V print only the version (default: false) COPYRIGHT: Apache License 2.0 ``` -------------------------------- ### JuiceFS Format Output Example Source: https://juicefs.com/docs/community/getting-started/standalone Example output after successfully formatting a JuiceFS file system. It shows metadata storage details, data path, and file system configuration. ```text 2021/12/14 18:26:37.666618 juicefs[40362] : Meta address: sqlite3://myjfs.db [xorm] [info] 2021/12/14 18:26:37.667504 PING DATABASE sqlite3 2021/12/14 18:26:37.674147 juicefs[40362] : The latency to database is too high: 7.257333ms 2021/12/14 18:26:37.675713 juicefs[40362] : Data use file:///Users/herald/.juicefs/local/myjfs/ 2021/12/14 18:26:37.689683 juicefs[40362] : Volume is formatted as {Name:myjfs UUID:d5bdf7ea-472c-4640-98a6-6f56aea13982 Storage:file Bucket:/Users/herald/.juicefs/local/ AccessKey: SecretKey: BlockSize:4096 Compression:none Shards:0 Partitions:0 Capacity:0 Inodes:0 EncryptKey:} ``` -------------------------------- ### Start gateway with mount point for symlink support Source: https://juicefs.com/docs/cloud/guide/gateway Include the --mountpoint flag to ensure absolute symbolic links resolve correctly. ```bash juicefs gateway myjfs 127.0.0.1:8888 --mountpoint=/jfs ``` -------------------------------- ### Get All Volumes Source: https://juicefs.com/docs/cloud/reference/console_api Fetches a list of all volumes in the JuiceFS system. This is a simple GET request to the /volumes endpoint. ```python def get_volumes(): url = f'{API_URL}/volumes' request('GET', url) ``` -------------------------------- ### Create a New File System Source: https://juicefs.com/docs/community/clouds/digitalocean Example command to format a file system named 'mystor' using DigitalOcean Spaces and Redis. ```bash $ juicefs format \ --storage space \ --bucket https://juicefs.sgp1.digitaloceanspaces.com \ --access-key \ --secret-key \ rediss://default:your-password@private-db-redis-sgp1-03138-do-user-2500071-0.b.db.ondigitalocean.com:25061/1 \ mystor ``` -------------------------------- ### Start Cloud SQL Proxy Source: https://juicefs.com/docs/community/juicefs_on_colab Downloads and executes the Cloud SQL proxy to enable database connectivity. ```bash ! wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy ! chmod +x cloud_sql_proxy ! GOOGLE_APPLICATION_CREDENTIALS=/content/.config/application_default_credentials.json nohup ./cloud_sql_proxy -instances=juicefs-learning:europe-west1:juicefs-sql-example-1=tcp:0.0.0.0:5432 >> cloud_sql_proxy.log & ``` -------------------------------- ### Generate Sidecar Installation YAML with CertManager Source: https://juicefs.com/docs/csi/getting_started Generate the sidecar installation YAML file including CertManager configuration. ```bash ./juicefs-csi-webhook-install.sh print --with-certmanager > juicefs-csi-sidecar.yaml ``` -------------------------------- ### Enable Virtual-hosted-style Gateway Source: https://juicefs.com/docs/cloud/guide/gateway Configure the domain and start the gateway to support virtual-hosted-style requests. ```bash export MINIO_DOMAIN=mydomain.com juicefs gateway myjfs 111.2.3.4:9000 ``` -------------------------------- ### Start and Verify Samba Source: https://juicefs.com/docs/cloud/deployment/samba Commands to enable the Samba service and verify network connectivity. ```bash systemctl enable --now {smb,nmb} # Check listening ports and verify network connectivity lsof -PiTCP | grep smb ``` -------------------------------- ### Start encrypted WebDAV server Source: https://juicefs.com/docs/cloud/webdav Launch the WebDAV server with HTTPS support by providing the certificate and key files. ```bash # Set username and password export WEBDAV_USER=root export WEBDAV_PASSWORD=1234 # Start WebDAV server juicefs webdav --cert-file client.crt --key-file client.key myjfs localhost:9007 ``` -------------------------------- ### Install JuiceFS Client Source: https://juicefs.com/docs/community/clouds/digitalocean Use this command to install the latest version of the JuiceFS client on Ubuntu Server 20.04. ```bash curl -sSL https://d.juicefs.com/install | sh - ``` -------------------------------- ### Enable Multi-bucket Support Source: https://juicefs.com/docs/community/guide/gateway Start the gateway with the --multi-buckets flag to treat subdirectories as individual buckets. ```bash juicefs gateway redis://localhost:6379/1 localhost:9000 --multi-buckets ``` -------------------------------- ### Enable CSI Dashboard Installation Source: https://juicefs.com/docs/csi/guide/dashboard Enable the CSI Dashboard by setting `dashboard.enabled` to `true` in your `values.yaml` file during Helm installation. ```yaml dashboard: enabled: true ``` -------------------------------- ### Load and Start JuiceFS Mount on macOS Source: https://juicefs.com/docs/cloud/getting_started After creating the `plist` file for a macOS Launch Agent, use `launchctl load` and `launchctl start` to manually load and initiate the JuiceFS mount. Verify the mount by listing the contents of the mount point. ```bash launchctl load ~/Library/LaunchAgents/com.juicefs.VOL_NAME.plist launchctl start ~/Library/LaunchAgents/com.juicefs.VOL_NAME ls $MOUNTPOINT ```