Skip to content

Commit

Permalink
fix: Additional pass-through mounts (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese committed May 8, 2024
1 parent 1f51974 commit c86408c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
16 changes: 13 additions & 3 deletions .github/ISSUE_TEMPLATE/QUESTION.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions src/disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c86408c

Please sign in to comment.