Skip to content

Commit 1da4504

Browse files
authored
Merge pull request #185 from marcosps/enable-lvm-usage
virtme-init: Enable lvm usage
2 parents cefbab5 + 1107900 commit 1da4504

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

virtme/guest/virtme-init

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ fi
125125
sed -e 's/^\([^:]\+\).*/\1:!:::::::/' < /etc/passwd > /run/tmp/shadow
126126
mount --bind /run/tmp/shadow /etc/shadow &
127127

128+
# The /etc/lvm is usually only read/write by root. In order to allow commands like pvcreate to be
129+
# run on rootless users just create a dummy directory and bind mount it in the same place.
130+
mkdir /run/tmp/lvm
131+
mount --bind /run/tmp/lvm /etc/lvm
132+
128133
# Find udevd
129134
if [[ -x /usr/lib/systemd/systemd-udevd ]]; then
130135
udevd=/usr/lib/systemd/systemd-udevd

virtme_ng_init

0 commit comments

Comments
 (0)