Logo

Personal Ops Runbook

Personal runbook covering infrastructure operations for Cloud, Kubernetes, OpenStack, and Ceph environments. Includes deployment and teardown procedures, node management, cluster monitoring setup, and incident response workflows compiled from day-to-day operational work. Intended strictly for personal reference — configurations and scripts are environment-specific and not guaranteed to work as-is elsewhere.

Lightbits Private Cloud

Mục lục


Creating a Volume — Tạo một Volume

Sau khi software Lightbits đã được cài đặt và các management service của Lightbits đang chạy, bạn có thể tạo một volume và kết nối volume đó tới các application server của mình.

Để tạo volume, hãy chạy lệnh lbcli create volume.

Sample Command

$ lbcli create volume --name vol_1 --acl=test --size="10 Gib" --replica-count=2 --project-name=default

Ở dạng lệnh dưới đây, JWT không được lưu trong file cấu hình của lbcli:

$ lbcli -J $JWT create volume --size="10 Gib" --name=vol_1 --acl="test" --replica-count=2 --project-name=default

Sample Output

Name UUID State Size Replicas
vol_1 82f6a469-5ccd-449b-8f43-acc53cb887a7 Creating 10 GiB 2

Lệnh ví dụ này tạo một volume 10 GB với hai replica, và dùng một string đơn giản là “test” làm giá trị Access Control List (ACL). ACL string này sẽ được application client sử dụng khi chạy lệnh nvme connect để kết nối tới volume mới này qua NVMe/TCP.

Creating a Compressed Volume — Tạo volume có bật compression

Lệnh lbcli create volume cũng hỗ trợ một flag cho phép dữ liệu trong volume được nén (compress) ở mức tối đa có thể.

Dùng lệnh lbcli create volume để tạo volume có bật compression (true).

Sample Command

$ lbcli create volume --name=vol2 --acl=acl1 --size="1 Tib" --replica-count=3 --compression=true

Ở dạng lệnh dưới đây, JWT không được lưu trong file cấu hình của lbcli:

$ lbcli -J $JWT create volume --size="1 Tib" --name=vol2 --acl="acl1" --replica-count=2 --compression=true --project-name=default

Sample Output

Name UUID State Protection State NSID Size Replicas Compression ACL Rebuild Progress
vol2 105624dd-c96f-4668-a2a2-da0b754ac462 Creating NotAvailable 0 1.0 TiB 3 true values:"acl1"

Kết quả mẫu ở trên là output tiêu chuẩn khi dùng lbcli ngay sau khi thực thi lệnh create. Output cho thấy volume đang được tạo với đúng các giá trị mà bạn đã cung cấp.

List Details About the Newly Created Volume — Xem chi tiết volume vừa tạo

Bạn có thể dùng lệnh lbcli get volumes để xem các thông tin cụ thể liên quan đến bất kỳ volume nào.

Sample Command

$ lbcli get volume --name=vol2

Ở dạng lệnh dưới đây, JWT không được lưu trong file cấu hình của lbcli:

$ lbcli -J $JWT get volume --name vol2 --project-name a

Sample Output

ETag: "4"
IPAcl:
 values:
 - ALLOW_ANY
UUID: 105624dd-c96f-4668-a2a2-da0b754ac462
acl:
 values:
 - acl1
compression: true
connectedHosts: []
name: vol2
nodeList:
- 2d6f9739-afd7-5225-b4a0-b7c46dc54ffd
- 01ab0ff8-6417-5b89-ba1a-b3011936745f
- 291e00d3-73d0-546f-ae45-e26a1cfa534b
nsid: 2
protectionState: FullyProtected
rebuildProgress: None
replicaCount: 3
size: "1099511627776"
state: Available
statistics:
 compressionRatio: 0
 logicalUsedStorage: "0"
 physicalUsedStorage: "0"

Output này liệt kê toàn bộ tham số đã dùng để tạo volume, chẳng hạn ACL, replication factor (replica count) và trạng thái compression. Ngoài ra, UUID của từng Lightbits node được dùng để tạo volume trên Lightbits cluster cũng được hiển thị trong phần nodeList của output.

Nguồn: https://documentation.lightbitslabs.com/lightbits-private-cloud/create-a-volume


Connecting Application Servers to Lightbits — Kết nối application server tới Lightbits

Việc kết nối một application server tới các volume trên Lightbits storage server được thực hiện theo quy trình sau.

Connecting an Application Server to a Volume — Kết nối application server tới một volume

Step (Bước) Command Type (Loại lệnh) Simplified Command
Lấy thông tin chi tiết về Lightbits storage cluster Lightbits lbcli CLI lbcli get cluster``lbcli get nodes
Lightbits REST get /api/v2/cluster``get /api/v2/nodes
Kiểm tra kết nối mạng Linux command ping <IP of Lightbits Data NIC>
Kết nối tới Lightbits Kết nối tới Lightbits cluster nvme connect <your Lightbits connection details>
Xem chi tiết block device Linux command lsblk hoặc nvme list

Before You Begin — Trước khi bắt đầu

Trước khi bắt đầu quy trình kết nối một application server tới Lightbits storage server, hãy xác nhận rằng các điều kiện sau đã được thỏa mãn:

  • Đã tồn tại một volume trên Lightbits storage server.

  • Đã có kết nối TCP/IP tới Lightbits storage server.

Nguồn: https://documentation.lightbitslabs.com/lightbits-private-cloud/connecting-application-servers-to-lightbits


Reviewing the Lightbits Storage Cluster Connection Details — Xem các thông tin kết nối của Lightbits storage cluster

Bảng dưới đây liệt kê các thông tin bắt buộc mà bạn cần dùng cho lệnh nvme connect trên application server. Bạn có thể lấy các thông tin này bằng lệnh nvme connect hoặc bằng một lệnh lbcli.

Required Lightbits Storage Cluster Connection Details — Các thông tin kết nối bắt buộc

Item Description (Mô tả) NVMe Connect Command Parameter lbcli Command
Subsystem NQN Lightbits cluster đã được dùng để tạo volume. -n lbcli get cluster
Data NIC IP addresses Các địa chỉ IP của data NIC Lightbits cho tất cả các node trong cluster. -a lbcli list nodes
TCP ports Các TCP port mà các node của Lightbits cluster sử dụng. -s lbcli list nodes
ACL string ACL bạn đã dùng khi tạo volume trên Lightbits storage cluster. -q lbcli list volumes

Obtaining the Lightbits Cluster Subsystem NQN — Lấy subsystem NQN của cluster

Trên bất kỳ Lightbits server nào, hãy chạy lệnh lbcli get cluster.

Sample Command

$ lbcli get cluster

Lưu ý: Flag -J đặt sau lbcli cho biết JWT không được lưu trong file cấu hình của lbcli.

Sample Output

UUID: 442a77f8-7f7a-4ab7-9fce-f1d1612e8b03
currentMaxReplicas: 3
subsystemNQN: nqn.2014-08.org.nvmexpress:NVMf:uuid:70492bf6-92e6-498a-872b-408ceb4d52d8
supportedMaxReplicas: 3

Output này bao gồm subsystem NQN của Lightbits cluster.

Obtaining the Lightbits Nodes Data IP Addresses and TCP Ports — Lấy địa chỉ IP data và TCP port của các node

Trên bất kỳ Lightbits server nào, hãy chạy lệnh lbcli list nodes.

Sample Command

$ lbcli list nodes

Lưu ý: Flag -J đặt sau lbcli cho biết JWT không được lưu trong file cấu hình của lbcli.

Sample Output

NAME UUID State NVME-Endpoint
server00-0 192af7c0-d39f-4872-b849-7eb3dc0f7b53 Active 10.23.26.13:4420
server01-0 1f4ef0ce-0634-47c7-9e5f-d4fd910ff376 Active 10.23.26.8:4420
server02-0 6d9b8337-18cd-4b14-bea1-f56aca213d68 Active 10.23.26.4:4420
server03-0 912736af-bbc5-45c5-ba22-901eea9f9fde Active 10.23.26.29:4420
server04-0 dc3ee1b5-0625-4a4c-b627-76fbd66db74c Active 10.23.26.7:4420
server05-0 e157c1a2-701b-403b-bb73-e0c1f4be0096 Active 10.23.26.5:4420

Cột NVME-Endpoint trong output chứa địa chỉ IP của data NIC và TCP port của tất cả các node trong Lightbits cluster.

Obtaining the Volume ACL String — Lấy ACL string của volume

ACL string chính là ACL mà bạn đã dùng khi tạo volume trên Lightbits storage cluster.

Bạn cũng có thể xem danh sách các volume hiện có cùng ACL của chúng bằng cách chạy lbcli list volumes trên bất kỳ Lightbits server nào.

Nguồn: https://documentation.lightbitslabs.com/lightbits-private-cloud/reviewing-the-lightbits-storage-cluster-connection-details


Verifying TCP/IP Connectivity — Kiểm tra kết nối TCP/IP

Trước khi chạy lệnh nvme connect trên application server, hãy dùng lệnh ping của Linux để kiểm tra kết nối TCP/IP giữa application server và Lightbits storage cluster.

Sample Command

$ ping -c 1 10.23.26.8
  • rack02-server70: Một application server

  • 10.23.26.8: Địa chỉ IP của Data NIC trên một trong các node của Lightbits storage cluster

Sample Output

PING 10.23.26.8 (10.23.26.8) 56(84) bytes of data.
64 bytes from 10.23.26.8: icmp_seq=1 ttl=255 time=0.032 ms
--- 10.23.26.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.032/0.032/0.032/0.000 ms

Output cho thấy application server này có kết nối tốt tới địa chỉ IP của Data NIC trên Lightbits storage server.

Nên lặp lại phép kiểm tra này với tất cả các địa chỉ IP lấy được từ lệnh lbcli list nodes.

Nguồn: https://documentation.lightbitslabs.com/lightbits-private-cloud/verifying-tcp-ip-connectivity


Connecting to the Lightbits Cluster — Kết nối tới Lightbits cluster

Khi đã có các giá trị IP, port, subsystem NQN và ACL cho volume của mình, bạn có thể thực thi lệnh nvme connect.

Bạn phải lặp lại lệnh nvme connect cho từng NVMe endpoint lấy được từ lệnh lbcli list nodes.

Sample NVMe Connect Command

$ nvme connect -t tcp -a 10.23.26.13 -s 4420 -l -1 \

-n nqn.2014-08.org.nvmexpress:NVMf:uuid:70492bf6-92e6-498a-872b-408ceb4d52d8 -q test123

Để biết thêm chi tiết về NVMe CLI, xem phần NVMe CLI Overview trong tài liệu này.

Hiện tại, Lightbits chỉ hỗ trợ TCP cho giá trị transport type.

Nguồn: https://documentation.lightbitslabs.com/lightbits-private-cloud/connecting-to-the-lightbits-cluster


Reviewing Block Device Details on the Application Server — Xem chi tiết block device trên application server

Sau khi lệnh nvme connect hoàn tất, bạn có thể xem các block device khả dụng trên application server bằng lệnh lsblk của Linux, hoặc bằng lệnh nvme connect.

Ví dụ dưới đây minh họa cách dùng lệnh lsblk của Linux để liệt kê tất cả block device sau khi lệnh nvme connect kết thúc.

Sample Command

$ lsblk

Sample Output

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 10G 0 disk

Trong output ví dụ này, bạn thấy device NVMe/TCP 10GB với tên nvme0n1. Tên này cho biết device đó:

  • Thuộc NVMe subsystem

  • Là volume đầu tiên trên NVMe subsystem 0

Đến đây, Lightbits storage cluster của bạn đã được khởi tạo và sẵn sàng sử dụng.

Bạn có thể cấu hình các application của mình để dùng volume kết nối qua NVMe/TCP này giống như với bất kỳ block device Linux nào khác.

Nguồn: https://documentation.lightbitslabs.com/lightbits-private-cloud/reviewing-block-device-details-on-the-application-server


Understanding a Volume Location in the Lightbits Cluster — Xác định vị trí của volume trong Lightbits cluster

Bạn có thể dùng lệnh lbcli get volumes cho một volume cụ thể để biết node nào trong cluster đang giữ dữ liệu của volume đó.

Sample Command

$ lbcli get volume --uuid=48dbbe54-1548-4444-866e-6438d4877e5f

Ở dạng lệnh dưới đây, JWT không được lưu trong file cấu hình của lbcli:

$ lbcli -J $JWT get volume --project-name=proj-1 --uuid=48dbbe54-1548-4444-866e-6438d4877e5f

Sample Output

name: vol_3
rebuildProgress: None
UUID: 48dbbe54-1548-4444-866e-6438d4877e5f
Acl:
 Values:
 - hostnqn1
nsid: 4
size: "107374182400"
nodeList:
- 9a625dbf-de1b-4211-b9d3-0bdf70faa5f5
- 9f1a3a85-5be5-4f98-a44e-4271fbdbe7cc
protectionState: FullyProtected
replicaCount: 2
state: Created

Bạn cũng có thể chạy lệnh nvme list-subsys trên application server.

Sample Command

# nvme list-subsys nvme0n1

Sample Output

nvme-subsys0 -
NQN=nqn.2014-08.org.nvmexpress:NVMf:uuid:b550533c-8bb0-46df-9019-cd4c25c6e6e7
\
 +- nvme0 tcp traddr=10.18.38.4 trsvcid=4420 live
 +- nvme1 tcp traddr=10.18.38.5 trsvcid=4420 live
 +- nvme2 tcp traddr=10.18.38.7 trsvcid=4420 live
 +- nvme3 tcp traddr=10.18.38.8 trsvcid=4420 live optimized
 +- nvme4 tcp traddr=10.18.38.29 trsvcid=4420 live inaccessible

Output của lệnh này cho biết địa chỉ IP của primary node (optimized) trong cluster đối với volume, địa chỉ IP của secondary node (inaccessible), và các node còn lại không giữ dữ liệu của volume đó (block device nvme0n1).

Nguồn: https://documentation.lightbitslabs.com/lightbits-private-cloud/understanding-a-volume-location-in-the-lightbits-cluster


Adding an NVMe SSD to a Lightbits Storage Server — Thêm NVMe SSD vào Lightbits storage server

Bạn có thể thêm SSD vật lý vào một Lightbits node nếu:

  • Chassis của Lightbits storage server còn drive slot trống.

  • Trong quá trình cấu hình ban đầu, bạn đã đặt field maxDeviceCount bằng tổng số slot có trên chassis.

Nguồn: https://documentation.lightbitslabs.com/lightbits-private-cloud/adding-an-nvme-ssd-to-a-lightbits-storage-server


Identifying Unused Slots — Xác định các slot còn trống

Từ một Linux shell trên bất kỳ máy nào trong số các Lightbits server, hãy chạy lệnh lbcli list nvme-devices để xem Lightbits node mà bạn muốn thêm SSD hiện đang quản lý bao nhiêu SSD.

Sample Command

$ lbcli list nvme-devices --node-uuid=fb9c7b76-22f2-4fcf-af1a-70933c1dd3fb

Lưu ý: Flag -J đặt sau lbcli cho biết JWT không được lưu trong file cấu hình của lbcli.

Sample Output

Name Size NUMA ID Serial State Server UUID Node UUID Usage
nvme6n1 4T 18446744073709551615 f0c6ae27-2d2c-4a97-b Healthy 1edcc7fb-3acf-5c53-ae1d-3ea3663442f2 d6fdc28a-e721-5bda-bfe9-2f103c75f8b4 Data
nvme9n1 4T 18446744073709551615 5dadf1c3-dfe3-402e-a Healthy 1edcc7fb-3acf-5c53-ae1d-3ea3663442f2 d6fdc28a-e721-5bda-bfe9-2f103c75f8b4 Data
nvme5n1 400.0 GiB 18446744073709551615 e70f2b94-f0a6-4e7a-8 Healthy 1edcc7fb-3acf-5c53-ae1d-3ea3663442f2 d6fdc28a-e721-5bda-bfe9-2f103c75f8b4 Journal
nvme7n1 4T 18446744073709551615 c67ab014-03d9-4956-9 Healthy 1edcc7fb-3acf-5c53-ae1d-3ea3663442f2 --- UnManaged
nvme0n1 4T 18446744073709551615 fe9989a9-2a63-4ece-9 Healthy 1edcc7fb-3acf-5c53-ae1d-3ea3663442f2 --- UnManaged
nvme4n1 400.0 GiB 18446744073709551615 efaa0aef-bdbc-4a8e-9 Healthy 1edcc7fb-3acf-5c53-ae1d-3ea3663442f2 d6fdc28a-e721-5bda-bfe9-2f103c75f8b4 Journal
nvme3n1 4T 18446744073709551615 bfdb879c-18f0-40f5-b Healthy 1edcc7fb-3acf-5c53-ae1d-3ea3663442f2 d6fdc28a-e721-5bda-bfe9-2f103c75f8b4 Data
nvme8n1 4T 18446744073709551615 80183aa9-7468-4bcb-8 Healthy 1edcc7fb-3acf-5c53-ae1d-3ea3663442f2 d6fdc28a-e721-5bda-bfe9-2f103c75f8b4 Data

Output cho thấy Lightbits node này hiện đang dùng bốn data SSD device và hai journal SSD device.

Tiếp theo, chạy lệnh lbcli get node để kiểm tra số lượng SSD device tối đa mà node này được cấu hình để quản lý, theo giá trị maxDeviceCount đã đặt trong cấu hình ban đầu.

Sample Command

$ lbcli get node --uuid=fb9c7b76-22f2-4fcf-af1a-70933c1dd3fb -o json

Lưu ý: Flag -J đặt sau lbcli cho biết JWT không được lưu trong file cấu hình của lbcli.

Sample Output

UUID: fb9c7b76-22f2-4fcf-af1a-70933c1dd3fb
clusterManagerMode: PassiveMode
failureDomains:
- rack03-server54
hostname: rack03-server54
maxNvmeDevices: 12
name: server07-0
nvmeEndpoint: 10.18.35.15:4420
state: Active
"journalRaidDevice": {
 "deviceUUID": "5b05fa61:4a4d4677:8128bda8:4ae8b536",
 "memberDeviceSerials": [
 "e913c069-e466-426d-8",
 "c56f1d6b-928e-4d2a-9"
 ]
}

Output cho thấy Lightbits node này hỗ trợ tối đa 12 data SSD.

Như vậy có thể thêm tối đa tám SSD nữa vào node này. Lệnh lbcli list nvme-devices cho thấy node hiện dùng bốn data SSD drive, còn lệnh lbcli get node cho thấy node này có thể dùng tối đa 12 data device.

Nguồn: https://documentation.lightbitslabs.com/lightbits-private-cloud/identifying-unused-slots


Nguồn tham khảo

  1. Creating a Volume — https://documentation.lightbitslabs.com/lightbits-private-cloud/create-a-volume
  2. Connecting Application Servers to Lightbits — https://documentation.lightbitslabs.com/lightbits-private-cloud/connecting-application-servers-to-lightbits
  3. Reviewing the Lightbits Storage Cluster Connection Details — https://documentation.lightbitslabs.com/lightbits-private-cloud/reviewing-the-lightbits-storage-cluster-connection-details
  4. Verifying TCP/IP Connectivity — https://documentation.lightbitslabs.com/lightbits-private-cloud/verifying-tcp-ip-connectivity
  5. Connecting to the Lightbits Cluster — https://documentation.lightbitslabs.com/lightbits-private-cloud/connecting-to-the-lightbits-cluster
  6. Reviewing Block Device Details on the Application Server — https://documentation.lightbitslabs.com/lightbits-private-cloud/reviewing-block-device-details-on-the-application-server
  7. Understanding a Volume Location in the Lightbits Cluster — https://documentation.lightbitslabs.com/lightbits-private-cloud/understanding-a-volume-location-in-the-lightbits-cluster
  8. Adding an NVMe SSD to a Lightbits Storage Server — https://documentation.lightbitslabs.com/lightbits-private-cloud/adding-an-nvme-ssd-to-a-lightbits-storage-server
  9. Identifying Unused Slots — https://documentation.lightbitslabs.com/lightbits-private-cloud/identifying-unused-slots

Ghi chú về nguồn

  • Cả 9 URL đều fetch thành công; không có URL nào bị lỗi.
  • Các trang gốc hiển thị nhãn phiên bản khác nhau: phần lớn là 3.20.x, riêng hai trang Connecting Application Servers to LightbitsConnecting to the Lightbits Cluster hiển thị 3.19.x.
  • Trong bản gốc, các heading cấp #### như Sample Command / Sample Output có nơi được đánh dấu heading, có nơi chỉ in đậm (Sample Command); bản dịch giữ đúng cách trình bày đó theo từng trang.