I have a 300gb drive image I mount on whichever machine I want to put common 
things...pictures/documents/etc...and this happens:

Here is my mount scrip..{/mnt/2tb is the mount point for my 2 terrabyte drive}

==============
[admin@dom0 ~]$ cat bin/mount300g.sh
if [ A${1} == A ] 
then VM=untrusted
else VM=${1}
fi
MOUNTED=`qvm-block|grep 300g.img|wc -l`
if [ ${MOUNTED} == 1 ]
then
        ONVM=`qvm-block|grep 300g.img|awk '{print $3}'`
        echo Already Mounted on ${ONVM}
        exit 0
fi
sudo losetup -f /mnt/2tb/300g.img
LOOPDEV=`losetup --list | grep -F 300g.img|awk '{print $1}'|awk -F/ '{print 
$3}'`
qvm-block attach ${VM} dom0:${LOOPDEV}
VMDEV=`qvm-block|grep 300g.img|awk -Fxvd '{print "xvd" substr($2,1,1)}'`
echo Mounted on ${VM} as ${VMDEV}
qvm-run -p ${VM} 'sudo mount -a'
==============


And here is what happens on a freshly opened dom0 command window...

==============
[admin@dom0 ~]$ mount300g.sh untrusted
qvm-block: error: backend vm 'dom0' doesn't expose device 'loop21'
Mounted on untrusted as
mount: /home/user/300g: can't find UUID="b7a87607-d757-41f8-95fe-408268f3b62b".
==============

So, I remove it by dropping the mount with losetup...

Then I issue a "cd" command, which does nothing since I'm still at the home 
directory...

Then I re-try the mount, and it succeeds...

==============
[admin@dom0 ~]$ mount300g.sh untrusted
Mounted on untrusted as xvdi
==============

Two questions:

1. What sort of half-done edit is this nonesense?  It is embarrassing.

2. What exactly is trying to be controlled by restricting the exposure of loop 
devices to manual mounting anyway?  My machine, and I'll mount what I want 
where I want.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20200301064814.68852c99%40gmail.com.

Reply via email to