From c86408cbd61e39276aff46c1578e7d8f115f1a0d Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 8 May 2024 23:23:17 +0200 Subject: [PATCH] fix: Additional pass-through mounts (#722) --- .github/ISSUE_TEMPLATE/QUESTION.yml | 16 +++++++++++++--- readme.md | 4 ++-- src/disk.sh | 5 +++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/QUESTION.yml b/.github/ISSUE_TEMPLATE/QUESTION.yml index 67bdf5f7..3e57146c 100644 --- a/.github/ISSUE_TEMPLATE/QUESTION.yml +++ b/.github/ISSUE_TEMPLATE/QUESTION.yml @@ -3,10 +3,20 @@ description: General questions about the container title: "[Question]: " labels: ["question"] body: - - type: markdown + - type: checkboxes attributes: - value: | - Please do not use this form for technical issues, and make sure to check the [FAQ](https://github.com/vdsm/virtual-dsm/blob/master/readme.md) first! + label: Is your question not already answered in the FAQ? + description: Please read the [FAQ](https://github.com/vdsm/virtual-dsm/blob/master/readme.md) carefully to avoid asking duplicate questions. + options: + - label: I made sure the question is not listed in the [FAQ](https://github.com/vdsm/virtual-dsm/blob/master/readme.md). + required: true + - type: checkboxes + attributes: + label: Is this a general question and not a technical issue? + description: For technical issues you must use the [bug report](https://github.com/vdsm/virtual-dsm/issues/new?assignees=&labels=bug&projects=&template=BUG_REPORT.yml&title=%5BBug%5D%3A+) form instead. It contains all the right fields (system info, logfiles, etc.) we need in order to be able to help you. + options: + - label: I am sure my question is not about a technical issue. + required: true - type: textarea id: question attributes: diff --git a/readme.md b/readme.md index 8cbf8ffa..7595ee7c 100644 --- a/readme.md +++ b/readme.md @@ -115,8 +115,8 @@ docker run -it --rm --name dsm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMI ```yaml devices: - - /dev/disk/by-uuid/12345-12345-12345-12345-12345:/dev/disk2 - - /dev/disk/by-uuid/45678-45678-45678-45678-45678:/dev/disk3 + - /dev/disk/by-uuid/12345-12345-12345-12345-12345:/disk2 + - /dev/disk/by-uuid/45678-45678-45678-45678-45678:/disk3 ``` Make sure to bind the disk via its UUID (obtainable via `lsblk -o name,uuid`) instead of its name (`/dev/sdc`), to prevent ever binding the wrong disk when the drive letters happen to change. diff --git a/src/disk.sh b/src/disk.sh index f9770df1..d4d6dff0 100644 --- a/src/disk.sh +++ b/src/disk.sh @@ -527,6 +527,11 @@ DISK4_FILE="/storage4/data4" : "${DEVICE3:=""}" : "${DEVICE4:=""}" +[ -z "$DEVICE" ] && [ -b "/disk1" ] && DEVICE="/disk1" +[ -z "$DEVICE2" ] && [ -b "/disk2" ] && DEVICE2="/disk2" +[ -z "$DEVICE3" ] && [ -b "/disk3" ] && DEVICE3="/disk3" +[ -z "$DEVICE4" ] && [ -b "/disk4" ] && DEVICE4="/disk4" + [ -z "$DEVICE" ] && [ -b "/dev/disk1" ] && DEVICE="/dev/disk1" [ -z "$DEVICE2" ] && [ -b "/dev/disk2" ] && DEVICE2="/dev/disk2" [ -z "$DEVICE3" ] && [ -b "/dev/disk3" ] && DEVICE3="/dev/disk3"