github.com/yasker/longhorn-engine@v0.0.0-20160621014712-6ed6cfca0729/README.md (about) 1 longhorn [![Build Status](https://ci-longhorn.rancher.io/api/badges/rancher/longhorn/status.svg)](https://ci-longhorn.rancher.io/rancher/longhorn) 2 ======== 3 4 A microservice that does micro things. 5 6 ## Building 7 8 `make` 9 10 ## Running 11 12 You need to be running RancherOS v0.4.4 (all kernel patches are not yet fully upstreamed). 13 Also ensure that TCMU is enabled: 14 15 modprobe target_core_user 16 mount -t configfs none /sys/kernel/config 17 18 Then run 19 20 ./bin/longhorn replica --size 10g /opt/volume 21 ./bin/longhorn replica --size 10g --listen localhost:9505 /opt/volume2 22 ./bin/longhorn controller --frontend tcmu --replica tcp://localhost:9502 --replica tcp://localhost:9505 vol-name 23 24 That will create the device `/dev/longhorn/vol-name` 25 26 ## Ports 27 28 Each replica uses three consequetive ports. By default they are 9502, 9503, and 9504. They are used for 29 controll channel, data channel, and sync communication respectively. 30 31 ## CLI 32 33 List replicas 34 35 longhorn ls 36 37 Remove replica 38 39 longhorn rm tcp://localhost:9502 40 41 Add replica 42 43 longhorn add tcp://localhost:9502 44 45 ## License 46 Copyright (c) 2014-2016 [Rancher Labs, Inc.](http://rancher.com) 47 48 Licensed under the Apache License, Version 2.0 (the "License"); 49 you may not use this file except in compliance with the License. 50 You may obtain a copy of the License at 51 52 [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) 53 54 Unless required by applicable law or agreed to in writing, software 55 distributed under the License is distributed on an "AS IS" BASIS, 56 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 57 See the License for the specific language governing permissions and 58 limitations under the License.