SSH+HDD setup

129 views
Skip to first unread message

Vít Šesták

unread,
May 5, 2015, 9:00:20 AM5/5/15
to qubes...@googlegroups.com
Hello,
I'd like to ask some questions about SSD+HDD setup. I've a small 120GB SSD and a large enough HDD. Most of my data can be stored on the SSD, but some large and not-so-frequently-used data are on my HDD.

My Ubuntu setup is a manual mix of SSD and HDD, some things are hacked by symlinks, so some walkthrough can cause switching between SSD and HDD. (Well, not so often.) Most of the time, the HDD is just off.

My idea: SSD is small but has fast random I/O, so using img files (and potentially LVM, although I don't see any advantage there) is just a minor overhead, but it brings advantage in space used. The HDD is the opposite case: The space overhead is acceptable cost for reducing indirection and seeks (i.e. random I/O) caused by that.

What I try to solve:

0. SOLVED: Moving a single img to another drive seems to be easy: https://groups.google.com/forum/#!searchin/qubes-users/SSd$20HDD/qubes-users/nDrOM7dzLNE/jIXjHCXOZT8J

1. Can I create an encrypted partition on my HDD and let Qubes to handle it, i.e. create the corresponding /dev/dm-* on boot? I thought this one is easy, but failed to do so. I tried just adding the following item in /dev/crypttab:

luks-12345678-9abc-def0-1234-56789abcdef0 UUID=12345678-9abc-def0-1234-56789abcdef0 none

It just caused hanging on boot when some tasks were doing something with the device: https://gist.github.com/v6ak/eb95b59054e91faad7ce

2. When #1 is solved, can I somehow automatically mount the /dev/dm-luks-12345678-9abc-def0-1234-56789abcdef0 device to /home/user in a particular AppVM?

3. Can I somehow configure two virtual block devices or auto-attach two of them? I've tried to edit /var/lib/qubes/appvms/appvm-name/appvm-name.conf and attach a block device to the machine, but it was automaticlaly removed from the config file.

Regards,
Vít Šesták

Vít Šesták

unread,
May 6, 2015, 9:24:45 AM5/6/15
to qubes...@googlegroups.com
1. Solved. I have to add it also to grub parameters... That is to edit /etc/default/grub and run sudo grub2-mkconfig -o /boot/grub2/grub.cfg

2. Yes I can!. I've adjusted permissions for /dev/dm-something, but that might be redundant.

3. This question remains. I sill don't know how to mix SSD + HDD within one VM. Can I attach a second drive automatically?

Regards,
Vit Sestak 'v6ak'

Marek Marczykowski-Górecki

unread,
May 6, 2015, 3:21:09 PM5/6/15
to Vít Šesták, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, May 06, 2015 at 06:24:45AM -0700, Vít Šesták wrote:
> 1. Solved. I have to add it also to grub parameters... That is to edit
> /etc/default/grub and run sudo grub2-mkconfig -o /boot/grub2/grub.cfg
>
> 2. Yes I can!. I've adjusted permissions for /dev/dm-something, but that
> might be redundant.
>
> 3. This question remains. I sill don't know how to mix SSD + HDD within one
> VM. Can I attach a second drive automatically?

Currently not, at least not easily. Qubes tools does not support
automatic attaching additional drive at VM startup(*). The VM config
file is automatically regenerated at each startup. You can copy this
file, edit it and pass it to qvm-start --custom-config=, but you need to
do this at each VM startup (normal qvm-start, or starting VM from
menu/Qubes Manager will not use your config). As you'll need custom
VM startup command, you can just create simple script with two lines:
qvm-start ...
qvm-block ...
And use instead of normal qvm-start/whatever.

(*) Actually it is possible to have such drive for HVMs. But not normal
AppVMs (PV). This is silly limitation, I know... I though there was a
ticket for it on github issues, but can't find one now - maybe you want
to create it there?
- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVSmmcAAoJENuP0xzK19csXdQH/1fc7Kzo7EidYeY0y5ZHWjPD
Ny/aO4+oO+rkFsl/oCwJXMmU+LWdMld64GMCHOid82rIaCRmEYA7NA0UDPv1qBYQ
ItQ8SkSUErHscJlysvsKVoty7at9UWA/LcdYrr5TEhrlvTx+tOwLHi/QJKSlPnYN
XUdoAAPKYxeVwSm4BHmCA8UxCJHIDiN7OfBeGHqHKEjx6F/rdiU8bTKK0kEo90A8
XOzKk0AgjmduFyDauE/1YCyotGR4lF7HcMDnOuhyGfWu368KREqwVsKqnsBMA5wF
oEAwcTBo7nOzParKgMyxLkq6BpT2AcZrKBhM3MukTzkVKj3f2I4kvS+uZYwpecw=
=cCZF
-----END PGP SIGNATURE-----

Vít Šesták

unread,
May 7, 2015, 7:11:52 AM5/7/15
to qubes...@googlegroups.com, groups-no-private-mail--con...@v6ak.com
OK, added: https://github.com/QubesOS/qubes-issues/issues/992

Maybe this is not possible for AppVMs because there would be some additional tuning (e.g. fstab) needed unless it is a sntandalone VM.

Regards,
Vít Šesták 'v6ak'
Reply all
Reply to author
Forward
0 new messages