If I use the csilvm driver, I am able to use a published volume with
this task[1] with xfs fs. However when I try and ad the volume as block
device the task[3] fails to deploy the log[4] however seems ok and does
a mount and unmount. Should I change more than just accessType and
fsType? The stderr of the task mentions 'Failed to prepare mounts:
Failed to mount' and 'directory does not exist'.
The driver seems ok, because it respons to a publishing request from the
command line[2]
[2]
csc -e unix:///tmp/mesos-csi-v5WtjJ/endpoint.sock node publish --cap
SINGLE_NODE_WRITER,block --target-path /mnt/testman1 'LVtestman1'
Log:
...
[VGtest]2020/12/18 17:50:18 lvm.go:893: stderr:
[VGtest]2020/12/18 17:50:18 server.go:1069: Volume path is
/dev/VGtest/LVtestman1
[VGtest]2020/12/18 17:50:18 server.go:1071: Target path is /mnt/testman1
[VGtest]2020/12/18 17:50:18 server.go:1074: Mounting readonly: false
[VGtest]2020/12/18 17:50:18 server.go:1094: Attempting to publish volume
/dev/VGtest/LVtestman1 as BLOCK_DEVICE to /mnt/testman1
[VGtest]2020/12/18 17:50:18 server.go:1095: Determining mount info at
/mnt/testman1
[VGtest]2020/12/18 17:50:18 server.go:1104: Mount info at /mnt/testman1:
<nil>
[VGtest]2020/12/18 17:50:18 server.go:1135: Creating Mount Target
/mnt/testman1
[VGtest]2020/12/18 17:50:18 server.go:1143: Nothing mounted at
targetPath /mnt/testman1 yet
[VGtest]2020/12/18 17:50:18 server.go:1148: Performing bind mount of
/dev/VGtest/LVtestman1 -> /mnt/testman1
[VGtest]2020/12/18 17:50:18 logging.go:30: Served
/csi.v1.Node/NodePublishVolume: resp=
[1]
{
"id": "/app5",
"instances": 1,
"cpus": 1,
"mem": 32,
"cmd": "echo $(date +'%m%d %H%M%S'): $HOSTNAME >> xxx/file ; sleep
3600",
"acceptedResourceRoles": ["*"],
"constraints": [["hostname", "CLUSTER", "m01.local"]],
"backoffSeconds": 10,
"networks": [ { "mode": "host" } ],
"container": {
"type": "MESOS",
"volumes": [
{
"containerPath": "xxx",
"mode": "rw",
"external": {
"provider": "csi",
"name": "LVtestman1",
"options": {
"pluginName": "lvm.csi.mesosphere.io",
"capability": {
"accessType": "mount",
"accessMode": "SINGLE_NODE_WRITER",
"fsType": "xfs"
}
}
}
}
]
}
}
[3]
{
"id": "/app4",
"instances": 1,
"cpus": 1,
"mem": 32,
"cmd": "echo $(date +'%m%d %H%M%S'): $HOSTNAME >> file ; sleep 3600",
"acceptedResourceRoles": ["*"],
"constraints": [["hostname", "CLUSTER", "m01.local"]],
"backoffSeconds": 10,
"networks": [ { "mode": "host" } ],
"container": {
"type": "MESOS",
"volumes": [
{
"containerPath": "xxx",
"mode": "rw",
"external": {
"provider": "csi",
"name": "LVtestman1",
"options": {
"pluginName": "lvm.csi.mesosphere.io",
"capability": {
"accessType": "block",
"accessMode": "SINGLE_NODE_WRITER",
"fsType": ""
}
}
}
}
]
}
}
[4]
[VGtest]2020/12/18 17:53:22 server.go:1329: Determining mount info at
/var/lib/mesos/csi/lvm.csi.mesosphere.io/default/mounts/LVtestman1/targe
t
[VGtest]2020/12/18 17:53:22 server.go:1337: Mount info at
/var/lib/mesos/csi/lvm.csi.mesosphere.io/default/mounts/LVtestman1/targe
t: &{root:/dm-2
path:/var/lib/mesos/csi/lvm.csi.mesosphere.io/default/mounts/LVtestman1/
target fstype:devtmpfs mountopts:[rw nosuid] mountsource:devtmpfs}
[VGtest]2020/12/18 17:53:22 server.go:1346: Unmounting
/var/lib/mesos/csi/lvm.csi.mesosphere.io/default/mounts/LVtestman1/targe
t
[VGtest]2020/12/18 17:53:22 server.go:1361: Deleting Mount Target
/var/lib/mesos/csi/lvm.csi.mesosphere.io/default/mounts/LVtestman1/targe
t
[VGtest]2020/12/18 17:53:22 logging.go:30: Served
/csi.v1.Node/NodeUnpublishVolume: resp=