[need help] how to restore domain: untrusted, work, vault, personal?

56 views
Skip to first unread message

x99n...@gmail.com

unread,
Aug 3, 2018, 4:28:13 AM8/3/18
to qubes-users
Hi all.

I want to "grow down" private storage max size "untrusted" (switch back from 6048MiB to 2048MiB)

Ok. Let's start

qvm-volume info untrusted:private
lvresize -L2G /dev/qubes_dom0/vm-untrusted-private

It's done and qubes-manager (basic tab) show me that private storage max size changed to 2048M.

Ok, now i'am start untrusted domain

qvm-start -a untrusted gnome-terminal

Domain started, but nothing happens.
What i do wrong? What happened with "Untrusted" domain qube?
How to restore "Untrusted" domain ?

Thanks. Also attached pic's related.

screenshot2.png
Screenshot.png

Unman

unread,
Aug 3, 2018, 7:05:48 AM8/3/18
to x99n...@gmail.com, qubes-users
After you have run that command what does "qvm-ls untrusted" show?
(Incidentally, pics are no use for some readers so please summarise any error
messages. )

I'm not sure what you expect to happen in this case.
Have you tried using qvm-run rather than qvm-start? If that was a typo,
(and I guess it was) then you should be aware that you cant start
gnome-terminal like that. Try "qvm-run -a untrusted xterm"


unman

Ivan Mitev

unread,
Aug 3, 2018, 8:27:00 AM8/3/18
to qubes...@googlegroups.com
Hi,

On 08/03/2018 11:28 AM, x99n...@gmail.com wrote:
> Hi all.
>
> I want to "grow down" private storage max size "untrusted" (switch back from 6048MiB to 2048MiB)
>
> Ok. Let's start
>
> qvm-volume info untrusted:private
> lvresize -L2G /dev/qubes_dom0/vm-untrusted-private
>
> It's done and qubes-manager (basic tab) show me that private storage max size changed to 2048M.
>
> Ok, now i'am start untrusted domain
>
> qvm-start -a untrusted gnome-terminal
>
> Domain started, but nothing happens.
> What i do wrong? What happened with "Untrusted" domain qube?

Shrinking a volume is not a trivial thing to do.

You should have first resized (shrinked) the filesystem itself, and then
resized the underlying volume. Data loss aside, you now have a broken
filesystem which is likely why you can't start your VM.

The following page shows how it is done for Linux VMs:

https://github.com/Qubes-Community/Contents/blob/master/docs/configuration/shrink-volumes.md


> How to restore "Untrusted" domain ?

- Did you do a backup with qvm-backup ? if yes, restore with
qvm-backup-restore
- Did you clone the vm ? if yes, delete (or rename) the broken vm and
clone/rename the original, backuped vm

However since you're asking, I guess that you don't have any backups.
The probability that you lost data is ~100%, your best bet now is to
attach your untrusted VM's private volume to another VM (see the link
above for how to do that), run e2fsck, and hope that your important data
was at the beginning of the volume (by running lvresize -L2G on a 6G
volume, you trashed 2/3rd of the virtual disk without any easy way of
recovering it).

Unman

unread,
Aug 3, 2018, 1:33:08 PM8/3/18
to iv...@maa.bz, qubes...@googlegroups.com
I rate the probability of recovering data without a backup somewhat
higher, depending on what OP has done in the meantime.

Kill all other qubes.
Kill the qube, and then take a copy of the
underlying storage, using dd, to an external device if possible.
Set netvm of untrusted to none.
Then restore the volume size to 6048.
Start untrusted.

I'm assuming that data occupied less than 2G in /home/user, or what was
the point in resizing.
If you are lucky, the qube will start and mount /dev/xvdb
If you're unlucky then you will at least be able to get root access to
the qube and you should be able to use standard recovery processes to
recover at least some files from xvdb.

When you are happy, shutdown, take a backup and resize the disk the *right* way.
(I admire your boldness in ignoring the hefty warning about data loss.)

unman

Reply all
Reply to author
Forward
0 new messages