Hello, I have a program that I believe was written by golang, but it is a closed source program.
It requires a free block device, such as /dev/sdb
He detects an available block device and creates an available volume group through LVM with a log like this:
Log file created at: 2019/06/23 04:28:36
Running on the machine: anshan
Binary: Built with gc go1.10.3 for Linux /amd64
Log line format: [IWEF] MMDD hh:mm: ss.uuuuuuudid file:line] MSG
I0623 04:28:36. 977294 884 node. Go: 211] pull image registry.cn-hangzhou.aliyuncs.com/bonus/bxc-network-x86_64:v1 success, run it
Onbootcheck.go :14] Check lvm2 installed
I0623 04:28:37.246027 884 onbootcheck. Go :26] Check logrotate rules
I0623 04:28:37. 261279 884 onbootcheck. Go: 42] Check file: / usr/libexec/kubernetes/kubelet - plugins/volume/exec/bonuscloud. IO ~ LVM/LVM
Onbootcheck. Go :18] Check jq installed
Go :375] avail disk /dev/ SDB found, create BonusVolGroup…
Go :55] VG BonusVolGroup remove faild: Volume group “BonusVolGroup” not found
Cannot process volume group BonusVolGroup
W0623 04:28:37.523901 884 disk.go:188] Report VG size faild: bcode not found, device should be bound first
Go :380] Create BonusVolGroup on /dev/ SDB success
Through the VGS command, output:
VG #PV #LV #SN Attr VSize VFree
BonusVolGroup 1 1 0 wz–n- <220.00g <120.00g
But in LXD, when I don’t use the LXC config device add to add block devices, my log looks like this (via cat /var/log/syslog) :
Avail disk /dev/ SDB found, create BonusVolGroup…
Ubuntu2 node[5087]: W0623 12:07:27.572492 5087 disk.go:61] PV on /dev/ SDB remove faild: Device /dev/ SDB not found
Create PV on /dev/ SDB faild: Device /dev/ SDB not found
When I add a block device to the container, I get no output, no volume groups are created through the VGS command, and only one warning:
File descriptor 6 (pipe:[540671]) leaked on VGS invocation. Parent PID 3491: bash
Whether I run lvmetad or not, it bothers me.
Please help me. Thank you