Motr deployment using motr_setup on singlenode VM - Seagate/cortx-motr GitHub Wiki
Pre requisites
- VM should have a enough data disks based on cluster configuration (data + parity + spare) and metadata disk for each io service.
for ex :
- for 1+0 (N+K), there should be a minimum 2 disks, 1 for data disk and 1 for metadata disk. Recommended to configure 6 disks (2 data disk for each io service, 1 metadata disk for each io service). For 4 + 2 +2, minimum 10 disks (8 for data and two for meta-data) are needed.
Install 3rd party components
curl -s http://cortx-storage.colo.seagate.com/releases/cortx/third-party-deps/rpm/install-cortx-prereq.sh | bash
Add yum repos for motr, hare, consul
yum-config-manager --add-repo=http://cortx-storage.colo.seagate.com/releases/cortx/github/integration-custom-ci/release/centos-7.8.2003/custom-build-510/cortx_iso/
yum-config-manager --add-repo=http://cortx-storage.colo.seagate.com/releases/cortx/github/integration-custom-ci/release/centos-7.8.2003/custom-build-510/3rd_party/
yum-config-manager --add-repo=http://cortx-storage.colo.seagate.com/releases/cortx/github/integration-custom-ci/release/centos-7.8.2003/custom-build-510/3rd_party/lustre/custom/tcp/
Install dependent rpm, cortx-motr and cortx-hare.
yum install -y cortx-motr cortx-hare cortx-py-utils --nogpgcheck
create a machine-id - Required only for VM, not on HW
rm -f /etc/machine-id /var/lib/dbus/machine-id
dbus-uuidgen --ensure=/etc/machine-id
dbus-uuidgen --ensure
systemctl status network
cat /etc/machine-id
Modify templates with the below changes.
post_install
- TMPL_MACHINE_ID - Machine ID, refer Create Machind ID for details
- TMPL_NAME - Name of the node, for ex : srvnode-1, srvnode-2, etc
- TMPL_DATADEVICE_00 - first Data device for group 0, default: /dev/sdc
- TMPL_DATADEVICE_01 - second Data device for group 0, default: /dev/sdd
- TMPL_METADATADEVICE_00 - first Metadata disk device for group 0, default:/dev/sdb
- TMPL_DATADEVICE_10 - first Data device for group 1, default:/dev/sdf
- TMPL_DATADEVICE_11- second Data device for group 1, default:/dev/sdg
- TMPL_METADATADEVICE_10 - first Metadata disk device for group 1, default:/dev/sde
- TMPL_CVG_NR_GROUP - Number of disk groups, default:2
- TMPL_CLUSTER_ID - Cluster ID, default:5c427765-ecf5-4387-bfa4-d6d53494b159
- TMPL_POOL_DATA - Pool configuration or cluster configuration for data units, default: 1
- TMPL_POOL_PARITY - Pool configuration or cluster configuration for parity units, default: 0
- TMPL_POOL_SPARE - Pool configuration or cluster configuration for spare units, default: 0
prepare
- TMPL_MACHINE_ID - Machine ID, refer Create Machind ID for details
- TMPL_DATADEVICE_00 - first Data device for group 0, default: /dev/sdc
- TMPL_DATADEVICE_01 - second Data device for group 0, default: /dev/sdd
- TMPL_METADATADEVICE_00 - first Metadata disk device for group 0, default:/dev/sdb
- TMPL_DATADEVICE_10 - first Data device for group 1, default:/dev/sdf
- TMPL_DATADEVICE_11- second Data device for group 1, default:/dev/sdg
- TMPL_METADATADEVICE_10 - first Metadata disk device for group 1, default:/dev/sde
- TMPL_CVG_NR_GROUP - Number of disk groups, default:2
- TMPL_IFACE_TYPE - Interface type(tcp, o2ib, etc), default:tcp
- TMPL_INTERFACE - private data interface, defaule:eth1
- TMPL_XPORT_TYPE - Transport type(lnet or libfabric), Default: lnet
- TMPL_CLUSTER_ID - Cluster ID
- TMPL_POOL_DATA - Pool config for data units, Default 1
- TMPL_POOL_PARITY - Pool config for parity units, Default 0
- TMPL_POOL_SPARE - Pool config for spare units, Default 0
config
- TMPL_MACHINE_ID - Machine ID, refer Create Machind ID for details
- TMPL_TYPE - Node type "HW or VM", Default: VM
test
- TMPL_MACHINE_ID - Machine ID, refer Create Machind ID for details
- TMPL_HOSTNAME - Hostname of the current node using hostname --fqdn
Motr Provisioner Steps
Run mini provisioner using template.
/opt/seagate/cortx/motr/bin/motr_setup post_install --config yaml:///opt/seagate/cortx/motr/conf/motr.post_install.tmpl
/opt/seagate/cortx/motr/bin/motr_setup prepare --config yaml:///opt/seagate/cortx/motr/conf/motr.prepare.tmpl
/opt/seagate/cortx/motr/bin/motr_setup config --config yaml:///opt/seagate/cortx/motr/conf/motr.config.tmpl
/opt/seagate/cortx/motr/bin/motr_setup test --config yaml:///opt/seagate/cortx/motr/conf/motr.test.tmpl
References
Recommended Default values that can be replaced in template
MACHINEID1=`cat /etc/machine-id`
CLUSTER_ID=5c427765-ecf5-4387-bfa4-d6d53494b159
HOSTNAME1=`hostname`
nr_grp="2"
data="1"
parity="0"
spare="0"
sed -i "s#TMPL_MACHINE_ID#$MACHINEID1#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_NAME#srvnode-1#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_DATADEVICE_00#/dev/sdc#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_DATADEVICE_01#/dev/sdd#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_METADATADEVICE_00#/dev/sdb#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_DATADEVICE_10#/dev/sdf#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_DATADEVICE_11#/dev/sdg#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_METADATADEVICE_10#/dev/sde#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_CVG_NR_GROUP#'$nr_grp'#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_CLUSTER_ID#$CLUSTER_ID#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_POOL_DATA#$data#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_POOL_PARITY#$parity#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_POOL_SPARE#$spare#" /opt/seagate/cortx/motr/conf/motr.post_install.tmpl
sed -i "s#TMPL_MACHINE_ID#$MACHINEID1#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_DATADEVICE_00#/dev/sdc#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_DATADEVICE_01#/dev/sdd#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_DATADEVICE_10#/dev/sdf#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_DATADEVICE_11#/dev/sdg#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_CVG_NR_GROUP#'$nr_grp'#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_IFACE_TYPE#tcp#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_INTERFACE#eth1#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_XPORT_TYPE#lnet#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_CLUSTER_ID#$CLUSTER_ID#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_POOL_DATA#'$data'#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_POOL_PARITY#'$parity'#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_POOL_SPARE#'$spare'#" /opt/seagate/cortx/motr/conf/motr.prepare.tmpl
sed -i "s#TMPL_MACHINE_ID#$MACHINEID1#" /opt/seagate/cortx/motr/conf/motr.config.tmpl
sed -i "s#TMPL_TYPE#VM#" /opt/seagate/cortx/motr/conf/motr.config.tmpl
sed -i "s#TMPL_MACHINE_ID#$MACHINEID1#" /opt/seagate/cortx/motr/conf/motr.test.tmpl
sed -i "s#TMPL_HOSTNAME#$HOSTNAME1#" /opt/seagate/cortx/motr/conf/motr.test.tmpl
create cdf file
UJJWAL: THIS STEP NEEDS TO BE AVOIDED. NOTE, THIS WILL NOT BE RUN BY CORTX PROVISIONER. THIS CAN BE DONE IN INIT INTERFACE.
- Create a cdf file, See reference section 1 for more details https://raw.githubusercontent.com/Seagate/cortx-motr/create_confstorekey/scripts/install/opt/seagate/cortx/motr/share/examples/singlenode.yaml and modify hostname - {HOSTNAME1} parameter.
- bootstrap cluster.
hctl bootstrap --mkfs /root/singlenode.yaml
Test the system
Run m0crate test
Test IO Testing:
dd if=/dev/urandom of=/tmp/128M bs=1M count=128
/opt/seagate/cortx/hare/libexec/m0crate-io-conf > /tmp/m0crate-io.yaml
m0crate -S /tmp/m0crate-io.yaml