Re: [qubes-users] How to sync files from a file as block device attached to another qube?

2019-06-03 Thread David Hobach

On 6/2/19 6:03 PM, 'SideRealiq' via qubes-users wrote:

If I create a loopback device in vm1 and attach it to vm2, any changes in vm1 
device are not reflected in the attached vm2 device. Why is that and how can 
they be reflected/synced?

Here is my test code:
# in vm1
sudo losetup -f --show ~/loopfile.img
## result: /dev/loop2
sudo mkdir /mnt/loopmnt

# in vm2
sudo mkdir /mnt/loopmnt

# in dom0
qvm-block
## result: vm1:loop2 /home/user/loopfile.img

qvm-block attach vm2 vm1:loop2
qvm-block
## result: vm1:loop2 /home/user/loopfile.img  b(frontend-dev=xvdi, read-only=no)

qvm-run -u root -p vm1 'mount /dev/loop2 /mnt/loopmnt'
qvm-run -u root -p vm2 'mount /dev/loop2 /mnt/loopmnt'

# in vm1
cd /mnt/loopmnt
# create a new file and verify it is there

# in vm2
ls -al /mnt/loopmnt
# the changes from vm1 are not reflected.


As I've said in the other thread:

Mounting the same device two times in different VMs is a bad thing to do 
as it'll not work in the best case (apparently above) and result in data 
corruption in the worst.


One device should only be mounted inside a single VM unless it's some 
special networking file system (e.g. nfs), but even then it's not meant 
to be used with qvm-block, but over the network...


--
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 post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/ab57a3fb-ab44-6d1b-c5be-54b3fed5b8c7%40hackingthe.net.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: S/MIME Cryptographic Signature


[qubes-users] How to sync files from a file as block device attached to another qube?

2019-06-02 Thread 'SideRealiq' via qubes-users
If I create a loopback device in vm1 and attach it to vm2, any changes in vm1 
device are not reflected in the attached vm2 device. Why is that and how can 
they be reflected/synced?

Here is my test code:
# in vm1
sudo losetup -f --show ~/loopfile.img
## result: /dev/loop2
sudo mkdir /mnt/loopmnt

# in vm2
sudo mkdir /mnt/loopmnt

# in dom0
qvm-block
## result: vm1:loop2 /home/user/loopfile.img

qvm-block attach vm2 vm1:loop2
qvm-block
## result: vm1:loop2 /home/user/loopfile.img  b(frontend-dev=xvdi, read-only=no)

qvm-run -u root -p vm1 'mount /dev/loop2 /mnt/loopmnt'
qvm-run -u root -p vm2 'mount /dev/loop2 /mnt/loopmnt'

# in vm1
cd /mnt/loopmnt
# create a new file and verify it is there

# in vm2
ls -al /mnt/loopmnt
# the changes from vm1 are not reflected.

-- 
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 post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/181919757.99537.1559491395496%40ichabod.co-bxl.
For more options, visit https://groups.google.com/d/optout.