On Fri, Aug 03, 2018 at 03:28:13PM +0300, Ivan Mitev wrote: > Hi, > > On 08/03/2018 11:28 AM, [email protected] 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). > > > > > > Thanks. Also attached pic's related. > > >
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 -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/20180803173306.xxcmgljl5mqivoi5%40thirdeyesecurity.org. For more options, visit https://groups.google.com/d/optout.
