On Thu, Mar 09, 2017 at 06:40:15PM -0500, Chris Laprise wrote:
> On 03/09/2017 05:57 PM, evo wrote:
> >Hey!
> >
> >the last question for today! :D
> >qubes is really great, but i want to understand some things, that are
> >new for me.
> >
> >i don't understand the storage occupancy in Qubes OS.
> >
> >I can give the home-folder more space, but where can i understand how
> >much space i have already used? where can i see the whole storage usage?
> >
> >and how can i add new SSD to the special VM (for example "work")?
> >
> >thanks for help!
> >
> 
> When you expand an appVM's storage, you're really changing the maximum
> limit. The space isn't allocated from dom0 storage until its used (and
> deletions will cause the space to be returned to dom0).
> 
> Normal space reporting tools for Linux will show you the overall space and
> usage in dom0. For instance, I use the KDE disk space widget on my desktop.
> 
> You can attach additional storage to a VM by right-clicking on it in Qubes
> Manager and using the attach/detach menu. Or you can use 'qvm-block' command
> in dom0. Unfortunately, Qubes doesn't have a way to permanently attach
> additional volumes to template-based VMs, so this always has to be done
> manually or via a udev script, etc.
> 

This isn't true - it's pretty straightforward to add volumes at boot, and
it can be done automatically.

Let's say you want to add /dev/sda4 to work, and mount it at
/home/user/sda4. (It's ext4)

In dom0 look at the config files in /var/lib/qubes/appvms/work.
copy work.conf to work2.conf
edit work2.conf and add a stanza in the "devices" section

<disk type='block' device='disk'>
<driver name='phy' />
<source dev='/dev/sda4' />
<target dev='xvde' bus='xen' />
</disk>

That's enough to attach the device to the qube.
If you also want to have it mounted automatically you have to do some
configuration in the qube.
Start up the work qube, and create a file /rw/config/fstab
containing:
/dev/xvde       /home/user/disk ext4 defaults,noatime   0 0

And then in /rw/config/rc.local add line:
cat /rw/config/fstab >> /etc/fstab
mount -a

Remember to chmod +x /rw/config/rc.local

Shutdown work

Now start work with the custom config -
qvm-start work --custom-config=/var/lib/qubes/appvms/work/work2.conf

work will start up with the drive attached and it will be mounted
automatically.

This is somewhat clunky - Qubes 4 will have better support for loading
custom configs. But configure a keyboard shortcut to that "qvm-start"
command and it's easy to work with.

Note that if you start work without the custom config it will start as
normal without the volume attached. This may be desirable at times.
If you want the menu items to start with the custom configs you'll have
to do some editing of the relevant files: again, that's fairly
standard stuff.

unman

-- 
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/20170310023819.GA13357%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to