Code Monkey home page Code Monkey logo

poseidonos's Introduction

Poseidon OS

PoseidonOS (POS) is a lightweight storage OS that offers the best performance and valuable features over a storage network. POS exploits the benefit of NVMe Solid State Drives (SSDs) by optimizing the storage stack and leveraging the state-of-the-art high-speed interface. Please find project details on the documentation page.

Table of Contents

Download the Source Code

git clone https://github.com/poseidonos/poseidonos.git

Install Prerequisites

pkgdep.sh will automatically install the required packages to build POS.

cd script
sudo ./pkgdep.sh

Build POS

1. Build Library

cd lib
sudo ./build_lib.sh

2. Build Source Code

cd script/
sudo ./build_ibofos.sh

2.1. Install POS

Execute $make install as follows.

sudo make install

This will install POS to your system, including registering POS and CLI binaries to your environment variables, creating related files (e.g., configuration, telemetry, event, ...), and generating man pages for CLI.

If you have done this step earlier, you can omit this step.

Run POS

cd script/
sudo ./start_poseidonos.sh

Learn POS with Command Line Interface

Let's explore the features and the capabilities of POS. Using the POS command-line interface, you will learn to manage storage resources (e.g., devices, arrays, and volumes). The prerequisite knowledge is the minimum skill in Linux administration.

Important Note: we also provide PoseidonOS-GUI, a web-based graphical user interface (GUI).

Environments

In this example, the following hardware and configurations are used:

Hardware: Poseidon server
 - Reference server hardware implementation engineered by Samsung and Inspur
 - The number of processors: 2
 - The number of memory slots: 32
 - Memory speed: 3200 MT/s
 - Network speed: up to 600 GbE
 - PCIe generation: gen4
 - Storage: E1.S SSD * 32 ea
Config Value
OS Ubuntu 18.04
(Note: PoseidonOS is not officially supported in the later versions of Ubuntu.)
Kernel 5.3.0-24-generic
Hostname R2U14-PSD-3
$POS_HOME /poseidonos
POS location $POS_HOME/bin/poseidonos
$POS_HOME/bin/poseidonos-cli
POS config /etc/pos/pos.conf
POS scripts $POS_HOME/script/start_poseidonos.sh
$POS_HOME/lib/spdk-20.10/script/rpc.py
$POS_HOME/test/script/set_irq_affinity_cpulist.sh
$POS_HOME/test/script/common_irq_affinity.sh
$POS_HOME/script/setup_env.sh
$POS_HOME/lib/spdk-20.10/scripts/setup.sh
$POS_HOME/lib/spdk-20.10/scripts/common.sh
POS log /var/log/pos/pos.log
POS dump /etc/pos/core/poseidonos.core
SPDK RPC Server UDS /var/tmp/spdk.sock
Hugepage information /tmp/uram_hugepage

Step 1. Start POS application

Using the following commands (with the root permission), check out the NVMe devices attached to the OS. They are currently using the kernel device driver.

ibof@R2U14-PSD-3:~$ su -
Password:
root@R2U14-PSD-3:~# cd /poseidonos
root@R2U14-PSD-3:/poseidonos# fdisk -l | grep nvme
Disk /dev/nvme0n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme1n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme2n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme5n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme6n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme12n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme15n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme9n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme10n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme17n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme18n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme16n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme22n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme26n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme23n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme25n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme20n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme19n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme8n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme3n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme7n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme4n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme28n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme29n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme11n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme13n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme31n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme14n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme24n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme21n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme27n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk /dev/nvme30n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors

Start POS using the following command. The NVMe devices will be detached from the Linux kernel and attached to SPDK (a user-level device driver).

root@R2U14-PSD-3:/poseidonos# cd script/
root@R2U14-PSD-3:/poseidonos/script# ls -al
root@R2U14-PSD-3:/poseidonos/script# ./start_poseidonos.sh
0000:4e:00.0 (144d a80a): uio_pci_generic -> nvme
0000:ce:00.0 (144d a80a): uio_pci_generic -> nvme
0000:ea:00.0 (144d a80a): uio_pci_generic -> nvme
0000:68:00.0 (144d a80a): uio_pci_generic -> nvme
0000:4d:00.0 (144d a80a): uio_pci_generic -> nvme
0000:50:00.0 (144d a80a): uio_pci_generic -> nvme
0000:4f:00.0 (144d a80a): uio_pci_generic -> nvme
0000:6d:00.0 (144d a80a): uio_pci_generic -> nvme
0000:cd:00.0 (144d a80a): uio_pci_generic -> nvme
0000:6e:00.0 (144d a80a): uio_pci_generic -> nvme
0000:6c:00.0 (144d a80a): uio_pci_generic -> nvme
0000:80:01.3 (8086 0b00): uio_pci_generic -> ioatdma
0000:80:01.2 (8086 0b00): uio_pci_generic -> ioatdma
0000:d1:00.0 (144d a80a): uio_pci_generic -> nvme
0000:80:01.1 (8086 0b00): uio_pci_generic -> ioatdma
0000:d0:00.0 (144d a80a): uio_pci_generic -> nvme
0000:80:01.0 (8086 0b00): uio_pci_generic -> ioatdma
0000:80:01.7 (8086 0b00): uio_pci_generic -> ioatdma
0000:80:01.6 (8086 0b00): uio_pci_generic -> ioatdma
0000:80:01.5 (8086 0b00): uio_pci_generic -> ioatdma
0000:ec:00.0 (144d a80a): uio_pci_generic -> nvme
0000:80:01.4 (8086 0b00): uio_pci_generic -> ioatdma
0000:cc:00.0 (144d a80a): uio_pci_generic -> nvme
0000:6b:00.0 (144d a80a): uio_pci_generic -> nvme
0000:cf:00.0 (144d a80a): uio_pci_generic -> nvme
0000:e9:00.0 (144d a80a): uio_pci_generic -> nvme
0000:67:00.0 (144d a80a): uio_pci_generic -> nvme
0000:d2:00.0 (144d a80a): uio_pci_generic -> nvme
0000:eb:00.0 (144d a80a): uio_pci_generic -> nvme
0000:d3:00.0 (144d a80a): uio_pci_generic -> nvme
0000:51:00.0 (144d a80a): uio_pci_generic -> nvme
0000:69:00.0 (144d a80a): uio_pci_generic -> nvme
0000:e5:00.0 (144d a80a): uio_pci_generic -> nvme
0000:53:00.0 (144d a80a): uio_pci_generic -> nvme
0000:00:01.3 (8086 0b00): uio_pci_generic -> ioatdma
0000:00:01.2 (8086 0b00): uio_pci_generic -> ioatdma
0000:e6:00.0 (144d a80a): uio_pci_generic -> nvme
0000:00:01.1 (8086 0b00): uio_pci_generic -> ioatdma
0000:e7:00.0 (144d a80a): uio_pci_generic -> nvme
0000:00:01.0 (8086 0b00): uio_pci_generic -> ioatdma
0000:00:01.7 (8086 0b00): uio_pci_generic -> ioatdma
0000:00:01.6 (8086 0b00): uio_pci_generic -> ioatdma
0000:00:01.5 (8086 0b00): uio_pci_generic -> ioatdma
0000:00:01.4 (8086 0b00): uio_pci_generic -> ioatdma
0000:54:00.0 (144d a80a): uio_pci_generic -> nvme
0000:52:00.0 (144d a80a): uio_pci_generic -> nvme
0000:e8:00.0 (144d a80a): uio_pci_generic -> nvme
0000:6a:00.0 (144d a80a): uio_pci_generic -> nvme
Setting maximum # of Huge Page Size is 128GB
0000:4e:00.0 (144d a80a): no driver -> uio_pci_generic
0000:ce:00.0 (144d a80a): no driver -> uio_pci_generic
0000:ea:00.0 (144d a80a): no driver -> uio_pci_generic
0000:68:00.0 (144d a80a): no driver -> uio_pci_generic
0000:4d:00.0 (144d a80a): no driver -> uio_pci_generic
0000:50:00.0 (144d a80a): no driver -> uio_pci_generic
0000:4f:00.0 (144d a80a): no driver -> uio_pci_generic
0000:6d:00.0 (144d a80a): no driver -> uio_pci_generic
0000:cd:00.0 (144d a80a): no driver -> uio_pci_generic
0000:80:01.3 (8086 0b00): ioatdma -> uio_pci_generic
0000:6e:00.0 (144d a80a): no driver -> uio_pci_generic
0000:6c:00.0 (144d a80a): no driver -> uio_pci_generic
0000:80:01.2 (8086 0b00): ioatdma -> uio_pci_generic
0000:80:01.1 (8086 0b00): ioatdma -> uio_pci_generic
0000:d1:00.0 (144d a80a): no driver -> uio_pci_generic
0000:80:01.0 (8086 0b00): ioatdma -> uio_pci_generic
0000:d0:00.0 (144d a80a): no driver -> uio_pci_generic
0000:80:01.7 (8086 0b00): ioatdma -> uio_pci_generic
0000:80:01.6 (8086 0b00): ioatdma -> uio_pci_generic
0000:80:01.5 (8086 0b00): ioatdma -> uio_pci_generic
0000:80:01.4 (8086 0b00): ioatdma -> uio_pci_generic
0000:ec:00.0 (144d a80a): no driver -> uio_pci_generic
0000:cc:00.0 (144d a80a): no driver -> uio_pci_generic
0000:6b:00.0 (144d a80a): no driver -> uio_pci_generic
0000:cf:00.0 (144d a80a): no driver -> uio_pci_generic
0000:e9:00.0 (144d a80a): no driver -> uio_pci_generic
0000:67:00.0 (144d a80a): no driver -> uio_pci_generic
0000:d2:00.0 (144d a80a): no driver -> uio_pci_generic
0000:eb:00.0 (144d a80a): no driver -> uio_pci_generic
0000:d3:00.0 (144d a80a): no driver -> uio_pci_generic
0000:51:00.0 (144d a80a): no driver -> uio_pci_generic
0000:69:00.0 (144d a80a): no driver -> uio_pci_generic
0000:00:01.3 (8086 0b00): ioatdma -> uio_pci_generic
0000:e5:00.0 (144d a80a): no driver -> uio_pci_generic
0000:53:00.0 (144d a80a): no driver -> uio_pci_generic
0000:00:01.2 (8086 0b00): ioatdma -> uio_pci_generic
0000:00:01.1 (8086 0b00): ioatdma -> uio_pci_generic
0000:e6:00.0 (144d a80a): no driver -> uio_pci_generic
0000:00:01.0 (8086 0b00): ioatdma -> uio_pci_generic
0000:e7:00.0 (144d a80a): no driver -> uio_pci_generic
0000:00:01.7 (8086 0b00): ioatdma -> uio_pci_generic
0000:00:01.6 (8086 0b00): ioatdma -> uio_pci_generic
0000:00:01.5 (8086 0b00): ioatdma -> uio_pci_generic
0000:00:01.4 (8086 0b00): ioatdma -> uio_pci_generic
0000:54:00.0 (144d a80a): no driver -> uio_pci_generic
0000:52:00.0 (144d a80a): no driver -> uio_pci_generic
0000:e8:00.0 (144d a80a): no driver -> uio_pci_generic
0000:6a:00.0 (144d a80a): no driver -> uio_pci_generic
/root/doc_center/ibofos/script
apport.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable apport
Current maximum # of memory map areas per process is 65535.
Setup env. done!
Execute poseidonos
Wait poseidonos
Wait poseidonos
Wait poseidonos
poseidonos is running in background...
root@R2U14-PSD-3:/poseidonos/script#
# Verify if the application is up and running
root@R2U14-PSD-3:/poseidonos/script# ps -ef | grep poseidonos | grep -v grep
root     90998     1 99 20:09 pts/7    01:15:34 /root/doc_center/ibofos/script/..//bin/poseidonos

# Unlike in the the previous execution, you shouldn't see the NVMe devices from the fdisk output since all of them must have been reattached from OS to SPDK.
root@R2U14-PSD-3:/poseidonos/script# fdisk -l | grep nvme

Step 2. Create Write Buffer within DRAM

Using the device create command, create a write buffer in DRAM. A POS array will use it.

The following command will create uram0, a write buffer with a total size of 4096MB and a block size of 512B. The command will request an SPDK server to create an SPDK block device called malloc bdev, a userspace ramdisk.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli device create --device-name uram0 --device-type uram --num-blocks 8388608 --block-size 512
  • Note 1: the recommended size of a write buffer is different by environment.
  • Note 2: The size of a write buffer should be carefully chosen. For example, if the size of a write buffer is greater than 4096MB, it may not be possible to perform journaling-based sudden power-off recovery (SPOR).

Step 3. Check POS version

You can check the version of POS using the system info command.

# The actual output may differ by env where the command is executed.
root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli system info
pos-0.9.10

Step 4. Scan NVMe Devices

Let's check the list of the devices in the system. Because you haven't scanned the device in the system yet, you won't be able to see any device in the output.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli device list
Name           |SerialNumber(SN)    |Address        |Class         |MN                         |NUMA   |Size
-------------- |------------------- |-------------- |------------- |-------------------------- |------ |------------------

Let's scan devices using the device scan command.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli device scan

Now you can see the list of NVMe and uram devices in the system.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli device list --unit
Name           |SerialNumber(SN)     |Address        |Class         |MN                                       |NUMA    |Size
-------------- |-------------------  |-------------- |------------- |--------------------------               |------  |------------------
unvme-ns-0     |A000032M045220       |0000:4d:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-1     |A000032M045032       |0000:4e:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-2     |A000032M045090       |0000:4f:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-3     |A000032M045096       |0000:50:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-4     |A000032M045107       |0000:51:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-5     |A000032M045078       |0000:52:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-6     |A000032M045077       |0000:53:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-7     |A000032M045099       |0000:54:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-8     |A000032M045084       |0000:67:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-9     |A000032M045105       |0000:68:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-10    |A000032M045100       |0000:69:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-11    |A000032M045104       |0000:6a:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-12    |A000032M045050       |0000:6b:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-13    |A000032M045054       |0000:6c:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-14    |A000032M045087       |0000:6d:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-15    |A000032M045088       |0000:6e:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |0       |3.5T
unvme-ns-16    |A000032M045038       |0000:cc:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-17    |A000032M045086       |0000:cd:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-18    |A000032M045048       |0000:ce:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-19    |A000032M045049       |0000:cf:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-20    |A000032M045039       |0000:d0:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-21    |A000032M045034       |0000:d1:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-22    |A000032M045042       |0000:d2:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-23    |A000032M045085       |0000:d3:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-24    |A000032M045041       |0000:e5:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-25    |A000032M045051       |0000:e6:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-26    |A000032M045040       |0000:e7:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-27    |A000032M045071       |0000:e8:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-28    |A000032M045055       |0000:e9:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-29    |A000032M045083       |0000:ea:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-30    |A000032M045098       |0000:eb:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
unvme-ns-31    |A000032M045053       |0000:ec:00.0   |SYSTEM        |SAMSUNG NVMe SSD PM9A3                   |1       |3.5T
uram0          |uram0                |               |SYSTEM        |uram0                                    |UNKNOWN |8G

Step 5. Create POS Array

We will explore creating a POS array, a storage pool in POS.

Create a POS array using the array create command. The array create command requires the following parameters:

  • The name of a device to be used as the write buffer (--buffer).
  • The comma-separated list of the data (--data-devs) and spare (--spare) devices. Only SSD devices must be used.
  • The name of POS array must follow the naming convention rule. It is described in Device and Array in detail.
  • The RAID type for the POS array (--raid).
root@R2U14-PSD-3:/poseidonos/bin#./poseidonos-cli array create --array-name POSArray --buffer uram0 --data-devs unvme-ns-0,unvme-ns-1,unvme-ns-2,unvme-ns-3,unvme-ns-4,unvme-ns-5,unvme-ns-6,unvme-ns-7,unvme-ns-8,unvme-ns-9,unvme-ns-10,unvme-ns-11,unvme-ns-12,unvme-ns-13,unvme-ns-14,unvme-ns-15,unvme-ns-16,unvme-ns-17,unvme-ns-18,unvme-ns-19,unvme-ns-20,unvme-ns-21,unvme-ns-22,unvme-ns-23,unvme-ns-24,unvme-ns-25,unvme-ns-26,unvme-ns-27,unvme-ns-28 --spare unvme-ns-29,unvme-ns-30,unvme-ns-31 --raid RAID5

Once a POS array has been created, you can list the POS array using the array list command as follows.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli array list
Index |Name       |DatetimeCreated           |DatetimeUpdated           |Status
----- |---------- |---------------------     |---------------------     |----------
0     |POSArray   |2021-09-10 16:25:04 +0900 |2021-09-10 16:25:04 +0900 |Unmounted

If you want to see more detailed information about the array, specify the array to the command as follows:

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli array list --array-name POSArray --unit
Array : POSArray
------------------------------------
Index               : 0
State               : OFFLINE
Situation           : DEFAULT
Rebuilding Progress : 0
Total               : 86.2T
Used                : 0B
GCMode              :

Devices
Name        Type
----        ------
uram0       BUFFER
unvme-ns-0  DATA
unvme-ns-1  DATA
unvme-ns-2  DATA
unvme-ns-3  DATA
unvme-ns-4  DATA
unvme-ns-5  DATA
unvme-ns-6  DATA
unvme-ns-7  DATA
unvme-ns-8  DATA
unvme-ns-9  DATA
unvme-ns-10 DATA
unvme-ns-11 DATA
unvme-ns-12 DATA
unvme-ns-13 DATA
unvme-ns-14 DATA
unvme-ns-15 DATA
unvme-ns-16 DATA
unvme-ns-17 DATA
unvme-ns-18 DATA
unvme-ns-19 DATA
unvme-ns-20 DATA
unvme-ns-21 DATA
unvme-ns-22 DATA
unvme-ns-23 DATA
unvme-ns-24 DATA
unvme-ns-25 DATA
unvme-ns-26 DATA
unvme-ns-27 DATA
unvme-ns-28 DATA
unvme-ns-29 SPARE
unvme-ns-30 SPARE
unvme-ns-31 SPARE

Step 6. Mount POS Array

You can create a POS volume from the POS array created in the previous step. However, you need to mount the array first. Let's check out the status of the POS array.

The array list command will display the status of POS arrays. You can see POSArray is being Unmounted.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli array list
Index |Name       |DatetimeCreated           |DatetimeUpdated           |Status
----- |---------- |---------------------     |---------------------     |----------
0     |POSArray   |2021-09-10 16:25:04 +0900 |2021-09-10 16:25:04 +0900 |Unmounted

Mount POSArray using the array mount command. It may take some time.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli array mount --array-name POSArray

Check out the status of POSArray has changed to Mounted.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli array list
Index |Name       |DatetimeCreated           |DatetimeUpdated           |Status
----- |---------- |---------------------     |---------------------     |----------
0     |POSArray   |2021-09-10 16:25:04 +0900 |2021-09-10 16:33:34 +0900 |Mounted

Let's execute the array list command with POSArray. Once POSArray is mounted, you can see that its state has changed from OFFLINE to NORMAL, which indicates that the array is ready to create POS volumes.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli array list --array-name POSArray --unit
Array : POSArray
------------------------------------
Index               : 0
State               : NORMAL
Situation           : NORMAL
Rebuilding Progress : 0
Total               : 86.2T
Used                : 0B
GCMode              : none

Devices
Name        Type
----        ------
uram0       BUFFER
unvme-ns-0  DATA
unvme-ns-1  DATA
unvme-ns-2  DATA
unvme-ns-3  DATA
unvme-ns-4  DATA
unvme-ns-5  DATA
unvme-ns-6  DATA
unvme-ns-7  DATA
unvme-ns-8  DATA
unvme-ns-9  DATA
unvme-ns-10 DATA
unvme-ns-11 DATA
unvme-ns-12 DATA
unvme-ns-13 DATA
unvme-ns-14 DATA
unvme-ns-15 DATA
unvme-ns-16 DATA
unvme-ns-17 DATA
unvme-ns-18 DATA
unvme-ns-19 DATA
unvme-ns-20 DATA
unvme-ns-21 DATA
unvme-ns-22 DATA
unvme-ns-23 DATA
unvme-ns-24 DATA
unvme-ns-25 DATA
unvme-ns-26 DATA
unvme-ns-27 DATA
unvme-ns-28 DATA
unvme-ns-29 SPARE
unvme-ns-30 SPARE
unvme-ns-31 SPARE

Step 7. Configure NVM Subsystems for NVMe Over Fabric Target

Now POSArray is ready to create a POS volume. Before creating a POS volume, we will create and configure an NVM subsystem first. The NVM subsystem will allow us to expose the POS volume to initiators over the network.

Create NVMe-oF Subsystem

Create an NVMe-oF subsystem using the subsystem create command.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli subsystem create --subnqn nqn.2019-04.ibof:subsystem1 --serial-number IBOF00000000000001 --model-number IBOF_VOLUME_EXTENSION --max-namespaces 256 -o

Create NVMe-oF Transport

Create an NVMf transport using the subsystem create-transport command.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli subsystem create-transport --trtype tcp -c 64 --num-shared-buf 4096

Add NVMe-oF Subsystem Listener

The subsystem add-listener command binds an NVM subsystem to a socket address. This allows the NVM subsystem to listen on a TCP port to serve incoming NVMe-oF requests.

Check the available network interfaces using ifconfig.

root@R2U14-PSD-3:/poseidonos/bin# ifconfig
ens21f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.1.2.14  netmask 255.255.0.0  broadcast 10.1.255.255
        inet6 fe80::a236:9fff:fe78:dee4  prefixlen 64  scopeid 0x20<link>
        ether a0:36:9f:78:de:e4  txqueuelen 1000  (Ethernet)
        RX packets 10922807  bytes 4337740510 (4.3 GB)
        RX errors 0  dropped 748811  overruns 0  frame 0
        TX packets 830274  bytes 71577491 (71.5 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 235840  bytes 16797914 (16.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 235840  bytes 16797914 (16.7 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Execute the add-listener command with the IP address and the port number of one of the available NICs (e.g., ens21f0).

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli subsystem add-listener -q nqn.2019-04.ibof:subsystem1 -t tcp -i 10.1.2.14 -p 1158

In the above example, the NVM subsystem "nqn.2019-04.ibof:subsystem1" has been configured to listen on socket address "10.1.2.14:1158" using TCP. If you omit this step, POS wouldn't be able to mount POS volumes.

Retrieve NVM subsystem information

At this point, you should be able to retrieve the configured NVM subsystem as in the following:

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli subsystem list
Name                                  |Subtype     |AddressCount |SerialNumber(SN)      |ModelNumber(MN)       |NamespaceCount
------------------------------------- |----------- |------------ |--------------------- |--------------------- |--------------
nqn.2014-08.org.nvmexpress.discovery  |Discovery   |0            |                      |                      |0
nqn.2019-04.ibof:subsystem1           |NVMe        |1            |IBOF00000000000001    |IBOF_VOLUME_EXTENSION |0

Step 8. Create POS Volume

In this step, we will create a POS volume, a logical entry point from the target side IO, which will be shown as a namespace in an NVM subsystem. A POS volume is wrapped as a bdev and can be attached to an NVM subsystem. bdev is a block device abstraction offered by the SPDK library.

Create a volume

Let's create a 50TB volume using the following command:

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli volume create --volume-name vol1 --array-name POSArray --size 50TB --maxiops 0 --maxbw 0

Check the volume information using the volume list command.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli volume list --array-name POSArray --unit
Name      |ID    |TotalCapacity                |RemainingCapacity            |Remaining% |Status     |MaximumIOPS      |MaximumBandwith
--------- |----- |---------------------------- |---------------------------- |---------  |---------- |---------------- |----------------
vol1      |0     |50T                          |0B                           |0          |Unmounted  |0                |0
  • Note 1: the initial status of a POS volume newly created is set to Unmounted.
  • Note 2: you can see the remaining capacity is 0B. This is because the volume is unmounted.

Step 9. Mount POS Volume

We need to mount a POS volume to perform IO operations on it. After mounted, the POS volume will be attached to an NVM subsystem as a block device (bdev). Also, it will be seen as an NVM namespace.

Mount the volume using the volume mount command.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli volume mount --volume-name vol1 --array-name POSArray

Check if the status and the remaning capacity of the volume have changed to "Mounted" and 50 TB, respectively.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli volume list --array-name POSArray --unit
Name      |ID    |TotalCapacity                |RemainingCapacity            |Remaining% |Status     |MaximumIOPS      |MaximumBandwith
--------- |----- |---------------------------- |---------------------------- |---------  |---------- |---------------- |----------------
vol1      |0     |50T                          |50T                          |100        |Mounted    |0                |0
  • Note: the RemainingCapacity of a newly created volume is set to the TotalCapacity when the volume is mounted for the first time. Once every block of the volume is touched/written, the RemainingCapacity would remain at 0 until the volume gets deleted. The RemainingCapacity captures the internal state of block mappings and should not be interpreted as user's file system free space.

Retrieve NVM subsystem information

Using the subsystem list command, you can see the NVM namespace has been added to the NVM subsystem with its bdev_name.

Check if the NVM namespace information contains "bdev_0_POSArray" using the subsystem list command.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli subsystem list --subnqn nqn.2019-04.ibof:subsystem1
nqn              : nqn.2019-04.ibof:subsystem1
subtype          : NVMe
listen_addresses :
                   {
                     trtype : TCP
                     adrfam : IPv4
                     traddr : 10.1.2.14
                     trsvcid : 1158
                   }
allow_any_host   : true
hosts            :
serial_number    : IBOF00000000000001
model_number     : IBOF_VOLUME_EXTENSION
max_namespaces   : 256
namespaces       :
                   {
                     nsid : 1
                     bdev_name : bdev_0_POSArray
                     uuid : ddbacc0d-aec2-47e3-8654-4aa560fd549c
                   }

Once mounted, the connection is established between an initiator and an NVM subsystem. Then, POS volume becomes accessible over network by an initiator.

Step 10. Unmount POS Volume

Unmount the volume.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli volume unmount --volume-name vol1 --array-name POSArray
WARNING: After unmounting volume vol1 in array POSArray, the progressing I/Os may fail if any.

Are you sure you want to unmount volume vol1? (y/n):y

Check if the volume status is now "Unmounted".

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli volume list --array-name POSArray --unit
Name      |ID    |TotalCapacity                |RemainingCapacity            |Remaining% |Status     |MaximumIOPS      |MaximumBandwith
--------- |----- |---------------------------- |---------------------------- |---------  |---------- |---------------- |----------------
vol1      |0     |50T                          |0B                           |0          |Unmounted  |0                |0

Step 11. Delete POS Volume

Delete the volume.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli volume delete --volume-name vol1 --array-name POSArray
WARNING: After deleting volume vol1, you cannot recover the data of volume vol1 in the array POSArray

Are you sure you want to delete volume vol1? (y/n):y

Make sure that the volume list command does not display "vol1".

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli volume list --array-name POSArray --unit
Name      |ID    |TotalCapacity                |RemainingCapacity            |Remaining% |Status     |MaximumIOPS      |MaximumBandwith
--------- |----- |---------------------------- |---------------------------- |---------  |---------- |---------------- |----------------

POS volume can be deleted only when it is in the Unmounted state.

Step 12. Unmount POS Array

Unmount the array.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli array unmount --array-name POSArray
WARNING: After unmounting array POSArray, all the volumes in the array will be unmounted.
In addition, progressing I/Os may fail if any.

Are you sure you want to unmount array POSArray? (y/n):y

Make sure that the status of POSArray is now "Unmounted".

Index |Name       |DatetimeCreated           |DatetimeUpdated           |Status
----- |---------- |---------------------     |---------------------     |----------
0     |POSArray   |2021-09-10 16:25:04 +0900 |2021-09-10 16:33:34 +0900 |Unmounted

Step 13. Delete POS Array

Delete the array. It make take a few minutes to fininsh. In this demonstration, it took 6 minutes.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli array delete --array-name POSArray
WARNING: After deleting array POSArray, you cannot recover the data of the volumes in the array.

Are you sure you want to delete array POSArray? (y/n):y

Make sure that the array list command does not display POSArray.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli array list
Index |Name       |DatetimeCreated       |DatetimeUpdated       |Status
----- |---------- |--------------------- |--------------------- |----------

POS array can be deleted only when it is in the OFFLINE state.

Step 14. Stop POS

Shutdown pos using the system stop commnad. The shutdown process may take a few minutes.

root@R2U14-PSD-3:/poseidonos/bin# ./poseidonos-cli system stop
WARNING: Stopping POS will affect the progressing I/Os.

Are you sure you want to stop POS? (y/n):y

Check if the process of POS has been terminated using the command below.

root@R2U14-PSD-3:/poseidonos/bin# ps -ef | grep poseidon | grep -v grep

Now you have learned the basic of POS. If you want to get deeper into POS, check out the documents: link

poseidonos's People

Contributors

aswinssir avatar cheolho-kang avatar cleanior avatar dhihm avatar dydwls-lee avatar hsung-yang avatar huijeong-kim avatar isaac-baek avatar jeddy-choi avatar jg121-lim avatar junghyun-34 avatar madcatlove avatar minjoon-ahn avatar mjlee34 avatar mmm5027 avatar mmschoi avatar munseoplim avatar next0262 avatar parkvibes avatar queoh avatar ray5273 avatar ringopow avatar sejun000 avatar seochokid avatar so931 avatar sungtankim avatar syeonshin avatar vishal-shakya-ssir avatar wonchul08lee avatar yyu-nim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poseidonos's Issues

Build failure with tag, v0.9.10, others might be the same. [Troubleshooting included]

Thanks to Thomas Edward Rainey III for the testing and resolution. :)

Please use this workaround until we fix them all.

Required updates:

There is a missing file in the source tree, so once you clone the repo, switch to the appropriate tag, and download this file into the lib directory: https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz

Consolidated Steps:

Beginning of journal

Based of information provided by Heesoo, we will try again with the updated documentation.

ssgroot@test44:~/POS/poseidonos$ git fetch -pP --tags
ssgroot@test44:~/POS/poseidonos$ git tag
v0.9.0
v0.9.1
v0.9.10
v0.9.2
v0.9.3
v0.9.4
v0.9.5
v0.9.6
v0.9.7
v0.9.8
v0.9.9
ssgroot@test44:~/POS/poseidonos$ git checkout v0.9.10
Updating files: 100% (20537/20537), done.
Note: switching to 'v0.9.10'.
cd script
sudo ./pkgdep.sh

Build PoseidonOS

Let's build PoseidonOS now. Note: Output log below split for brevity.

ssgroot@test44:~/POS/poseidonos/script$ sudo ./build_ibofos.sh
 
clean FIO
 
FIO_VERSION = fio-3.1
/home/ssgroot/POS/poseidonos/lib
 
clean FIO.. done
 
 
clean SPDK
 
/home/ssgroot/POS/poseidonos/lib/spdk-20.10/mk/spdk.common.mk:37: *** mk/config.mk: file not found. Please run configure before make.  Stop.
rm: cannot remove 'mk/config.mk': No such file or directory
/home/ssgroot/POS/poseidonos/lib
 
clean SPDK.. done
 
 
clean DPDK
 
/home/ssgroot/POS/poseidonos/lib
 
clean DPDK.. done
 
 
clean AIR
 
rm -rf /home/ssgroot/POS/poseidonos/lib/air/bin
rm -rf /home/ssgroot/POS/poseidonos/lib/air/lib
rm -rf /home/ssgroot/POS/poseidonos/lib/air/include
rm -rf /home/ssgroot/POS/poseidonos/lib/air/src/api/Air_c.h
rm -rf /home/ssgroot/POS/poseidonos/lib/air/src/api/Air_c.cpp
rm -rf /bin/air_cli
rm -rf /bin/air_tui
/home/ssgroot/POS/poseidonos/lib
 
clean AIR.. done
 
 
clean SPDLOG
 
/home/ssgroot/POS/poseidonos/lib
 
clean SPDLOG.. done
 
...
 
extract GO
 
tar: go1.14.4.linux-amd64.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
 
...
 
 
Compiling [flow_control.cpp]...
Compiling [segment_info.cpp]...
Compiling [wbstripe_ctx.cpp]...
Compiling [io_submit_handler_test.cpp]...
Compiling [mapper_stub.cpp]...
Compiling [rba_state_manager_test.cpp]...
Compiling [stripe_put_event.cpp]...
rba_state_manager_test.cpp:35:10: fatal error: gtest/gtest.h: No such file or directory
   35 | #include "gtest/gtest.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [/home/ssgroot/POS/poseidonos/Makefile.rules:26: rba_state_manager_test.o] Error 1
make[1]: *** [Makefile:80: io/general_io] Error 2
make[1]: *** Waiting for unfinished jobs....
Compiling [array_device.cpp]...
Compiling [array_interface.cpp]...
Compiling [block_map_update.cpp]...
Compiling [wbstripe_manager.cpp]...
Compiling [gc_stripe_manager.cpp]...
Compiling [stripe.cpp]...
Compiling [read_completion.cpp]...
Compiling [array_device_list.cpp]...
Compiling [linear_distributer.cpp]...
Compiling [gc_map_update_request.cpp]...
Compiling [array_name_policy.cpp]...
Compiling [token_distributer.cpp]...
Compiling [array_stub.cpp]...
Compiling [unvmf_io_handler.cpp]...
Compiling [gc_flush_submission.cpp]...
Compiling [i_array_device_manager.cpp]...
Compiling [array_device_manager_stub.cpp]...
Compiling [read_completion_factory.cpp]...
Compiling [copier.cpp]...
Compiling [reverse_map_load_completion.cpp]...
Compiling [gc_map_update.cpp]...
Compiling [stripe_copier.cpp]...
Compiling [gc_status.cpp]...
Compiling [victim_stripe.cpp]...
Compiling [copier_read_completion.cpp]...
Compiling [stripe_copy_submission.cpp]...
Compiling [copier_meta.cpp]...
Compiling [gc_flush_completion.cpp]...
make: *** [Makefile:217: poseidonos] Error 2

The error from spdk is benign since the script has tried to do make clean without a built one before.

Questioning whether we built gtest. I ran just the gtest build.

ssgroot@test44:~/POS/poseidonos/lib$ sudo ./build_ibof_lib.sh gtest
-e
[Build googletest-release-1.10.x.tar.gz ]
-e
-e
extrast gtest-1.10.x
-e
-e
extract gtest.. done
-e
ar: creating /usr/local/lib/libgtest.a
a - gtest-all.o
a - gmock_main.o
ar: creating /usr/local/lib/libgmock.a
a - gtest-all.o
a - gmock-all.o
ar: creating /usr/local/lib/libgmock_main.a
a - gtest-all.o
a - gmock-all.o
a - gmock_main.o
Google test lib. & header files have been copied to /usr/local/lib & /usr/local/include
/home/ssgroot/POS/poseidonos/lib
-e
[Build googletest-release-1.10.x.tar.gz ].. Done
-e

That succeeded, trying the go issue:

Issue: go1.14.4.linux-amd64.tar.gz

ssgroot@test44:~/POS/poseidonos/lib$ sudo ./build_ibof_lib.sh go
-e
[SETUP go1.14.4.linux-amd64.tar.gz ]
-e
-e
extract GO
-e
tar: go1.14.4.linux-amd64.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

That is failing
Looking at the directory

ssgroot@test44:~/POS/poseidonos/lib$ ls -al
total 29256
drwxrwxr-x 1 ssgroot ssgroot      852 Sep 16 16:45 .
drwxrwxr-x 1 ssgroot ssgroot      210 Sep 16 16:26 ..
-rw-rw-r-- 1 ssgroot ssgroot     1492 Sep 16 15:59 README
drwxrwxr-x 1 ssgroot ssgroot      258 Sep 16 16:25 air
drwxrwxr-x 1 ssgroot ssgroot      252 Sep 16 16:18 air.vm
-rwxrwxr-x 1 ssgroot ssgroot     9216 Sep 16 16:18 build_ibof_lib.sh
lrwxrwxrwx 1 ssgroot ssgroot       10 Sep 16 16:18 dpdk -> dpdk-20.08
drwxrwxr-x 1 ssgroot ssgroot      398 Sep 16 16:24 dpdk-20.08
-rw-rw-r-- 1 ssgroot ssgroot 13360760 Sep 16 16:18 dpdk-20.08.tar.xz
drwxrwxr-x 1 ssgroot ssgroot      286 Sep 16 16:18 dpdk-stable-19.08.2
drwxrwxr-x 1 ssgroot ssgroot       72 Sep 16 16:18 dpdk-stable-19.08.2.vm
drwxrwxr-x 1 ssgroot ssgroot       72 Sep 16 16:18 dpdk.vm
lrwxrwxrwx 1 ssgroot ssgroot        7 Sep 16 16:18 fff -> fff-1.1
drwxrwxr-x 1 ssgroot ssgroot      218 Sep 16 16:18 fff-1.1
-rw-rw-r-- 1 ssgroot ssgroot   348938 Sep 16 16:18 filebench-master.zip
drwxrwxr-x 1 ssgroot ssgroot     4044 Sep 16 16:24 fio-fio-3.1
drwxrwxr-x 1 ssgroot ssgroot     2508 Sep 16 16:18 fio-fio-3.12
-rw-rw-r-- 1 ssgroot ssgroot       40 Sep 16 16:18 go1.14.4.linux-amd64.tar.gz.REMOVED.git-id
drwxr-xr-x 1 root    root         394 Sep 16 16:42 googletest-release-1.10.x
-rw-rw-r-- 1 ssgroot ssgroot  8447628 Sep 16 16:18 googletest-release-1.10.x.tar.gz
drwxrwxr-x 1 ssgroot ssgroot     4210 Sep 16 16:25 gperftools-2.7
-rw-rw-r-- 1 ssgroot ssgroot  1523562 Sep 16 16:18 gperftools-2.7.tar.gz
drwxrwxr-x 1 ssgroot ssgroot       16 Sep 16 16:18 nlohmann
-rw-rw-r-- 1 ssgroot ssgroot   447489 Sep 16 16:18 psutil-5.6.5.tar.gz
-rw-rw-r-- 1 ssgroot ssgroot   992298 Sep 16 16:18 release-1.8.1.tar.gz
lrwxrwxrwx 1 ssgroot ssgroot       10 Sep 16 16:18 spdk -> spdk-20.10
drwxrwxr-x 1 ssgroot ssgroot      556 Sep 16 16:18 spdk-19.10
drwxrwxr-x 1 ssgroot ssgroot      530 Sep 16 16:25 spdk-20.10
-rw-rw-r-- 1 ssgroot ssgroot  2591914 Sep 16 16:18 spdk-20.10.tar.gz
drwxrwxr-x 1 ssgroot ssgroot      302 Sep 16 16:18 spdlog-1.4.2
drwxrwxr-x 1 ssgroot ssgroot       92 Sep 16 16:18 spdlog-1.4.2.vm
-rw-rw-r-- 1 ssgroot ssgroot  2196019 Sep 16 16:18 v19.10.tar.gz

Looks like this is the culprit: go1.14.4.linux-amd64.tar.gz.REMOVED.git-id
Let's see what's going on there...
Will download from https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz and try again
Looks like it worked:

ssgroot@test44:~/POS/poseidonos/lib$ sudo ./build_ibof_lib.sh go
-e
[SETUP go1.14.4.linux-amd64.tar.gz ]
-e
-e
extract GO
-e
-e
extract GO.. done
-e

Issue fixed: Rebuilding

Going back to scripts and trying to build from the start:

ssgroot@test44:~/POS/poseidonos/script$ sudo ./build_ibofos.sh
 
clean FIO
 
/home/ssgroot/POS/poseidonos/lib
 
...
 
Compiling [read_reverse_map_entry_wbt_command.cpp]...
Compiling [set_gc_threshold_wbt_command.cpp]...
/home/ssgroot/POS/poseidonos/tool/cli/script/build_cli.sh
cp -f /home/ssgroot/POS/poseidonos/tool/cli/old-cli /home/ssgroot/POS/poseidonos/bin/cli
mv -f /home/ssgroot/POS/poseidonos/tool/cli/bin/poseidonos-cli /home/ssgroot/POS/poseidonos/bin/poseidonos-cli
  LINK poseidonos
rm bin/ibofos -rf
ln -s /home/ssgroot/POS/poseidonos/bin/poseidonos bin/ibofos

Looks like it worked, checking the bin dir

ssgroot@test44:~/POS/poseidonos$ ls -al bin/
total 457784
drwxr-xr-x 1 root    root           66 Sep 16 17:03 .
drwxrwxr-x 1 ssgroot ssgroot       210 Sep 16 17:00 ..
-rwxr-xr-x 1 root    root     12361161 Sep 16 17:03 cli
lrwxrwxrwx 1 root    root           43 Sep 16 17:03 ibofos -> /home/ssgroot/POS/poseidonos/bin/poseidonos
-rwxr-xr-x 1 root    root    444329200 Sep 16 17:03 poseidonos
-rwxr-xr-x 1 root    root     12074628 Sep 16 17:03 poseidonos-cli
ssgroot@test44:~/POS/poseidonos$

Looks great, all built successfully

Success

the core file name is hard to access

The core file is in the name "'!opt!poseidonos!bin!poseidonos.core'"

if the ! can be fixed we dont need to escape the strings to access it

I am using version 10.6

Any plan for supporting NFS?

Hello, looks like a great project.

Do you have any plans to support NFS? It will be appealing to a wider customer-base.

Telemetry configuration assistance

I have poseidonos and poseidonos-gui up and have the ability to see the array and volume in the GUI. I am trying to get the telemetry up between the two, as I am assuming that detail statistics for the GUI would come from that connection. I used the command "sudo ./poseidonos-cli telemetry start --ip 1.0.0.193 --port 8090", but I did not see a listener in netstat after I did that. Is there any documentation that may describe the configuration and usage of telemetry? Or any assistance would be greatly appreciated. Log attached.

pos.log

If GO is already installed no need to download go and Install

pkgdep.sh tries to install GO even if go14 or a new version is available

this script needs to check if its installed if not only then install GO
pkgdep.sh

#!/bin/sh
# Please run this script as root.

SYSTEM=`uname -s`
POS_ROOT=$(readlink -f $(dirname $0))/..

${POS_ROOT}/script/install_go.sh

Poseidon does not start.

I am back trying to get an evaluation up and running as I am no longer trying to emulate the NVMe drives. I was able to download the code and build it. But when I try to start the application using the "sudo ./start_poseidonos.sh" script, I get the following output:

keith@poseidonos:~/dev/ibofos/poseidonos/script$ sudo ./start_poseidonos.sh
[sudo] password for keith:
0000:0b:00.0 (144d a808): Already using the nvme driver
0000:1b:00.0 (1987 5013): Already using the nvme driver
0000:13:00.0 (1179 0113): Already using the nvme driver
Setting maximum # of Huge Page Size is 2/3 of Total Memory Size
0000:13:00.0 (1179 0113): nvme -> uio_pci_generic
0000:0b:00.0 (144d a808): nvme -> uio_pci_generic
0000:1b:00.0 (1987 5013): nvme -> uio_pci_generic
/home/keith/dev/ibofos/poseidonos/script
apport.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable apport
Current maximum # of memory map areas per process is 65530.
Setting maximum # of memory map areas per process to 65535.
vm.max_map_count = 65535
Setup env. done!
Execute poseidonos
Error: Could not connect to the CLI server. Is PoseidonOS running? (internal error message: context deadline exceeded)
Usage:
poseidonos-cli system info [flags]

Flags:
-h, --help help for info

Global Flags:
--debug Print response for debug.
--fs string Field separator for the output. (default "|")
--ip string Set IPv4 address to PoseidonOS for this command. (default "127.0.0.1")
--json-req Print request in JSON form.
--json-res Print response in JSON form.
--node string Name of the node to send this command. When both --ip and this flag are specified, this flag is applied only.
--port string Set the port number to PoseidonOS for this command. (default "18716")
--timeout uint32 Timeout for this command in seconds. (Note: array unmount command has 30 minutes timeout.) (default 180)
--unit Display unit (B, KB, MB, ...) when displaying capacity.

./start_poseidonos.sh: line 42: 2: command not found
Wait poseidonos for 1 seconds

pos.log

pos_major.log

syslog.log

I attached logs for review. In the pos.log and pos_major.log, I only have the entries for the time I attempted to start the application. Syslog I provided the whole thing in case there is something obscure in there. I do not see any "errors" in the pos.log. I am at a little bit at a loss of what next to look at. Any help would be greatly appreciated.

./cli volume list --name option not work properly

Describe the bug
A clear and concise description of what the bug is.

  • result of create volume "vol1"
$ sudo ./cli volume list

Request to Poseidon OS
    xrId        :  bacfacd7-fe9f-11eb-9513-080027f58a4e
    command     :  LISTVOLUME

Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :  
    Solution     :  
    Data         : 
 {
    "volumes": [
        {"id": 0,"maxbw": 0,"maxiops": 0,"name": "vol1", remain": "2.147483648GB (2147483648B)","status": "Mounted","total": "2.147483648GB (2147483648B)"}
    ]
}
  • --array option is correct
$ sudo  ./cli volume list  -a POSArray
==> Correct result
$ sudo  ./cli volume list  -a XXX

Request to Poseidon OS
    xrId        :  0d894d87-fea0-11eb-a286-080027f58a4e
    command     :  LISTVOLUME
    Param       :
{    "array": "XXX" }

Response from Poseidon OS
    Code         :  2522
    Level        :  WARN
    Description  :  Array does not exist. Please check the array name in the command line or type the array name.
    Problem      :  
    Solution     : 
  • It doesn't work properly. --name option
$ sudo  ./cli volume list  --name  XXXXXXX


Request to Poseidon OS
    xrId        :  96a26bf9-fea0-11eb-9ed4-080027f58a4e
    command     :  LISTVOLUME
    Param       :
{
    "name": "XXXXXXX"
}


Response from Poseidon OS
    Code         :  0
    Level        :  INFO
    Description  :  Success
    Problem      :  
    Solution     :  
    Data         : 
 {
    "volumes": [
        {
            "id": 0,
            "maxbw": 0,
            "maxiops": 0,
            "name": "vol1",
            "remain": "2.147483648GB (2147483648B)",
            "status": "Mounted",
            "total": "2.147483648GB (2147483648B)"
        }
    ]
}

Build script is broken

git commit id
commit 3b5054b (HEAD -> main, origin/main, origin/HEAD)

$ sudo ./lib/build_lib.sh
CMake Error: The source directory "/home/thkrishn/poseidonos" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Makefile:261: /home/thkrishn/poseidonos/lib/spdk/mk/spdk.deps.mk: No such file or directory
make: *** No rule to make target '/home/t.krishna/poseidonos/lib/spdk/mk/spdk.deps.mk'. Stop.

RAID options

Hi Team,

Keen to know if the PoseidonOS supports RAID 0 or just a Logical volume of disks instead of RAID 5?

For fault-tolerance/redundancy, can we use multiple servers and replicate the data across them?

Thanks.

nvme connect does not pickup NVMe over TCP

Hi,
Tried to connect to the NVMe volume over TCP and it discovers the block but not getting connected. Please share your thoughts on this. We have disabled the firewall just in case but no luck.

NVMe_over_tcp

Thanks

POS Management Tool

I want to install Management Tool to use "learning_pos_management_tool.md"
but I cannot find this file $POS_MGMT_HOME /m9k/install_all.sh

build_ibofos make fails

Hi,
We tried to build the Poseidon OS and it shows the make error as below. We tested the version of cmake and the results are uploaded below. Please suggest your ideas.
Screenshot from 2021-11-05 14-23-00

Screenshot from 2021-11-05 14-26-14
)

losing NVMe drives after executing ./start_poseidonos.sh

I am still trying to bring up a virtual environment for evaluation. I now can get the application to run. However, I do not see al the NVMe drives. Any help would be greatly appreciated. Here is what I start with:

kouellette@oe-poseidon:$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 1.4M 0 disk
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 19G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 19G 0 lvm /
sr0 11:0 1 68.1M 0 rom
sr1 11:1 1 969M 0 rom
nvme0n1 259:0 0 20G 0 disk
nvme0n2 259:1 0 20G 0 disk
nvme0n3 259:2 0 20G 0 disk
kouellette@oe-poseidon:
$

After I start poseidonos using ./start_poseidonos.sh I no longer see them here.

kouellette@oe-poseidon:/workspace/ibofos/poseidonos$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 1.4M 0 disk
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 19G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 19G 0 lvm /
sr0 11:0 1 68.1M 0 rom
sr1 11:1 1 969M 0 rom
kouellette@oe-poseidon:
/workspace/ibofos/poseidonos$

I then scan to see if maybe Poseidonos sees them and I get the following:

kouellette@oe-poseidon:/workspace/ibofos/poseidonos$ sudo ./bin/poseidonos-cli device scan
kouellette@oe-poseidon:
/workspace/ibofos/poseidonos$ sudo ./bin/poseidonos-cli device list --unit

Name SerialNumber Address Class ModelNumber NUMA Size
unvme-ns-0 VMware NVME_0000 0000:03:00.0 SYSTEM VMware Virtual NVMe Disk 0 20G

Should I not see all three at this point?

I attached the pos.log and syslog files. The time to look for is around 10-21-2022 14:41

syslog.log
pos.log

Compilation errors on Ubuntu 20.04 / 18.04

On a fresh Ubuntu 20.04.3, I got errors compiling both the library and Poseidon-OS.

Following the steps described on the README:

git clone https://github.com/poseidonos/poseidonos.git
cd poseidonos/script
sudo ./pkgdep.sh
cd ../lib
sudo ./build_lib.sh
cd ../script
sudo ./build_ibofos.sh

This is the error from building the library:

(...)
/home/martin/poseidonos/lib/grpc                                                                                                                                                                                                                                                                                              
/home/martin/poseidonos/lib/grpc/cmake/build /home/martin/poseidonos/lib/grpc                                                                                                                                                                                                                                                 
-- The C compiler identification is GNU 9.3.0                                                                                                                                                                                                                                                                                 
-- The CXX compiler identification is GNU 9.3.0                                                                                                                                                                                                                                                                               
-- Check for working C compiler: /usr/bin/cc                                                                                                                                                                                                                                                                                  
-- Check for working C compiler: /usr/bin/cc -- works                                                                                                                                                                                                                                                                         
-- Detecting C compiler ABI info                                                                                                                                                                                                                                                                                              
-- Detecting C compiler ABI info - done                                                                                                                                                                                                                                                                                       
-- Detecting C compile features                                                                                                                                                                                                                                                                                               
-- Detecting C compile features - done                                                                                                                                                                                                                                                                                        
-- Check for working CXX compiler: /usr/bin/c++                                                                                                                                                                                                                                                                               
-- Check for working CXX compiler: /usr/bin/c++ -- works                                                                                                                                                                                                                                                                      
-- Detecting CXX compiler ABI info                                                                                                                                                                                                                                                                                            
-- Detecting CXX compiler ABI info - done                                                                                                                                                                                                                                                                                     
-- Detecting CXX compile features                                                                                                                                                                                                                                                                                             
-- Detecting CXX compile features - done                                                                                                                                                                                                                                                                                      
-- Looking for pthread.h                                                                                                                                                                                                                                                                                                      
-- Looking for pthread.h - found                                                                                                                                                                                                                                                                                              
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD                                                                                                                                                                                                                                                                                    
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed                                                                                                            
-- Looking for pthread_create in pthreads                                                                                                                                                                                                                                                                                     
-- Looking for pthread_create in pthreads - not found                                                                                                                                                                                                                                                                         
-- Looking for pthread_create in pthread                                                                                                                                                                                                                                                                                      
-- Looking for pthread_create in pthread - found                               
-- Found Threads: TRUE                                                                                                                                         
-- Could NOT find c-ares (missing: c-ares_DIR)                                                                                                                 
-- Found c-ares: /usr/include (found suitable version "1.15.0", minimum required is "1.13.0")                                                                  
-- Found Protobuf: /usr/local/lib/libprotobuf.a;-lpthread (found version "3.15.8")                                                                             
-- Found RE2 via CMake.                                                                                                                                        
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):                                                                
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the                                                                                    
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY                                                                                            
  OPENSSL_INCLUDE_DIR)                                                                                                                                         
Call Stack (most recent call first):                                                                                                                           
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)                                                               
  /usr/share/cmake-3.16/Modules/FindOpenSSL.cmake:447 (find_package_handle_standard_args)                                                                      
  cmake/ssl.cmake:66 (find_package)                                                                                                                            
  CMakeLists.txt:257 (include)                                                                                                                                 
                                                                                                                                                               
                                                                                                                                                               
-- Configuring incomplete, errors occurred!                                                                                                                    
See also "/home/martin/poseidonos/lib/grpc/cmake/build/CMakeFiles/CMakeOutput.log".                                                                            
See also "/home/martin/poseidonos/lib/grpc/cmake/build/CMakeFiles/CMakeError.log".                                                                             
make[3]: warning: -j4 forced in submake: resetting jobserver mode.                                                                                             
make[3]: *** No targets specified and no makefile found.  Stop.                                                                                                
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.                                                                              
make[3]: *** No rule to make target 'install'.  Stop.                                                                                                          
/home/martin/poseidonos/lib/grpc                                               
GRPC installation success                                                                                                                                      
[ 92%] Built target grpc                                                                                                                                       
-- spdk download command succeeded.  See also /home/martin/poseidonos/lib/spdk-prefix/src/spdk-stamp/spdk-download-*.log

I thought that this was due to the missing package libssl-dev, but I checked and it was already installed.

And this is the error from sudo ./build_ibofos.sh:

/home/martin/poseidonos/src/allocator/context_manager/rebuild_ctx/rebuild_ctx.cpp: In constructor ‘pos::RebuildCtx::RebuildCtx(pos::TelemetryPublisher*, pos::AllocatorAddressInfo*)’:
/home/martin/poseidonos/src/allocator/context_manager/rebuild_ctx/rebuild_ctx.cpp:69:31: error: ‘*<unknown>.pos::RebuildCtx::tp’ is used uninitialized in this function [-Werror=uninitialized]
   69 | : RebuildCtx(tp, nullptr, info)

build_ibofos.sh failed

hello,When I run sudo ./build_ibofos.sh some errors occur. Please suggest your ideas
Error message:
Compiling [allocator.cpp]...
/usr/local/go/bin/go get google.golang.org/protobuf/cmd/[email protected]
go: github.com/golang/[email protected]: Get "https://proxy.golang.org/github.com/golang/protobuf/@v/v1.5.2.mod": dial tcp: lookup proxy.golang.org: no such host
Makefile:17: recipe for target 'protobuf' failed
make[1]: *** [protobuf] Error 1
Makefile:235: recipe for target 'pos-exporter' failed
make: *** [pos-exporter] Error 2
make: *** Waiting for unfinished jobs....

/home/sivp/pos/poseidonos/tool/cli/script/build_cli.sh
go: code.cloudfoundry.org/[email protected]: Get "https://proxy.golang.org/code.cloudfoundry.org/bytefmt/@v/v0.0.0-20210608160410-67692ebc98de.mod": dial tcp: lookup proxy.golang.org: no such host
mv: cannot stat './cli': No such file or directory
go: code.cloudfoundry.org/[email protected]: Get "https://proxy.golang.org/code.cloudfoundry.org/bytefmt/@v/v0.0.0-20210608160410-67692ebc98de.mod": dial tcp: lookup proxy.golang.org: no such host
go: code.cloudfoundry.org/[email protected]: Get "https://proxy.golang.org/code.cloudfoundry.org/bytefmt/@v/v0.0.0-20210608160410-67692ebc98de.mod": dial tcp: lookup proxy.golang.org: no such host
chmod: cannot access '../bin/gen_md': No such file or directory
chmod: cannot access '../bin/gen_man': No such file or directory

Compilation -- Offline Compilation support

I am using the v0.10.6 branch and I am unable to build the software on an environment which has no internet access
I am seeing this issues

/home/thkrishn/poseidonos/tool/cli/script/build_cli.sh
go: code.cloudfoundry.org/[email protected]: Get "https://proxy.golang.org/code.cloudfoundry.org/bytefmt/@v/v0.0.0-20210608160410-67692ebc98de.mod": dial tcp 172.217.164.113:443: i/o timeout
mv: cannot stat './cli': No such file or directory
go: code.cloudfoundry.org/[email protected]: Get "https://proxy.golang.org/code.cloudfoundry.org/bytefmt/@v/v0.0.0-20210608160410-67692ebc98de.mod": dial tcp 172.217.164.113:443: i/o timeout
go: code.cloudfoundry.org/[email protected]: Get "https://proxy.golang.org/code.cloudfoundry.org/bytefmt/@v/v0.0.0-20210608160410-67692ebc98de.mod": dial tcp 172.217.164.113:443: i/o timeout

Is there a workaround for this?
I am using Ubuntu 20.04

커밋이 원복되어 현재 Rocky Linux에서 빌드가 불가능합니다

안녕하십니까. 글루시스의 박현승입니다.

사내에서 테스트를 위해 최신 커밋을 클론 받아 Rocky 8.7에서 빌드를 시도하자 spdk 빌드 중 오류가 발생하였습니다.
원인을 찾던 도중 제가 변경하였던 lib/spdk-22.01.1.patch 파일의 내용이 원복된 것을 확인하였습니다. (7d0d7f2)
해당 변경 사항을 재적용해주시기를 부탁드리겠습니다.

Mr

Hi,
We have run the below command and it runs without any error.
./poseidonos-cli device scan

But, the below command does not fetch any NVMe from the hardware.
./poseidonos-cli device list --unit

Checked the PoseidonOS is running by the command below;
ps -ef | grep poseidonos | grep -v grep

The below command shows two drives in the hardware:
fdisk -l | grep nvme

Please help!!!
Thanks in advance

CPU allowed list improperly set

I am a hobbyist that is attempting to build a storage system with commodity hardware and was attempting on using Poseidon with its GUI for that. My first attempt before purchasing hardware was to try it in a VM. I am using VMware's fusion and created a VM with 3 NVMe drives and a SATA for the OS to run on.

I followed the instructions and was able to build it with no errors. However, whenever I start it, I get the following errors:

[2022-10-17 13:59:27.071068739][4585][4585][30532707][-1000][ info] N/A - POS Version v0.12.0-rc0 (cause: N/A, solution: N/A, variables: N/A), source: poseidonos.cpp:385 _LoadVersion(), pos_version: v0.12.0-rc0

[2022-10-17 13:59:27.071730062][4585][4599][30532707][-1000][ info] N/A - Use core description from config file (cause: N/A, solution: N/A, variables: N/A), source: affinity_config_parser.cpp:100 AffinityConfigParser(), pos_version: v0.12.0-rc0

[2022-10-17 13:59:27.071902635][4585][4599][30532707][-1000][ info] N/A - Use EventWorker and IOWorker (cause: N/A, solution: N/A, variables: N/A), source: affinity_config_parser.cpp:112 AffinityConfigParser(), pos_version: v0.12.0-rc0

[2022-10-17 13:59:27.073685218][4585][4599][30532707][-1000][critical] N/A - Cpu allowed list is wrongly set (cause: N/A, solution: N/A, variables: N/A), source: string_descripted_cpu_set_generator.cpp:185 _SetCpuRange(), pos_version: v0.12.0-rc0

I am guessing the CPU error is why it is not starting. Can I not run this in a virtual environment? Is that what my issue is?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.