opencurve / curveadm Goto Github PK
View Code? Open in Web Editor NEWDeploy and manage Curve cluster
License: Apache License 2.0
Deploy and manage Curve cluster
License: Apache License 2.0
I hope to upgrade the curvefs cluster that has been installed, but I have found that there are no relevant steps and effective upgrade methods.
[root@prit2-curve-kylin-node1 curvebs-deploy]# curveadm map wp:/vol3 --size 1000GB -c client.yaml # wp:/vol3 is not exist
Start NEBD Service: [SKIP]
Map Volume: [OK]
[root@prit2-curve-kylin-node1 curvebs-deploy]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 446.6G 0 disk
├─sda1 8:1 0 300M 0 part /boot/efi
└─sda2 8:2 0 356.7G 0 part
├─klas-root 252:0 0 340.7G 0 lvm /
└─klas-tmp 252:1 0 16G 0 lvm /tmp
sdb 8:16 0 1.8T 0 disk /mnt/minio-data
sdc 8:32 0 1.8T 0 disk /mnt/monitor
sdd 8:48 0 1.8T 0 disk
sde 8:64 0 1.8T 0 disk
sdf 8:80 0 1.8T 0 disk
sdg 8:96 0 1.8T 0 disk
sdh 8:112 0 1.8T 0 disk
sdi 8:128 0 1.8T 0 disk
sdj 8:144 0 1.8T 0 disk
sdk 8:160 0 1.8T 0 disk
[root@prit2-curve-kylin-node1 curveadm]# docker logs curvebs-target-daemon
tgtd: iser_ib_init(3421) Failed to initialize RDMA; load kernel modules?
tgtd: bs_curve_open(526) can not open curve volume cbd:pool//vol333_wp_, Success
if we add --create to map
or target add
command, it will mapped or added successfully.
curveadm plugin run deploy-granafa -c config.yaml
curveadm plugin run mkfs-ext4 /dev/sda /dev/sbb /dev/sdc
curveadm plugin run shell --host "*" 'rm -rf /tmp/*'
curveadm plugin run scp /path/to/local /path/to/remote
CURVEADM_INVENTORY="~/hosts"
alias nessh='curveadm plugin run ssh'
nessh host1
# vim my-plugin.
curveadm plugin run plugin1
curveadm plugin run plugin2
curveadm plugin run plugin3
curveadm plugin add PLUGIN-NAME -f /path/to/script
curveadm plugin add PLUGIN-NAME github.com/opencurve/curveadm/plugins/mkfs
curveadm plugin ls
golang
、bash
、C++
and etc.~/.curveadm/plugin
.Few users may be unlike to deploy curve client with docker, we should handle this problem.
And if we deploy client for openstack or k8s csi, the client deployment with docker cannot be used by them.
[curve@localhost curveadm.new]$ cat format.yaml
user: curve
ssh_port: 22
private_key_file: /home/curve/.ssh/id_rsa
host:
- 10.0.2.15
disk:
- /dev/sdb:/data/chunkserver0:90
- /dev/sdc:/data/chunkserver1:90
- /dev/sdd:/data/chunkserver2:90 # device:mount_path:format_percent
[curve@localhost curveadm.new]$ curveadm format -f format.yaml
Start Format Chunkfile Pool: [ERROR]
+ host=10.0.2.15 device=/dev/sdb mountPoint=/data/chunkserver0 usage=1% [0/1] [ERROR]
+ host=10.0.2.15 device=/dev/sdc mountPoint=/data/chunkserver1 usage=1% [0/1] [ERROR]
+ host=10.0.2.15 device=/dev/sdd mountPoint=/data/chunkserver2 usage=1% [0/1] [ERROR]
Error:
Process exited with status 32
See log file for deatil: /home/curve/.curveadm/logs/curveadm-2022-01-25_02-57-32.log
[curve@localhost curveadm]$ cat /home/curve/.curveadm/logs/curveadm-2022-01-25_02-57-32.log
[2022/01/25 02:57:33.162 -05:00] [ERROR] [module.go:99] [execCommand] [[email protected]:22] [command="sudo umount /dev/sdc"] [error="Process exited with status 32"] [output="umount: /dev/sdc: not mounted.\n"]
[2022/01/25 02:57:33.196 -05:00] [ERROR] [module.go:99] [execCommand] [[email protected]:22] [command="sudo umount /dev/sdb"] [error="Process exited with status 32"] [output="umount: /dev/sdb: not mounted.\n"]
[2022/01/25 02:57:33.234 -05:00] [ERROR] [module.go:99] [execCommand] [[email protected]:22] [command="sudo umount /dev/sdd"] [error="Process exited with status 32"] [output="umount: /dev/sdd: not mounted.\n"]
when deploy curvefs cluster, will report error like this:
[2022/03/14 11:28:16.217 +08:00] [ERROR] [module.go:99] [execCommand] [[email protected]:22] [command="sudo docker exec 11d54334db424ae539d20bae721523f3471fe31ecc8ab89b583ecd33ef098ed8 bash /curvefs/tools/sbin/wait_chunkservers.sh"] [error="Process exited with status 1"] [output="/curvefs/tools/sbin/wait_chunkservers.sh: line 5: curve_ops_tool: command not found
At present, when cleaning services or clusters, the prompt information is too simple and not clear enough, and users may not be able to clearly understand the consequences of performing related operations, especially those that may cause service suspension or data loss operations. A stronger warning should be displayed to the user, and more complex operation commands to prevent users from misoperation.
[curve@localhost curveadm.new]$ curveadm clean
clean: role=* host=* id=* only=log,data,container
Do you want to continue? [y/N]: (default=N) y
Clean Service: [OK]
[curve@localhost curveadm.new]$ curveadm cluster rm first-cluster
Do you want to continue? [y/N]: (default=N) y
Deleted cluster 'first-cluster'
binaryPath can be empty in reload
command if I just want to reload service.
We know that curveadm
support many commands, it's a tedious work for user to type complete command every times, please support bash completion for curveadm
, thx!
when use curveadm support command, we only collect server service logs now, we may need collect clients logs by given host and mountpoint.
You know that the trouble exists in the every corner of the world, we need help from professionals, please build a bridge between us and them, thx!
When I mount with the wrong yaml file, there is no error message.
Error when mount again:
Error: path mounted, please run 'curveadm umount ***' first,
But when using curveadm umount, there is an error, there is an error in the log:
output="***: not mounted
such as chunkserver disable ext4 renameat2 feature, nbd kernel module problem, nbd block size is 512bytes problem...
We use docker CLI to exec all managment operations currently, it's better to use API for compatibility, stability and safety.
When I want to update mds or metaser, I can only redeploy the entire cluster. It is recommended to add the function of upgrading the module separately.
currently we can deploy prometheus/grafana with docker-compose, but the target.json can not be generated and updated automaticly, we need to deploy them by curveadm and support generating and updating target.json.
Many functions of the client deployed with docker cannot be used:
If users can not pull image from docker hub, then they can not format disks.
Curveadm status can list mds of curvefs. Can curveadm status print which mds is the leader mds?
such as pulling image or mounting dir.
mds/metaserver/space binary name has been changed since opencurve/curve#755, please check whether curveadm should make corresponding modifications.
The current operation of upgrading the cluster version, scaleout the cluster, the operation of upgrading the curveadm tool itself, and other scenarios that require a complex combination of steps, lack of corresponding guidance documents, and it is recommended that they can be improved.
Also we need add some descriptions for configurations, who deploy a cluster can refer these and know how to change them.
--no-recycle
not work3126.clean
sh -c "$(curl -fsSL https://curveadm.nos-eastchina1.126.net/script/install.sh)"
install.sh: 14: Syntax error: "(" unexpected
install.sh: 110: [: ==: unexpected operator
The commands in the code are now prefixed with sudo by default, which may introduce
I feel that sudo should be included as an optional parameter -sudo
or --root
? and only add sudo in front of the command after enabling the parameter.
this issue related to golang/go#38373
make failed on
OS: CentOS Linux release 7.9.2009 (Core)
golang version: go version go1.16.13 linux/amd64
git version: git version 1.8.3.1
error messages(an example, may be different):
# make
go build -o sbin/curveadm /root/curveadm/cmd/curveadm/main.go
go: github.com/theupdateframework/[email protected] requires
github.com/docker/[email protected]: invalid pseudo-version: git fetch --unshallow -f origin in /root/go/pkg/mod/cache/vcs/48fbd2dfabec81f4c93170677bfc89087d4bec07a2d08f6ca5ce3d17962677ee: exit status 128:
fatal: git fetch-pack: expected shallow list
make: *** [build] Error 1
make successfully after upgrading git version to:
git version: git version 2.24.4
yum -y erase git # this command will remove golang too, so need to install golang again
yum -y install https://repo.ius.io/ius-release-el7.rpm
yum -y install git224 golang
All operation commands need to be recorded to the log file for follow-up audit operation steps.
related issue: opencurve/curve#939
current prompt message during run status command:
[curve@localhost curveadm]$ curveadm cluster add xxx
[curve@localhost curveadm]$ curveadm status
Error: unsupport kind('')
[curve@localhost curveadm]$ curveadm cluster ls
xxx
[curve@localhost curveadm]$ curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ curveadm status
Error: unsupport kind('')
[curve@localhost curveadm]$ curveadm cluster add yyy -f ../curveadm.new/noservice.yaml
[curve@localhost curveadm]$ curveadm status
Error: unsupport kind('')
[curve@localhost curveadm]$ curveadm cluster checkout yyy
Switched to cluster 'yyy'
[curve@localhost curveadm]$ curveadm status
No service[curve@localhost curveadm]$
[curve@localhost curveadm]$ ./sbin/curveadm cluster add xxx -f ../curveadm.new/newtop.yaml
[curve@localhost curveadm]$ curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ curveadm status
Error:
service(id=71687ea52675) not found
See log file for deatil: /home/curve/.curveadm/logs/curveadm-2022-01-28_01-15-16.log ### this log file is not exist.
we may change them to these:
[curve@localhost curveadm]$ ./sbin/curveadm cluster add xxx
[curve@localhost curveadm]$ ./sbin/curveadm status
No cluster, please add a cluster firstly
[curve@localhost curveadm]$ ./sbin/curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ ./sbin/curveadm status
Error: cluster topology is empty
[curve@localhost curveadm]$ ./sbin/curveadm cluster add xxx -f ../curveadm.new/noservice.yaml
[curve@localhost curveadm]$ ./sbin/curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ ./sbin/curveadm status
No service, please check your cluster topology
[curve@localhost curveadm]$ ./sbin/curveadm cluster add xxx -f ../curveadm.new/newtop.yaml
[curve@localhost curveadm]$ ./sbin/curveadm status
No cluster, please add a cluster firstly
[curve@localhost curveadm]$ ./sbin/curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ ./sbin/curveadm status
Error:
service(id=d585d74ac18f) not found
Did you deploy the cluster?
We hope to know how many users are using curve and how large it is. Therefore, we can provide a reporting service to obtain information about the scale of user clusters on a regular basis, and perform statistics and display of relevant information on the server.
$ curveadm map <user>:<volume-name> -c client.yaml --create --size 10GB
<volume-name>
must be start with '/' , but many users ignored it even we describe this note in manual.
so I think we should add some checks about the format of <volume-name>
, such as if it is not start with '/', we print some error messages to users to suggest them using correct format.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.