storage occupancy on qubes os

303 views
Skip to first unread message

evo

unread,
Mar 9, 2017, 5:57:48 PM3/9/17
to qubes-users
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!

Chris Laprise

unread,
Mar 9, 2017, 6:40:21 PM3/9/17
to evo, qubes-users
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.

--

Chris Laprise, tas...@openmailbox.org
https://twitter.com/ttaskett

evo

unread,
Mar 9, 2017, 7:03:52 PM3/9/17
to Chris Laprise, qubes-users
ah, ok, thanks!
so i understand a little bit more of it.

Unman

unread,
Mar 9, 2017, 9:38:21 PM3/9/17
to Chris Laprise, evo, qubes-users
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

evo

unread,
Mar 10, 2017, 4:17:26 AM3/10/17
to Unman, Chris Laprise, qubes-users
thanks, i will work through it next days, but i think its not a big
problem, to mount the SSD every time with just one klick.

decuser

unread,
Mar 10, 2017, 10:45:14 AM3/10/17
to qubes-users, tas...@openmailbox.org, evol...@aliaks.de, un...@thirdeyesecurity.org

This works, but is there a way to get qubes to use the custom config rather than its default when rebooting qubes and autostarting the VM (or in the gui)?

Thanks,
Will

Ted Brenner

unread,
Mar 10, 2017, 11:08:50 AM3/10/17
to decuser, qubes-users, Chris Laprise, evol...@aliaks.de, Unman
We should really add a page in the docs for how to automatically add a disk to a qube on boot. I know this was something I struggled with and there have been multiple threads on this list asking the same question.


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to qubes...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/2a198845-3630-47e7-9a6f-6d15f9bd1b0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Sent from my Desktop

Chris Laprise

unread,
Mar 10, 2017, 3:00:54 PM3/10/17
to Unman, evo, qubes-users
On 03/09/2017 09:38 PM, Unman wrote:
> 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.

The gist of my statement is there's no simple, permanent setting for
additional volumes. Your example still requires either a script or
issuing a command manually.

Its probably more manageable to simply issue 'qvm-start && qvm-attach &&
qvm-run "mount"' than to have an unmanaged .conf file laying around
(these are supposed to be generated at VM startup, and user may forget
the alternate conf won't respond to normal settings changes).

evo

unread,
Mar 10, 2017, 6:14:22 PM3/10/17
to Ted Brenner, decuser, qubes-users, Chris Laprise, Unman
> send an email to qubes-users...@googlegroups.com
> <mailto:qubes-users%2Bunsu...@googlegroups.com>.
> To post to this group, send email to qubes...@googlegroups.com
> <mailto:qubes...@googlegroups.com>.
> <https://groups.google.com/d/msgid/qubes-users/2a198845-3630-47e7-9a6f-6d15f9bd1b0f%40googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
>
>
> --
> Sent from my Desktop


this would be a great idea, to add a doc-page about storage occupancy
under qubes and about adding new drives!

Eva Star

unread,
Mar 10, 2017, 6:25:22 PM3/10/17
to qubes...@googlegroups.com
On dom0 terminal you can see actual used space by all VMs.
cd /var/lib/qubes/vm-templates/
du -hcd

https://i.imgur.com/rsOCM0G.png

You can attach any media if need at Qubes Manager -> Right Click ->
Attach Block Device.

--
Regards

cooloutac

unread,
Mar 10, 2017, 8:43:38 PM3/10/17
to qubes-users, eva...@openmailbox.org

another command is qvm-ls -d

Reply all
Reply to author
Forward
0 new messages