forked from vitalif/vitastor
Rename vitastor-cmd to vitastor-cli
parent
4d6b85fe67
commit
065dfef683
|
@ -40,7 +40,7 @@ Vitastor на данный момент находится в статусе п
|
||||||
- Драйвер диска для QEMU (собирается вне дерева исходников QEMU)
|
- Драйвер диска для QEMU (собирается вне дерева исходников QEMU)
|
||||||
- Драйвер диска для утилиты тестирования производительности fio (также собирается вне дерева исходников fio)
|
- Драйвер диска для утилиты тестирования производительности fio (также собирается вне дерева исходников fio)
|
||||||
- NBD-прокси для монтирования образов ядром ("блочное устройство в режиме пользователя")
|
- NBD-прокси для монтирования образов ядром ("блочное устройство в режиме пользователя")
|
||||||
- Утилита для удаления образов/инодов (vitastor-cmd rm)
|
- Утилита для удаления образов/инодов (vitastor-cli rm)
|
||||||
- Пакеты для Debian и CentOS
|
- Пакеты для Debian и CentOS
|
||||||
- Статистика операций ввода/вывода и занятого места в разрезе инодов
|
- Статистика операций ввода/вывода и занятого места в разрезе инодов
|
||||||
- Именование инодов через хранение их метаданных в etcd
|
- Именование инодов через хранение их метаданных в etcd
|
||||||
|
@ -49,7 +49,7 @@ Vitastor на данный момент находится в статусе п
|
||||||
- Поддержка RDMA/RoCEv2 через libibverbs
|
- Поддержка RDMA/RoCEv2 через libibverbs
|
||||||
- CSI-плагин для Kubernetes
|
- CSI-плагин для Kubernetes
|
||||||
- Базовая поддержка OpenStack: драйвер Cinder, патчи для Nova и libvirt
|
- Базовая поддержка OpenStack: драйвер Cinder, патчи для Nova и libvirt
|
||||||
- Слияние снапшотов (vitastor-cmd merge)
|
- Слияние снапшотов (vitastor-cli {snap-rm,flatten,merge})
|
||||||
|
|
||||||
## Планы развития
|
## Планы развития
|
||||||
|
|
||||||
|
@ -492,10 +492,10 @@ qemu-system-x86_64 -enable-kvm -m 1024
|
||||||
|
|
||||||
### Удалить образ
|
### Удалить образ
|
||||||
|
|
||||||
Используйте утилиту vitastor-cmd rm. Например:
|
Используйте утилиту vitastor-cli rm. Например:
|
||||||
|
|
||||||
```
|
```
|
||||||
vitastor-cmd rm --etcd_address 10.115.0.10:2379/v3 --pool 1 --inode 1 --parallel_osds 16 --iodepth 32
|
vitastor-cli rm --etcd_address 10.115.0.10:2379/v3 --pool 1 --inode 1 --parallel_osds 16 --iodepth 32
|
||||||
```
|
```
|
||||||
|
|
||||||
### NBD
|
### NBD
|
||||||
|
|
|
@ -34,7 +34,7 @@ breaking changes in the future. However, the following is implemented:
|
||||||
- QEMU driver (built out-of-tree)
|
- QEMU driver (built out-of-tree)
|
||||||
- Loadable fio engine for benchmarks (also built out-of-tree)
|
- Loadable fio engine for benchmarks (also built out-of-tree)
|
||||||
- NBD proxy for kernel mounts
|
- NBD proxy for kernel mounts
|
||||||
- Inode removal tool (vitastor-cmd rm)
|
- Inode removal tool (vitastor-cli rm)
|
||||||
- Packaging for Debian and CentOS
|
- Packaging for Debian and CentOS
|
||||||
- Per-inode I/O and space usage statistics
|
- Per-inode I/O and space usage statistics
|
||||||
- Inode metadata storage in etcd
|
- Inode metadata storage in etcd
|
||||||
|
@ -43,7 +43,7 @@ breaking changes in the future. However, the following is implemented:
|
||||||
- RDMA/RoCEv2 support via libibverbs
|
- RDMA/RoCEv2 support via libibverbs
|
||||||
- CSI plugin for Kubernetes
|
- CSI plugin for Kubernetes
|
||||||
- Basic OpenStack support: Cinder driver, Nova and libvirt patches
|
- Basic OpenStack support: Cinder driver, Nova and libvirt patches
|
||||||
- Snapshot merge tool (vitastor-cmd merge)
|
- Snapshot merge tool (vitastor-cli {snap-rm,flatten,merge})
|
||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
|
|
|
@ -354,7 +354,7 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
|
||||||
return nil, status.Error(codes.Internal, "invalid "+inodeCfgKey+" key in etcd: "+err.Error())
|
return nil, status.Error(codes.Internal, "invalid "+inodeCfgKey+" key in etcd: "+err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete inode data by invoking vitastor-cmd
|
// Delete inode data by invoking vitastor-cli
|
||||||
args := []string{
|
args := []string{
|
||||||
"rm", "--etcd_address", strings.Join(etcdUrl, ","),
|
"rm", "--etcd_address", strings.Join(etcdUrl, ","),
|
||||||
"--pool", fmt.Sprintf("%d", idx.PoolId),
|
"--pool", fmt.Sprintf("%d", idx.PoolId),
|
||||||
|
@ -364,7 +364,7 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
|
||||||
{
|
{
|
||||||
args = append(args, "--config_path", ctxVars["configPath"])
|
args = append(args, "--config_path", ctxVars["configPath"])
|
||||||
}
|
}
|
||||||
c := exec.Command("/usr/bin/vitastor-cmd", args...)
|
c := exec.Command("/usr/bin/vitastor-cli", args...)
|
||||||
var stderr bytes.Buffer
|
var stderr bytes.Buffer
|
||||||
c.Stdout = nil
|
c.Stdout = nil
|
||||||
c.Stderr = &stderr
|
c.Stderr = &stderr
|
||||||
|
@ -372,7 +372,7 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
|
||||||
stderrStr := string(stderr.Bytes())
|
stderrStr := string(stderr.Bytes())
|
||||||
if (err != nil)
|
if (err != nil)
|
||||||
{
|
{
|
||||||
klog.Errorf("vitastor-cmd rm failed: %s, status %s\n", stderrStr, err)
|
klog.Errorf("vitastor-cli rm failed: %s, status %s\n", stderrStr, err)
|
||||||
return nil, status.Error(codes.Internal, stderrStr+" (status "+err.Error()+")")
|
return nil, status.Error(codes.Internal, stderrStr+" (status "+err.Error()+")")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -514,7 +514,7 @@ class VitastorDriver(driver.CloneableImageVD,
|
||||||
# Clear data
|
# Clear data
|
||||||
for kv in layers:
|
for kv in layers:
|
||||||
args = [
|
args = [
|
||||||
'vitastor-cmd', 'rm', '--pool', str(kv['value']['pool_id']),
|
'vitastor-cli', 'rm', '--pool', str(kv['value']['pool_id']),
|
||||||
'--inode', str(kv['value']['id']), '--progress', '0',
|
'--inode', str(kv['value']['id']), '--progress', '0',
|
||||||
*(self._vitastor_args())
|
*(self._vitastor_args())
|
||||||
]
|
]
|
||||||
|
|
|
@ -57,7 +57,7 @@ cp -r mon %buildroot/usr/lib/vitastor/mon
|
||||||
%_bindir/vitastor-dump-journal
|
%_bindir/vitastor-dump-journal
|
||||||
%_bindir/vitastor-nbd
|
%_bindir/vitastor-nbd
|
||||||
%_bindir/vitastor-osd
|
%_bindir/vitastor-osd
|
||||||
%_bindir/vitastor-cmd
|
%_bindir/vitastor-cli
|
||||||
%_bindir/vitastor-rm
|
%_bindir/vitastor-rm
|
||||||
%_libdir/qemu-kvm/block-vitastor.so
|
%_libdir/qemu-kvm/block-vitastor.so
|
||||||
%_libdir/libfio_vitastor.so
|
%_libdir/libfio_vitastor.so
|
||||||
|
|
|
@ -54,7 +54,7 @@ cp -r mon %buildroot/usr/lib/vitastor
|
||||||
%_bindir/vitastor-dump-journal
|
%_bindir/vitastor-dump-journal
|
||||||
%_bindir/vitastor-nbd
|
%_bindir/vitastor-nbd
|
||||||
%_bindir/vitastor-osd
|
%_bindir/vitastor-osd
|
||||||
%_bindir/vitastor-cmd
|
%_bindir/vitastor-cli
|
||||||
%_bindir/vitastor-rm
|
%_bindir/vitastor-rm
|
||||||
%_libdir/qemu-kvm/block-vitastor.so
|
%_libdir/qemu-kvm/block-vitastor.so
|
||||||
%_libdir/libfio_vitastor.so
|
%_libdir/libfio_vitastor.so
|
||||||
|
|
|
@ -151,11 +151,11 @@ target_link_libraries(vitastor-nbd
|
||||||
vitastor_client
|
vitastor_client
|
||||||
)
|
)
|
||||||
|
|
||||||
# vitastor-cmd
|
# vitastor-cli
|
||||||
add_executable(vitastor-cmd
|
add_executable(vitastor-cli
|
||||||
cli.cpp cli_flatten.cpp cli_merge.cpp cli_rm.cpp cli_snap_rm.cpp
|
cli.cpp cli_flatten.cpp cli_merge.cpp cli_rm.cpp cli_snap_rm.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(vitastor-cmd
|
target_link_libraries(vitastor-cli
|
||||||
vitastor_client
|
vitastor_client
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -240,8 +240,8 @@ target_include_directories(test_cluster_client PUBLIC ${CMAKE_SOURCE_DIR}/src/mo
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
|
|
||||||
install(TARGETS vitastor-osd vitastor-dump-journal vitastor-nbd vitastor-cmd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install(TARGETS vitastor-osd vitastor-dump-journal vitastor-nbd vitastor-cli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
install_symlink(${CMAKE_INSTALL_BINDIR}/vitastor-rm vitastor-cmd)
|
install_symlink(${CMAKE_INSTALL_BINDIR}/vitastor-rm vitastor-cli)
|
||||||
install(
|
install(
|
||||||
TARGETS vitastor_blk vitastor_client
|
TARGETS vitastor_blk vitastor_client
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
|
|
@ -9,6 +9,6 @@ LD_PRELOAD=libasan.so.5 \
|
||||||
|
|
||||||
$ETCDCTL get --prefix '/vitastor/pg/state'
|
$ETCDCTL get --prefix '/vitastor/pg/state'
|
||||||
|
|
||||||
build/src/vitastor-cmd rm --etcd_address $ETCD_URL --pool 1 --inode 1
|
build/src/vitastor-cli rm --etcd_address $ETCD_URL --pool 1 --inode 1
|
||||||
|
|
||||||
format_green OK
|
format_green OK
|
||||||
|
|
|
@ -43,7 +43,7 @@ cmp ./testdata/merged.bin ./testdata/check.bin
|
||||||
|
|
||||||
$ETCDCTL put /vitastor/config/inode/1/3 '{"parent_id":2,"name":"testimg","size":'$((32*1024*1024))'}'
|
$ETCDCTL put /vitastor/config/inode/1/3 '{"parent_id":2,"name":"testimg","size":'$((32*1024*1024))'}'
|
||||||
|
|
||||||
build/src/vitastor-cmd snap-rm --etcd_address $ETCD_URL testimg@0
|
build/src/vitastor-cli snap-rm --etcd_address $ETCD_URL testimg@0
|
||||||
|
|
||||||
qemu-img convert -S 4096 -p \
|
qemu-img convert -S 4096 -p \
|
||||||
-f raw "vitastor:etcd_host=127.0.0.1\:$ETCD_PORT/v3:image=testimg" \
|
-f raw "vitastor:etcd_host=127.0.0.1\:$ETCD_PORT/v3:image=testimg" \
|
||||||
|
|
Loading…
Reference in New Issue