This document is detailed about how to use user node, the installation guide is in another document. Use LFS command to operate upload and download functions.
Introduction
This command creates, uploads, downloads, and views a collection of containers and files for the user.
Usage
./mefs-user lfs
COMMANDS:
createBucket create bucket
listBuckets list buckets
headBucket head bucket info
putObject put object
headObject head object
getObject get object
listObjects list objects
delObject delete object
downloadObject download object using rpc
showStorage show storage info
getPros get pros of bucket
help, h Shows a list of commands or help for one command
Subcommands
Introduction
This command creates buckets
Usage
./mefs-user lfs createBucket -h
Options
--bucket value, --bn value set bucket name
--policy value, --pl value set erasure code (1) or multi-copy policy (2) (default is 1)
--datacount value, --dc value set Number of data blocks (default is 3)
--paritycount value, --pc value Set the number of parity blocks (default is 2)
Example
Bucket name: test, storage policy: erasure code, number of data blocks: 10, number of check blocks 5
OPTIONS: --bucket value, --bn value use bucket name --object value, --on value file name after upload --path value upload file path --etag value select verification method (default: md5) --enc value Select encryption method (default: aes) --help, -h View help
Example
```shell
./mefs-user lfs putObject --bn=test --on=1 --path=./index.txt
Introduction
This command is used to view the specified file status
Usage
./mefs-user lfs headObject -h
USAGE:
mefs-user lfs headObject [command options] [arguments...]
OPTIONS:
--bucket value, --bn value bucketName
--object value, --on value objectName
--all show all information (default: false)
--help, -h show help (default: false)
Example
./mefs-user lfs headObject --bn=test --on=1
Introduction
Download the file to the specified path
Usage
USAGE:
mefs-user lfs getObject [command options] [arguments...]
OPTIONS:
--bucket value, --bn value bucketName
--object value, --on value objectName
--cid value cid name
--start value start position (default: 0)
--length value read length (default: -1)
--path value stored path of file
--help, -h show help (default: false)
USAGE:
mefs-user lfs listObjects [command options] [arguments...]
OPTIONS:
--bucket value, --bn value bucket name, priority
--marker value key start from, marker should exist
--prefix value prefix of objects
--delimiter value delimiter to group keys: '/' or ''
--maxKeys value number of objects in return (default: 1000)
--help, -h show help (default: false)
Example
./mefs-user lfs listObjects
Introductioin
delete specified file
Usage
USAGE:
mefs-user lfs delObject [command options] [arguments...]
OPTIONS:
--bucket value, --bn value bucketName
--object value, --on value objectName
--help, -h show help (default: false)
Example
./mefs-user lfs delObject --bn=test --on=1
Introduction
Download objects using rpc
Usage
USAGE:
mefs-user lfs downloadObject [command options] [arguments...]
OPTIONS:
--bucket value, --bn value bucketName
--object value, --on value objectName
--cid value cid name
--start value start position (default: 0)
--length value read length (default: -1)
--path value stored path of file
--help, -h show help (default: false)