forked from vitalif/vitastor
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
bb84379db6 | |||
714dda8151 | |||
834554c523 | |||
e718116f54 | |||
98e3528a14 | |||
8e88f77101 | |||
caa2cc2e6c | |||
842ba8b831 | |||
1493823f9e | |||
c857272f44 |
@@ -2,6 +2,6 @@ cmake_minimum_required(VERSION 2.8)
|
|||||||
|
|
||||||
project(vitastor)
|
project(vitastor)
|
||||||
|
|
||||||
set(VERSION "0.6.16")
|
set(VERSION "0.6.17")
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
@@ -407,6 +407,7 @@ Vitastor с однопоточной NBD прокси на том же стен
|
|||||||
- На хостах мониторов:
|
- На хостах мониторов:
|
||||||
- Пропишите нужные вам значения в файле `/usr/lib/vitastor/mon/make-units.sh`
|
- Пропишите нужные вам значения в файле `/usr/lib/vitastor/mon/make-units.sh`
|
||||||
- Создайте юниты systemd для etcd и мониторов: `/usr/lib/vitastor/mon/make-units.sh`
|
- Создайте юниты systemd для etcd и мониторов: `/usr/lib/vitastor/mon/make-units.sh`
|
||||||
|
- Запустите etcd и мониторы: `systemctl start etcd vitastor-mon`
|
||||||
- Пропишите etcd_address и osd_network в `/etc/vitastor/vitastor.conf`. Например:
|
- Пропишите etcd_address и osd_network в `/etc/vitastor/vitastor.conf`. Например:
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
@@ -437,7 +438,6 @@ Vitastor с однопоточной NBD прокси на том же стен
|
|||||||
диски, используемые на одном из тестовых стендов - Intel D3-S4510 - очень сильно не любят такую
|
диски, используемые на одном из тестовых стендов - Intel D3-S4510 - очень сильно не любят такую
|
||||||
перезапись, и для них была добавлена эта опция. Когда данный режим включён, также нужно поднимать
|
перезапись, и для них была добавлена эта опция. Когда данный режим включён, также нужно поднимать
|
||||||
значение `journal_sector_buffer_count`, так как иначе Vitastor не хватит буферов для записи в журнал.
|
значение `journal_sector_buffer_count`, так как иначе Vitastor не хватит буферов для записи в журнал.
|
||||||
- Запустите все etcd: `systemctl start etcd`
|
|
||||||
- Создайте глобальную конфигурацию в etcd: `etcdctl --endpoints=... put /vitastor/config/global '{"immediate_commit":"all"}'`
|
- Создайте глобальную конфигурацию в etcd: `etcdctl --endpoints=... put /vitastor/config/global '{"immediate_commit":"all"}'`
|
||||||
(если все ваши диски - серверные с конденсаторами).
|
(если все ваши диски - серверные с конденсаторами).
|
||||||
- Создайте пулы: `etcdctl --endpoints=... put /vitastor/config/pools '{"1":{"name":"testpool","scheme":"replicated","pg_size":2,"pg_minsize":1,"pg_count":256,"failure_domain":"host"}}'`.
|
- Создайте пулы: `etcdctl --endpoints=... put /vitastor/config/pools '{"1":{"name":"testpool","scheme":"replicated","pg_size":2,"pg_minsize":1,"pg_count":256,"failure_domain":"host"}}'`.
|
||||||
|
@@ -360,6 +360,7 @@ and calculate disk offsets almost by hand. This will be fixed in near future.
|
|||||||
- On the monitor hosts:
|
- On the monitor hosts:
|
||||||
- Edit variables at the top of `/usr/lib/vitastor/mon/make-units.sh` to desired values.
|
- Edit variables at the top of `/usr/lib/vitastor/mon/make-units.sh` to desired values.
|
||||||
- Create systemd units for the monitor and etcd: `/usr/lib/vitastor/mon/make-units.sh`
|
- Create systemd units for the monitor and etcd: `/usr/lib/vitastor/mon/make-units.sh`
|
||||||
|
- Start etcd and monitors: `systemctl start etcd vitastor-mon`
|
||||||
- Put etcd_address and osd_network into `/etc/vitastor/vitastor.conf`. Example:
|
- Put etcd_address and osd_network into `/etc/vitastor/vitastor.conf`. Example:
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
VERSION ?= v0.6.16
|
VERSION ?= v0.6.17
|
||||||
|
|
||||||
all: build push
|
all: build push
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ spec:
|
|||||||
capabilities:
|
capabilities:
|
||||||
add: ["SYS_ADMIN"]
|
add: ["SYS_ADMIN"]
|
||||||
allowPrivilegeEscalation: true
|
allowPrivilegeEscalation: true
|
||||||
image: vitalif/vitastor-csi:v0.6.16
|
image: vitalif/vitastor-csi:v0.6.17
|
||||||
args:
|
args:
|
||||||
- "--node=$(NODE_ID)"
|
- "--node=$(NODE_ID)"
|
||||||
- "--endpoint=$(CSI_ENDPOINT)"
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
|
@@ -116,7 +116,7 @@ spec:
|
|||||||
privileged: true
|
privileged: true
|
||||||
capabilities:
|
capabilities:
|
||||||
add: ["SYS_ADMIN"]
|
add: ["SYS_ADMIN"]
|
||||||
image: vitalif/vitastor-csi:v0.6.16
|
image: vitalif/vitastor-csi:v0.6.17
|
||||||
args:
|
args:
|
||||||
- "--node=$(NODE_ID)"
|
- "--node=$(NODE_ID)"
|
||||||
- "--endpoint=$(CSI_ENDPOINT)"
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
|
13
csi/deploy/example-pvc-block.yaml
Normal file
13
csi/deploy/example-pvc-block.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: test-vitastor-pvc-block
|
||||||
|
spec:
|
||||||
|
storageClassName: vitastor
|
||||||
|
volumeMode: Block
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
17
csi/deploy/example-test-pod-block.yaml
Normal file
17
csi/deploy/example-test-pod-block.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: vitastor-test-block-pvc
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: vitastor-test-block-pvc
|
||||||
|
image: nginx
|
||||||
|
volumeDevices:
|
||||||
|
- name: data
|
||||||
|
devicePath: /dev/xvda
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: test-vitastor-pvc-block
|
||||||
|
readOnly: false
|
17
csi/deploy/example-test-pod.yaml
Normal file
17
csi/deploy/example-test-pod.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: vitastor-test-nginx
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: vitastor-test-nginx
|
||||||
|
image: nginx
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /usr/share/nginx/html/s3
|
||||||
|
name: data
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: test-vitastor-pvc
|
||||||
|
readOnly: false
|
@@ -5,7 +5,7 @@ package vitastor
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
vitastorCSIDriverName = "csi.vitastor.io"
|
vitastorCSIDriverName = "csi.vitastor.io"
|
||||||
vitastorCSIDriverVersion = "0.6.16"
|
vitastorCSIDriverVersion = "0.6.17"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config struct fills the parameters of request or user input
|
// Config struct fills the parameters of request or user input
|
||||||
|
@@ -67,29 +67,44 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
|
|||||||
klog.Infof("received node publish volume request %+v", protosanitizer.StripSecrets(req))
|
klog.Infof("received node publish volume request %+v", protosanitizer.StripSecrets(req))
|
||||||
|
|
||||||
targetPath := req.GetTargetPath()
|
targetPath := req.GetTargetPath()
|
||||||
|
isBlock := req.GetVolumeCapability().GetBlock() != nil
|
||||||
|
|
||||||
// Check that it's not already mounted
|
// Check that it's not already mounted
|
||||||
free, error := mount.IsNotMountPoint(ns.mounter, targetPath)
|
_, error := mount.IsNotMountPoint(ns.mounter, targetPath)
|
||||||
if (error != nil)
|
if (error != nil)
|
||||||
{
|
{
|
||||||
if (os.IsNotExist(error))
|
if (os.IsNotExist(error))
|
||||||
{
|
{
|
||||||
error := os.MkdirAll(targetPath, 0777)
|
if (isBlock)
|
||||||
if (error != nil)
|
|
||||||
{
|
{
|
||||||
return nil, status.Error(codes.Internal, error.Error())
|
pathFile, err := os.OpenFile(targetPath, os.O_CREATE|os.O_RDWR, 0o600)
|
||||||
|
if (err != nil)
|
||||||
|
{
|
||||||
|
klog.Errorf("failed to create block device mount target %s with error: %v", targetPath, err)
|
||||||
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
|
}
|
||||||
|
err = pathFile.Close()
|
||||||
|
if (err != nil)
|
||||||
|
{
|
||||||
|
klog.Errorf("failed to close %s with error: %v", targetPath, err)
|
||||||
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
err := os.MkdirAll(targetPath, 0777)
|
||||||
|
if (err != nil)
|
||||||
|
{
|
||||||
|
klog.Errorf("failed to create fs mount target %s with error: %v", targetPath, err)
|
||||||
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
free = true
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return nil, status.Error(codes.Internal, error.Error())
|
return nil, status.Error(codes.Internal, error.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!free)
|
|
||||||
{
|
|
||||||
return &csi.NodePublishVolumeResponse{}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
ctxVars := make(map[string]string)
|
ctxVars := make(map[string]string)
|
||||||
err := json.Unmarshal([]byte(req.VolumeId), &ctxVars)
|
err := json.Unmarshal([]byte(req.VolumeId), &ctxVars)
|
||||||
@@ -149,7 +164,6 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
|
|||||||
|
|
||||||
// Format the device (ext4 or xfs)
|
// Format the device (ext4 or xfs)
|
||||||
fsType := req.GetVolumeCapability().GetMount().GetFsType()
|
fsType := req.GetVolumeCapability().GetMount().GetFsType()
|
||||||
isBlock := req.GetVolumeCapability().GetBlock() != nil
|
|
||||||
opt := req.GetVolumeCapability().GetMount().GetMountFlags()
|
opt := req.GetVolumeCapability().GetMount().GetMountFlags()
|
||||||
opt = append(opt, "_netdev")
|
opt = append(opt, "_netdev")
|
||||||
if ((req.VolumeCapability.AccessMode.Mode == csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY ||
|
if ((req.VolumeCapability.AccessMode.Mode == csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY ||
|
||||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -1,4 +1,4 @@
|
|||||||
vitastor (0.6.16-1) unstable; urgency=medium
|
vitastor (0.6.17-1) unstable; urgency=medium
|
||||||
|
|
||||||
* RDMA support
|
* RDMA support
|
||||||
* Bugfixes
|
* Bugfixes
|
||||||
|
8
debian/vitastor.Dockerfile
vendored
8
debian/vitastor.Dockerfile
vendored
@@ -33,8 +33,8 @@ RUN set -e -x; \
|
|||||||
mkdir -p /root/packages/vitastor-$REL; \
|
mkdir -p /root/packages/vitastor-$REL; \
|
||||||
rm -rf /root/packages/vitastor-$REL/*; \
|
rm -rf /root/packages/vitastor-$REL/*; \
|
||||||
cd /root/packages/vitastor-$REL; \
|
cd /root/packages/vitastor-$REL; \
|
||||||
cp -r /root/vitastor vitastor-0.6.16; \
|
cp -r /root/vitastor vitastor-0.6.17; \
|
||||||
cd vitastor-0.6.16; \
|
cd vitastor-0.6.17; \
|
||||||
ln -s /root/fio-build/fio-*/ ./fio; \
|
ln -s /root/fio-build/fio-*/ ./fio; \
|
||||||
FIO=$(head -n1 fio/debian/changelog | perl -pe 's/^.*\((.*?)\).*$/$1/'); \
|
FIO=$(head -n1 fio/debian/changelog | perl -pe 's/^.*\((.*?)\).*$/$1/'); \
|
||||||
ls /usr/include/linux/raw.h || cp ./debian/raw.h /usr/include/linux/raw.h; \
|
ls /usr/include/linux/raw.h || cp ./debian/raw.h /usr/include/linux/raw.h; \
|
||||||
@@ -47,8 +47,8 @@ RUN set -e -x; \
|
|||||||
rm -rf a b; \
|
rm -rf a b; \
|
||||||
echo "dep:fio=$FIO" > debian/fio_version; \
|
echo "dep:fio=$FIO" > debian/fio_version; \
|
||||||
cd /root/packages/vitastor-$REL; \
|
cd /root/packages/vitastor-$REL; \
|
||||||
tar --sort=name --mtime='2020-01-01' --owner=0 --group=0 --exclude=debian -cJf vitastor_0.6.16.orig.tar.xz vitastor-0.6.16; \
|
tar --sort=name --mtime='2020-01-01' --owner=0 --group=0 --exclude=debian -cJf vitastor_0.6.17.orig.tar.xz vitastor-0.6.17; \
|
||||||
cd vitastor-0.6.16; \
|
cd vitastor-0.6.17; \
|
||||||
V=$(head -n1 debian/changelog | perl -pe 's/^.*\((.*?)\).*$/$1/'); \
|
V=$(head -n1 debian/changelog | perl -pe 's/^.*\((.*?)\).*$/$1/'); \
|
||||||
DEBFULLNAME="Vitaliy Filippov <vitalif@yourcmc.ru>" dch -D $REL -v "$V""$REL" "Rebuild for $REL"; \
|
DEBFULLNAME="Vitaliy Filippov <vitalif@yourcmc.ru>" dch -D $REL -v "$V""$REL" "Rebuild for $REL"; \
|
||||||
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage --jobs=auto -sa; \
|
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage --jobs=auto -sa; \
|
||||||
|
16
mon/mon.js
16
mon/mon.js
@@ -224,15 +224,19 @@ const etcd_tree = {
|
|||||||
}, */
|
}, */
|
||||||
},
|
},
|
||||||
inodestats: {
|
inodestats: {
|
||||||
/* <inode_t>: {
|
/* <pool_id>: {
|
||||||
read: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
|
<inode_t>: {
|
||||||
write: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
|
read: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
|
||||||
delete: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
|
write: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
|
||||||
|
delete: { count: uint64_t, usec: uint64_t, bytes: uint64_t },
|
||||||
|
},
|
||||||
}, */
|
}, */
|
||||||
},
|
},
|
||||||
space: {
|
space: {
|
||||||
/* <osd_num_t>: {
|
/* <osd_num_t>: {
|
||||||
<inode_t>: uint64_t, // bytes
|
<pool_id>: {
|
||||||
|
<inode_t>: uint64_t, // bytes
|
||||||
|
},
|
||||||
}, */
|
}, */
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -272,7 +276,7 @@ const etcd_tree = {
|
|||||||
<pg_id>: {
|
<pg_id>: {
|
||||||
osd_sets: osd_num_t[][],
|
osd_sets: osd_num_t[][],
|
||||||
all_peers: osd_num_t[],
|
all_peers: osd_num_t[],
|
||||||
epoch: uint32_t,
|
epoch: uint64_t,
|
||||||
},
|
},
|
||||||
}, */
|
}, */
|
||||||
},
|
},
|
||||||
|
@@ -50,7 +50,7 @@ from cinder.volume import configuration
|
|||||||
from cinder.volume import driver
|
from cinder.volume import driver
|
||||||
from cinder.volume import volume_utils
|
from cinder.volume import volume_utils
|
||||||
|
|
||||||
VERSION = '0.6.16'
|
VERSION = '0.6.17'
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@@ -25,4 +25,4 @@ rm fio
|
|||||||
mv fio-copy fio
|
mv fio-copy fio
|
||||||
FIO=`rpm -qi fio | perl -e 'while(<>) { /^Epoch[\s:]+(\S+)/ && print "$1:"; /^Version[\s:]+(\S+)/ && print $1; /^Release[\s:]+(\S+)/ && print "-$1"; }'`
|
FIO=`rpm -qi fio | perl -e 'while(<>) { /^Epoch[\s:]+(\S+)/ && print "$1:"; /^Version[\s:]+(\S+)/ && print $1; /^Release[\s:]+(\S+)/ && print "-$1"; }'`
|
||||||
perl -i -pe 's/(Requires:\s*fio)([^\n]+)?/$1 = '$FIO'/' $VITASTOR/rpm/vitastor-el$EL.spec
|
perl -i -pe 's/(Requires:\s*fio)([^\n]+)?/$1 = '$FIO'/' $VITASTOR/rpm/vitastor-el$EL.spec
|
||||||
tar --transform 's#^#vitastor-0.6.16/#' --exclude 'rpm/*.rpm' -czf $VITASTOR/../vitastor-0.6.16$(rpm --eval '%dist').tar.gz *
|
tar --transform 's#^#vitastor-0.6.17/#' --exclude 'rpm/*.rpm' -czf $VITASTOR/../vitastor-0.6.17$(rpm --eval '%dist').tar.gz *
|
||||||
|
@@ -34,7 +34,7 @@ ADD . /root/vitastor
|
|||||||
RUN set -e; \
|
RUN set -e; \
|
||||||
cd /root/vitastor/rpm; \
|
cd /root/vitastor/rpm; \
|
||||||
sh build-tarball.sh; \
|
sh build-tarball.sh; \
|
||||||
cp /root/vitastor-0.6.16.el7.tar.gz ~/rpmbuild/SOURCES; \
|
cp /root/vitastor-0.6.17.el7.tar.gz ~/rpmbuild/SOURCES; \
|
||||||
cp vitastor-el7.spec ~/rpmbuild/SPECS/vitastor.spec; \
|
cp vitastor-el7.spec ~/rpmbuild/SPECS/vitastor.spec; \
|
||||||
cd ~/rpmbuild/SPECS/; \
|
cd ~/rpmbuild/SPECS/; \
|
||||||
rpmbuild -ba vitastor.spec; \
|
rpmbuild -ba vitastor.spec; \
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
Name: vitastor
|
Name: vitastor
|
||||||
Version: 0.6.16
|
Version: 0.6.17
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Vitastor, a fast software-defined clustered block storage
|
Summary: Vitastor, a fast software-defined clustered block storage
|
||||||
|
|
||||||
License: Vitastor Network Public License 1.1
|
License: Vitastor Network Public License 1.1
|
||||||
URL: https://vitastor.io/
|
URL: https://vitastor.io/
|
||||||
Source0: vitastor-0.6.16.el7.tar.gz
|
Source0: vitastor-0.6.17.el7.tar.gz
|
||||||
|
|
||||||
BuildRequires: liburing-devel >= 0.6
|
BuildRequires: liburing-devel >= 0.6
|
||||||
BuildRequires: gperftools-devel
|
BuildRequires: gperftools-devel
|
||||||
|
@@ -33,7 +33,7 @@ ADD . /root/vitastor
|
|||||||
RUN set -e; \
|
RUN set -e; \
|
||||||
cd /root/vitastor/rpm; \
|
cd /root/vitastor/rpm; \
|
||||||
sh build-tarball.sh; \
|
sh build-tarball.sh; \
|
||||||
cp /root/vitastor-0.6.16.el8.tar.gz ~/rpmbuild/SOURCES; \
|
cp /root/vitastor-0.6.17.el8.tar.gz ~/rpmbuild/SOURCES; \
|
||||||
cp vitastor-el8.spec ~/rpmbuild/SPECS/vitastor.spec; \
|
cp vitastor-el8.spec ~/rpmbuild/SPECS/vitastor.spec; \
|
||||||
cd ~/rpmbuild/SPECS/; \
|
cd ~/rpmbuild/SPECS/; \
|
||||||
rpmbuild -ba vitastor.spec; \
|
rpmbuild -ba vitastor.spec; \
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
Name: vitastor
|
Name: vitastor
|
||||||
Version: 0.6.16
|
Version: 0.6.17
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Vitastor, a fast software-defined clustered block storage
|
Summary: Vitastor, a fast software-defined clustered block storage
|
||||||
|
|
||||||
License: Vitastor Network Public License 1.1
|
License: Vitastor Network Public License 1.1
|
||||||
URL: https://vitastor.io/
|
URL: https://vitastor.io/
|
||||||
Source0: vitastor-0.6.16.el8.tar.gz
|
Source0: vitastor-0.6.17.el8.tar.gz
|
||||||
|
|
||||||
BuildRequires: liburing-devel >= 0.6
|
BuildRequires: liburing-devel >= 0.6
|
||||||
BuildRequires: gperftools-devel
|
BuildRequires: gperftools-devel
|
||||||
|
@@ -15,7 +15,7 @@ if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/local/?$")
|
|||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-DVERSION="0.6.16")
|
add_definitions(-DVERSION="0.6.17")
|
||||||
add_definitions(-Wall -Wno-sign-compare -Wno-comment -Wno-parentheses -Wno-pointer-arith -fdiagnostics-color=always -I ${CMAKE_SOURCE_DIR}/src)
|
add_definitions(-Wall -Wno-sign-compare -Wno-comment -Wno-parentheses -Wno-pointer-arith -fdiagnostics-color=always -I ${CMAKE_SOURCE_DIR}/src)
|
||||||
if (${WITH_ASAN})
|
if (${WITH_ASAN})
|
||||||
add_definitions(-fsanitize=address -fno-omit-frame-pointer)
|
add_definitions(-fsanitize=address -fno-omit-frame-pointer)
|
||||||
|
@@ -25,7 +25,7 @@ allocator::allocator(uint64_t blocks)
|
|||||||
size = free = blocks;
|
size = free = blocks;
|
||||||
last_one_mask = (blocks % 64) == 0
|
last_one_mask = (blocks % 64) == 0
|
||||||
? UINT64_MAX
|
? UINT64_MAX
|
||||||
: ((1l << (blocks % 64)) - 1);
|
: (((uint64_t)1 << (blocks % 64)) - 1);
|
||||||
for (uint64_t i = 0; i < total; i++)
|
for (uint64_t i = 0; i < total; i++)
|
||||||
{
|
{
|
||||||
mask[i] = 0;
|
mask[i] = 0;
|
||||||
@@ -79,7 +79,7 @@ void allocator::set(uint64_t addr, bool value)
|
|||||||
}
|
}
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
mask[last] = mask[last] | (1l << bit);
|
mask[last] = mask[last] | ((uint64_t)1 << bit);
|
||||||
if (mask[last] != (!is_last || cur_addr/64 < size/64
|
if (mask[last] != (!is_last || cur_addr/64 < size/64
|
||||||
? UINT64_MAX : last_one_mask))
|
? UINT64_MAX : last_one_mask))
|
||||||
{
|
{
|
||||||
@@ -88,7 +88,7 @@ void allocator::set(uint64_t addr, bool value)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mask[last] = mask[last] & ~(1l << bit);
|
mask[last] = mask[last] & ~((uint64_t)1 << bit);
|
||||||
}
|
}
|
||||||
is_last = false;
|
is_last = false;
|
||||||
if (p2 > 1)
|
if (p2 > 1)
|
||||||
|
@@ -131,6 +131,7 @@ resume_1:
|
|||||||
}
|
}
|
||||||
// Skip superblock
|
// Skip superblock
|
||||||
bs->meta_offset += bs->meta_block_size;
|
bs->meta_offset += bs->meta_block_size;
|
||||||
|
bs->meta_len -= bs->meta_block_size;
|
||||||
prev_done = 0;
|
prev_done = 0;
|
||||||
done_len = 0;
|
done_len = 0;
|
||||||
done_pos = 0;
|
done_pos = 0;
|
||||||
|
@@ -457,13 +457,13 @@ uint64_t parse_size(std::string size_str)
|
|||||||
if (type_char == 'k' || type_char == 'm' || type_char == 'g' || type_char == 't')
|
if (type_char == 'k' || type_char == 'm' || type_char == 'g' || type_char == 't')
|
||||||
{
|
{
|
||||||
if (type_char == 'k')
|
if (type_char == 'k')
|
||||||
mul = 1l<<10;
|
mul = (uint64_t)1<<10;
|
||||||
else if (type_char == 'm')
|
else if (type_char == 'm')
|
||||||
mul = 1l<<20;
|
mul = (uint64_t)1<<20;
|
||||||
else if (type_char == 'g')
|
else if (type_char == 'g')
|
||||||
mul = 1l<<30;
|
mul = (uint64_t)1<<30;
|
||||||
else /*if (type_char == 't')*/
|
else /*if (type_char == 't')*/
|
||||||
mul = 1l<<40;
|
mul = (uint64_t)1<<40;
|
||||||
size_str = size_str.substr(0, size_str.length()-1);
|
size_str = size_str.substr(0, size_str.length()-1);
|
||||||
}
|
}
|
||||||
uint64_t size = json11::Json(size_str).uint64_value() * mul;
|
uint64_t size = json11::Json(size_str).uint64_value() * mul;
|
||||||
|
@@ -124,8 +124,8 @@ resume_1:
|
|||||||
{ "scheme_name", pool_cfg.scheme == POOL_SCHEME_REPLICATED
|
{ "scheme_name", pool_cfg.scheme == POOL_SCHEME_REPLICATED
|
||||||
? std::to_string(pool_cfg.pg_size)+"/"+std::to_string(pool_cfg.pg_minsize)
|
? std::to_string(pool_cfg.pg_size)+"/"+std::to_string(pool_cfg.pg_minsize)
|
||||||
: "EC "+std::to_string(pool_cfg.pg_size-pool_cfg.parity_chunks)+"+"+std::to_string(pool_cfg.parity_chunks) },
|
: "EC "+std::to_string(pool_cfg.pg_size-pool_cfg.parity_chunks)+"+"+std::to_string(pool_cfg.parity_chunks) },
|
||||||
{ "used_raw", (uint64_t)(pool_stats[pool_cfg.id]["used_raw_tb"].number_value() * (1l<<40)) },
|
{ "used_raw", (uint64_t)(pool_stats[pool_cfg.id]["used_raw_tb"].number_value() * ((uint64_t)1<<40)) },
|
||||||
{ "total_raw", (uint64_t)(pool_stats[pool_cfg.id]["total_raw_tb"].number_value() * (1l<<40)) },
|
{ "total_raw", (uint64_t)(pool_stats[pool_cfg.id]["total_raw_tb"].number_value() * ((uint64_t)1<<40)) },
|
||||||
{ "max_available", pool_avail },
|
{ "max_available", pool_avail },
|
||||||
{ "raw_to_usable", pool_stats[pool_cfg.id]["raw_to_usable"].number_value() },
|
{ "raw_to_usable", pool_stats[pool_cfg.id]["raw_to_usable"].number_value() },
|
||||||
{ "space_efficiency", pool_stats[pool_cfg.id]["space_efficiency"].number_value() },
|
{ "space_efficiency", pool_stats[pool_cfg.id]["space_efficiency"].number_value() },
|
||||||
|
@@ -436,8 +436,8 @@ std::string print_table(json11::Json items, json11::Json header, bool use_esc)
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t size_thresh[] = { 1024l*1024*1024*1024, 1024l*1024*1024, 1024l*1024, 1024, 0 };
|
static uint64_t size_thresh[] = { (uint64_t)1024*1024*1024*1024, (uint64_t)1024*1024*1024, (uint64_t)1024*1024, 1024, 0 };
|
||||||
static uint64_t size_thresh_d[] = { 1000000000000l, 1000000000l, 1000000l, 1000l, 0 };
|
static uint64_t size_thresh_d[] = { (uint64_t)1000000000000, (uint64_t)1000000000, (uint64_t)1000000, (uint64_t)1000, 0 };
|
||||||
static const int size_thresh_n = sizeof(size_thresh)/sizeof(size_thresh[0]);
|
static const int size_thresh_n = sizeof(size_thresh)/sizeof(size_thresh[0]);
|
||||||
static const char *size_unit = "TGMKB";
|
static const char *size_unit = "TGMKB";
|
||||||
|
|
||||||
|
@@ -193,7 +193,7 @@ std::function<bool(void)> cli_tool_t::start_rm(json11::Json cfg)
|
|||||||
remover->pool_id = cfg["pool"].uint64_value();
|
remover->pool_id = cfg["pool"].uint64_value();
|
||||||
if (remover->pool_id)
|
if (remover->pool_id)
|
||||||
{
|
{
|
||||||
remover->inode = (remover->inode & ((1l << (64-POOL_ID_BITS)) - 1)) | (((uint64_t)remover->pool_id) << (64-POOL_ID_BITS));
|
remover->inode = (remover->inode & (((uint64_t)1 << (64-POOL_ID_BITS)) - 1)) | (((uint64_t)remover->pool_id) << (64-POOL_ID_BITS));
|
||||||
}
|
}
|
||||||
remover->pool_id = INODE_POOL(remover->inode);
|
remover->pool_id = INODE_POOL(remover->inode);
|
||||||
if (!remover->pool_id)
|
if (!remover->pool_id)
|
||||||
|
@@ -217,7 +217,7 @@ resume_2:
|
|||||||
// JSON output
|
// JSON output
|
||||||
printf("%s\n", json11::Json(json11::Json::object {
|
printf("%s\n", json11::Json(json11::Json::object {
|
||||||
{ "etcd_alive", etcd_alive },
|
{ "etcd_alive", etcd_alive },
|
||||||
{ "etcd_count", etcd_states.size() },
|
{ "etcd_count", (uint64_t)etcd_states.size() },
|
||||||
{ "etcd_db_size", etcd_db_size },
|
{ "etcd_db_size", etcd_db_size },
|
||||||
{ "mon_count", mon_count },
|
{ "mon_count", mon_count },
|
||||||
{ "mon_master", mon_master },
|
{ "mon_master", mon_master },
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#define PART_SENT 1
|
#define PART_SENT 1
|
||||||
#define PART_DONE 2
|
#define PART_DONE 2
|
||||||
#define PART_ERROR 4
|
#define PART_ERROR 4
|
||||||
|
#define PART_RETRY 8
|
||||||
#define CACHE_DIRTY 1
|
#define CACHE_DIRTY 1
|
||||||
#define CACHE_FLUSHING 2
|
#define CACHE_FLUSHING 2
|
||||||
#define CACHE_REPEATING 3
|
#define CACHE_REPEATING 3
|
||||||
@@ -670,14 +671,17 @@ resume_2:
|
|||||||
if (!try_send(op, i))
|
if (!try_send(op, i))
|
||||||
{
|
{
|
||||||
// We'll need to retry again
|
// We'll need to retry again
|
||||||
op->up_wait = true;
|
if (op->parts[i].flags & PART_RETRY)
|
||||||
if (!retry_timeout_id)
|
|
||||||
{
|
{
|
||||||
retry_timeout_id = tfd->set_timer(up_wait_retry_interval, false, [this](int)
|
op->up_wait = true;
|
||||||
|
if (!retry_timeout_id)
|
||||||
{
|
{
|
||||||
retry_timeout_id = 0;
|
retry_timeout_id = tfd->set_timer(up_wait_retry_interval, false, [this](int)
|
||||||
continue_ops(true);
|
{
|
||||||
});
|
retry_timeout_id = 0;
|
||||||
|
continue_ops(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
op->state = 2;
|
op->state = 2;
|
||||||
}
|
}
|
||||||
@@ -746,7 +750,7 @@ resume_3:
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < op->parts.size(); i++)
|
for (int i = 0; i < op->parts.size(); i++)
|
||||||
{
|
{
|
||||||
op->parts[i].flags = 0;
|
op->parts[i].flags = PART_RETRY;
|
||||||
}
|
}
|
||||||
goto resume_2;
|
goto resume_2;
|
||||||
}
|
}
|
||||||
|
@@ -968,7 +968,7 @@ void etcd_state_client_t::parse_state(const etcd_kv_t & kv)
|
|||||||
{
|
{
|
||||||
fprintf(
|
fprintf(
|
||||||
stderr, "Inode %lu/%lu parent_pool value is invalid, ignoring parent setting\n",
|
stderr, "Inode %lu/%lu parent_pool value is invalid, ignoring parent setting\n",
|
||||||
inode_num >> (64-POOL_ID_BITS), inode_num & ((1l << (64-POOL_ID_BITS)) - 1)
|
inode_num >> (64-POOL_ID_BITS), inode_num & (((uint64_t)1 << (64-POOL_ID_BITS)) - 1)
|
||||||
);
|
);
|
||||||
parent_inode_num = 0;
|
parent_inode_num = 0;
|
||||||
}
|
}
|
||||||
|
@@ -214,14 +214,14 @@ static int sec_setup(struct thread_data *td)
|
|||||||
|
|
||||||
if (!o->image)
|
if (!o->image)
|
||||||
{
|
{
|
||||||
if (!(o->inode & ((1l << (64-POOL_ID_BITS)) - 1)))
|
if (!(o->inode & (((uint64_t)1 << (64-POOL_ID_BITS)) - 1)))
|
||||||
{
|
{
|
||||||
td_verror(td, EINVAL, "inode number is missing");
|
td_verror(td, EINVAL, "inode number is missing");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (o->pool)
|
if (o->pool)
|
||||||
{
|
{
|
||||||
o->inode = (o->inode & ((1l << (64-POOL_ID_BITS)) - 1)) | (o->pool << (64-POOL_ID_BITS));
|
o->inode = (o->inode & (((uint64_t)1 << (64-POOL_ID_BITS)) - 1)) | (o->pool << (64-POOL_ID_BITS));
|
||||||
}
|
}
|
||||||
if (!(o->inode >> (64-POOL_ID_BITS)))
|
if (!(o->inode >> (64-POOL_ID_BITS)))
|
||||||
{
|
{
|
||||||
|
@@ -189,7 +189,7 @@ public:
|
|||||||
uint64_t pool = cfg["pool"].uint64_value();
|
uint64_t pool = cfg["pool"].uint64_value();
|
||||||
if (pool)
|
if (pool)
|
||||||
{
|
{
|
||||||
inode = (inode & ((1l << (64-POOL_ID_BITS)) - 1)) | (pool << (64-POOL_ID_BITS));
|
inode = (inode & (((uint64_t)1 << (64-POOL_ID_BITS)) - 1)) | (pool << (64-POOL_ID_BITS));
|
||||||
}
|
}
|
||||||
if (!(inode >> (64-POOL_ID_BITS)))
|
if (!(inode >> (64-POOL_ID_BITS)))
|
||||||
{
|
{
|
||||||
|
@@ -189,7 +189,7 @@ void osd_t::report_statistics()
|
|||||||
for (auto kv: bs->get_inode_space_stats())
|
for (auto kv: bs->get_inode_space_stats())
|
||||||
{
|
{
|
||||||
pool_id_t pool_id = INODE_POOL(kv.first);
|
pool_id_t pool_id = INODE_POOL(kv.first);
|
||||||
uint64_t only_inode_num = (kv.first & ((1l << (64-POOL_ID_BITS)) - 1));
|
uint64_t only_inode_num = INODE_NO_POOL(kv.first);
|
||||||
if (!last_pool || pool_id != last_pool)
|
if (!last_pool || pool_id != last_pool)
|
||||||
{
|
{
|
||||||
if (last_pool)
|
if (last_pool)
|
||||||
@@ -207,7 +207,7 @@ void osd_t::report_statistics()
|
|||||||
for (auto kv: inode_stats)
|
for (auto kv: inode_stats)
|
||||||
{
|
{
|
||||||
pool_id_t pool_id = INODE_POOL(kv.first);
|
pool_id_t pool_id = INODE_POOL(kv.first);
|
||||||
uint64_t only_inode_num = (kv.first & ((1l << (64-POOL_ID_BITS)) - 1));
|
uint64_t only_inode_num = (kv.first & (((uint64_t)1 << (64-POOL_ID_BITS)) - 1));
|
||||||
if (!last_pool || pool_id != last_pool)
|
if (!last_pool || pool_id != last_pool)
|
||||||
{
|
{
|
||||||
if (last_pool)
|
if (last_pool)
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
#define POOL_ID_MAX 0x10000
|
#define POOL_ID_MAX 0x10000
|
||||||
#define POOL_ID_BITS 16
|
#define POOL_ID_BITS 16
|
||||||
#define INODE_POOL(inode) (pool_id_t)((inode) >> (64 - POOL_ID_BITS))
|
#define INODE_POOL(inode) (pool_id_t)((inode) >> (64 - POOL_ID_BITS))
|
||||||
#define INODE_NO_POOL(inode) (inode_t)(inode & ((1l << (64-POOL_ID_BITS)) - 1))
|
#define INODE_NO_POOL(inode) (inode_t)(inode & (((uint64_t)1 << (64-POOL_ID_BITS)) - 1))
|
||||||
#define INODE_WITH_POOL(pool_id, inode) (((inode_t)(pool_id) << (64-POOL_ID_BITS)) | INODE_NO_POOL(inode))
|
#define INODE_WITH_POOL(pool_id, inode) (((inode_t)(pool_id) << (64-POOL_ID_BITS)) | INODE_NO_POOL(inode))
|
||||||
|
|
||||||
// Pool ID is 16 bits long
|
// Pool ID is 16 bits long
|
||||||
|
@@ -437,7 +437,7 @@ void pg_t::calc_object_states(int log_level)
|
|||||||
st.walk();
|
st.walk();
|
||||||
if (this->state & (PG_DEGRADED|PG_LEFT_ON_DEAD))
|
if (this->state & (PG_DEGRADED|PG_LEFT_ON_DEAD))
|
||||||
{
|
{
|
||||||
assert(epoch != ((1ul << PG_EPOCH_BITS)-1));
|
assert(epoch != (((uint64_t)1 << PG_EPOCH_BITS)-1));
|
||||||
epoch++;
|
epoch++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -144,9 +144,9 @@ resume_3:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((op_data->fact_ver & (1ul<<(64-PG_EPOCH_BITS) - 1)) == (1ul<<(64-PG_EPOCH_BITS) - 1))
|
if ((op_data->fact_ver & ((uint64_t)1 << (64-PG_EPOCH_BITS) - 1)) == ((uint64_t)1 << (64-PG_EPOCH_BITS) - 1))
|
||||||
{
|
{
|
||||||
assert(pg.epoch != ((1ul << PG_EPOCH_BITS)-1));
|
assert(pg.epoch != (((uint64_t)1 << PG_EPOCH_BITS)-1));
|
||||||
pg.epoch++;
|
pg.epoch++;
|
||||||
}
|
}
|
||||||
op_data->target_ver = op_data->fact_ver + 1;
|
op_data->target_ver = op_data->fact_ver + 1;
|
||||||
|
@@ -262,7 +262,7 @@ static int vitastor_file_open(BlockDriverState *bs, QDict *options, int flags, E
|
|||||||
client->pool = qdict_get_try_int(options, "pool", 0);
|
client->pool = qdict_get_try_int(options, "pool", 0);
|
||||||
if (client->pool)
|
if (client->pool)
|
||||||
{
|
{
|
||||||
client->inode = (client->inode & ((1l << (64-POOL_ID_BITS)) - 1)) | (client->pool << (64-POOL_ID_BITS));
|
client->inode = (client->inode & (((uint64_t)1 << (64-POOL_ID_BITS)) - 1)) | (client->pool << (64-POOL_ID_BITS));
|
||||||
}
|
}
|
||||||
client->size = qdict_get_try_int(options, "size", 0);
|
client->size = qdict_get_try_int(options, "size", 0);
|
||||||
}
|
}
|
||||||
|
@@ -406,7 +406,7 @@ uint64_t crush(uint64_t key, int count, uint64_t *weights)
|
|||||||
seed = (key + 0xc6a4a7935bd1e995 + (seed << 6) + (seed >> 2));
|
seed = (key + 0xc6a4a7935bd1e995 + (seed << 6) + (seed >> 2));
|
||||||
seed ^= (j + 0xc6a4a7935bd1e995 + (seed << 6) + (seed >> 2));
|
seed ^= (j + 0xc6a4a7935bd1e995 + (seed << 6) + (seed >> 2));
|
||||||
seed = 2862933555777941757ull*seed + 3037000493ull; // LCPRNG
|
seed = 2862933555777941757ull*seed + 3037000493ull; // LCPRNG
|
||||||
seed = -log(((double)seed) / (1ul << 32) / (1ul << 32)) * weights[j];
|
seed = -log(((double)seed) / ((uint64_t)1 << 32) / ((uint64_t)1 << 32)) * weights[j];
|
||||||
if (seed > max)
|
if (seed > max)
|
||||||
{
|
{
|
||||||
max = seed;
|
max = seed;
|
||||||
@@ -439,8 +439,8 @@ void crush3(uint64_t key, int count, uint64_t *weights, uint64_t *r, uint64_t to
|
|||||||
seed ^= (k2 + 0xc6a4a7935bd1e995 + (seed << 6) + (seed >> 2));
|
seed ^= (k2 + 0xc6a4a7935bd1e995 + (seed << 6) + (seed >> 2));
|
||||||
seed ^= (k3 + 0xc6a4a7935bd1e995 + (seed << 6) + (seed >> 2));
|
seed ^= (k3 + 0xc6a4a7935bd1e995 + (seed << 6) + (seed >> 2));
|
||||||
seed = 2862933555777941757ull*seed + 3037000493ull; // LCPRNG
|
seed = 2862933555777941757ull*seed + 3037000493ull; // LCPRNG
|
||||||
//seed = ((double)seed) / (1ul << 32) / (1ul << 32) * (weights[k1] + weights[k2] + weights[k3]);
|
//seed = ((double)seed) / ((uint64_t)1 << 32) / ((uint64_t)1 << 32) * (weights[k1] + weights[k2] + weights[k3]);
|
||||||
seed = ((double)seed) / (1ul << 32) / (1ul << 32) * (1 -
|
seed = ((double)seed) / ((uint64_t)1 << 32) / ((uint64_t)1 << 32) * (1 -
|
||||||
(1 - 1.0*weights[k1]/total_weight)*
|
(1 - 1.0*weights[k1]/total_weight)*
|
||||||
(1 - 1.0*weights[k2]/total_weight)*
|
(1 - 1.0*weights[k2]/total_weight)*
|
||||||
(1 - 1.0*weights[k3]/total_weight)
|
(1 - 1.0*weights[k3]/total_weight)
|
||||||
|
@@ -6,7 +6,7 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
|||||||
|
|
||||||
Name: Vitastor
|
Name: Vitastor
|
||||||
Description: Vitastor client library
|
Description: Vitastor client library
|
||||||
Version: 0.6.16
|
Version: 0.6.17
|
||||||
Libs: -L${libdir} -lvitastor_client
|
Libs: -L${libdir} -lvitastor_client
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@ PG_COUNT=16
|
|||||||
|
|
||||||
. `dirname $0`/run_3osds.sh
|
. `dirname $0`/run_3osds.sh
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -end_fsync=1 \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -end_fsync=1 \
|
||||||
-rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10
|
-rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ if ! ($ETCDCTL get --prefix /vitastor/pg/state/ --print-value-only | jq -s -e '(
|
|||||||
format_error "FAILED: 16 PGS NOT UP"
|
format_error "FAILED: 16 PGS NOT UP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write \
|
||||||
-etcd=$ETCD_URL -pool=1 -inode=2 -size=128M -cluster_log_level=10
|
-etcd=$ETCD_URL -pool=1 -inode=2 -size=128M -cluster_log_level=10
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ ETCD_COUNT=5
|
|||||||
|
|
||||||
. `dirname $0`/run_3osds.sh
|
. `dirname $0`/run_3osds.sh
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=randwrite \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=randwrite \
|
||||||
-etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10
|
-etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ kill_etcds()
|
|||||||
|
|
||||||
kill_etcds &
|
kill_etcds &
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=1 -rw=randwrite \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=1 -rw=randwrite \
|
||||||
-etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10 -runtime=30
|
-etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10 -runtime=30
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
IMG_SIZE=960
|
IMG_SIZE=960
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=16 -fsync=16 -rw=write \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=16 -fsync=16 -rw=write \
|
||||||
-etcd=$ETCD_URL -pool=1 -inode=2 -size=${IMG_SIZE}M -cluster_log_level=10
|
-etcd=$ETCD_URL -pool=1 -inode=2 -size=${IMG_SIZE}M -cluster_log_level=10
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ if ! ($ETCDCTL get /vitastor/pg/state/1/1 --print-value-only | jq -s -e '(. | le
|
|||||||
format_error "Failed to start the PG active+degraded"
|
format_error "Failed to start the PG active+degraded"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write \
|
||||||
-etcd=$ETCD_URL -pool=1 -inode=2 -size=32M -cluster_log_level=10
|
-etcd=$ETCD_URL -pool=1 -inode=2 -size=32M -cluster_log_level=10
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
PG_COUNT=16
|
PG_COUNT=16
|
||||||
. `dirname $0`/run_3osds.sh
|
. `dirname $0`/run_3osds.sh
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 \
|
||||||
-end_fsync=1 -fsync=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10
|
-end_fsync=1 -fsync=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
$ETCDCTL put /vitastor/config/inode/1/2 '{"name":"testimg","size":'$((32*1024*1024))'}'
|
$ETCDCTL put /vitastor/config/inode/1/2 '{"name":"testimg","size":'$((32*1024*1024))'}'
|
||||||
|
|
||||||
LD_PRELOAD="libasan.so.5 build/src/libfio_vitastor.so" \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write \
|
||||||
-etcd=$ETCD_URL -pool=1 -inode=2 -size=32M -cluster_log_level=10
|
-etcd=$ETCD_URL -pool=1 -inode=2 -size=32M -cluster_log_level=10
|
||||||
|
|
||||||
@@ -14,11 +14,11 @@ $ETCDCTL put /vitastor/config/inode/1/2 '{"name":"testimg@0","size":'$((32*1024*
|
|||||||
$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))'}'
|
||||||
|
|
||||||
# Preload build/src/libfio_vitastor.so so libasan detects all symbols
|
# Preload build/src/libfio_vitastor.so so libasan detects all symbols
|
||||||
LD_PRELOAD="libasan.so.5 build/src/libfio_vitastor.so" \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=32 -buffer_pattern=0xdeadface \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=32 -buffer_pattern=0xdeadface \
|
||||||
-rw=randwrite -etcd=$ETCD_URL -image=testimg -number_ios=1024
|
-rw=randwrite -etcd=$ETCD_URL -image=testimg -number_ios=1024
|
||||||
|
|
||||||
LD_PRELOAD="libasan.so.5 build/src/libfio_vitastor.so" \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -rw=read -etcd=$ETCD_URL -pool=1 -inode=3 -size=32M
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -rw=read -etcd=$ETCD_URL -pool=1 -inode=3 -size=32M
|
||||||
|
|
||||||
qemu-img convert -S 4096 -p \
|
qemu-img convert -S 4096 -p \
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
OSD_COUNT=2
|
OSD_COUNT=2
|
||||||
PG_SIZE=2
|
PG_SIZE=2
|
||||||
|
PG_MINSIZE=1
|
||||||
SCHEME=replicated
|
SCHEME=replicated
|
||||||
|
|
||||||
. `dirname $0`/run_3osds.sh
|
. `dirname $0`/run_3osds.sh
|
||||||
@@ -13,7 +14,7 @@ sleep 2
|
|||||||
|
|
||||||
# Write
|
# Write
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=1 \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=1 \
|
||||||
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -runtime=10 -number_ios=100
|
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -runtime=10 -number_ios=100
|
||||||
|
|
||||||
|
@@ -7,20 +7,20 @@
|
|||||||
|
|
||||||
# Random writes without immediate_commit were stalling OSDs
|
# Random writes without immediate_commit were stalling OSDs
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=124k -direct=1 -numjobs=16 -iodepth=4 \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=68k -direct=1 -numjobs=16 -iodepth=4 \
|
||||||
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -runtime=10
|
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -runtime=10
|
||||||
|
|
||||||
# A lot of parallel syncs was crashing the primary OSD at some point
|
# A lot of parallel syncs was crashing the primary OSD at some point
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -numjobs=64 -iodepth=1 -fsync=1 \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -numjobs=64 -iodepth=1 -fsync=1 \
|
||||||
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -number_ios=100
|
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -number_ios=100
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -cluster_log_level=10
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=32 -buffer_pattern=0xdeadface \
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4k -direct=1 -iodepth=1 -fsync=32 -buffer_pattern=0xdeadface \
|
||||||
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -number_ios=1024
|
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -number_ios=1024
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ GLOBAL_CONF='{"immediate_commit":"all"}'
|
|||||||
|
|
||||||
# Test basic write
|
# Test basic write
|
||||||
|
|
||||||
LD_PRELOAD=libasan.so.5 \
|
LD_PRELOAD="build/src/libfio_vitastor.so" \
|
||||||
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=1G -cluster_log_level=10
|
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=1G -cluster_log_level=10
|
||||||
|
|
||||||
format_green OK
|
format_green OK
|
||||||
|
Reference in New Issue
Block a user