> On 28 Apr 2018, at 13:37, Mark Raynsford 
> <list+org.freebsd.virtualizat...@io7m.com> wrote:
> 
> On 2018-04-28T09:08:42 +0300
> Daniel Braniss <da...@cs.huji.ac.il> wrote:
> 
>> since the clients and the server are sharing the zfs volume,
>> I’m doing the following:
>> on the server I did:
>>      zfs create -sV 4G h/root.ro <http://root.ro/>
>>      newfs /dev/zvol/h/root.ro <http://root.ro/>
>>      mount /dev/zol/h/root.ro <http://root.ro/> /mnt
>>      copy a working root image to it.
>>        umount /mnt
>>      the clients then mount it as ro,
>>      the vm conflg file has:
>>              disk0_type=virtio-blk”
>>              disk0_name=“/dev/zvol/h/root.ro <http://root.ro/>”
>>              disk0_dev=“custom”
>> 
>> one solution to the fact that the root is read-only is to use unionfs 
>> (probably nullfs will do too)
>> 
>> the only problem I have is updating the image.
> 
> Wow, didn't know this was possible. Is this safe? Two essentially
> independent operating system instances being able to write to the same
> zvol?

that’s why it’s mounted rear-only in the client!
each client can get another vol for writing, ie /var
if you want to have ‘permanent’ changes that will survive reboots.

updating on the server is possible, but
        1- the changes might not be seen by the client
        2- opened files will have issues

btw, point 2 is also true for NFS.

danny

> 
> -- 
> Mark Raynsford | http://www.io7m.com
> 

_______________________________________________
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"

Reply via email to