PANIC!!! data panic (disc full) / want to mount nas with nfs and backup all in /var/lib/cubes

70 views
Skip to first unread message

ludwig jaffe

unread,
Jan 28, 2018, 12:26:44 PM1/28/18
to qubes-users
Hi some systems got too big and now my dom0 is full.

data panic (disc full) / want to mount nas with nfs and backup all in /var/lib/cubes

In a normal system I would setup an insulated air gap network and take a big nas server mount nfs to the root-fs of dom0 and say as root cp -a /var/lib/cubes /net/nas/bck.
And then I would clean up and remove some VMs with rm -rf as I could undo it when I got the VMs booted and cleaned of all the shit that got downloaded.

Now I can not connect the dom0 to a nic.
Is there a trick to do it?
booting a rescue linux from a stick would be a way but I first want to try
using qubes-os and changing a thing in the configs.

Thanks for your help.

awokd

unread,
Jan 28, 2018, 2:42:17 PM1/28/18
to ludwig jaffe, qubes-users
4.0? I think the "Qubes way" would be to boot from your install media,
pick Rescue mode, and get enough free space to be able to boot the full
system. 3.2 I guess you'd have to use a live image; can't remember if
there's a rescue mode.

I honestly can't tell you how you'd go about attaching a NIC to dom0. USB
might be an easier choice, but same there- not something I've ever looked
into!

ludwig jaffe

unread,
Jan 28, 2018, 3:09:36 PM1/28/18
to aw...@danwin1210.me, qubes-users
it is qubes 3.2

Now I found a way:
I booted kali from usb stick,
then I did
cryptsetup  luksOpen /dev/sda3  green
and mount /dev/dm-blabla  /mnt/8

also I mounted my nas to nfs (no file security) in air gapped network
mount 192.0.123:/bigsasdrives/bakup /net/nas
and copied /var/lib/cubes to it
cp -av /var/lib/qubes /net/nas

this is running.

The disk to full problem is found:
I went to
/var/lib/qubes/personal
said file private.img
and file was so nice to tell me that private.img needs fsck.

but as there is important data on this private.img,
I first copy it to the nas and then say e2fsck private.img

So this a way to repair your cubes without using the idiotic
tools of qubes :-)


ludwig jaffe

unread,
Jan 28, 2018, 3:12:47 PM1/28/18
to aw...@danwin1210.me, qubes-users
private.img is too big, the file system says its really big but it can not
be that big. I guess 4x of the size it should have as I feel it.
But I back it up to my big nas and then I say fsck.ext2 just to be sure
not to loose a thing.

ludwig jaffe

unread,
Jan 29, 2018, 6:57:30 AM1/29/18
to qubes-users

Now I fixed nearly all.
I did as follows:
boot kali-linux (or some other linux with enough tools -> Kali)
from usb stick

cryptsetup luksOpen /dev/sda3 green sda was the disk with the system and sda3 holds the encrypted qubes-os installation.

and mount /dev/dm-blabla /mnt/8 (I have always mount points /mnt/{0-9} ready)

also I mounted my nas to nfs (no file security) in air gapped network
mount 192.0.123:/bigsasdrives/bakup /net/nas
and copied /var/lib/cubes to it
cp -av /var/lib/qubes /net/nas

this is running.

The disk to full problem is found:
I went to
/var/lib/qubes/personal
said file private.img
and file was so nice to tell me that private.img needs fsck.

but as there is important data on this private.img,
I first copy it to the nas and then say e2fsck private.img

so after back-up of the important stuff, i said e2fsck -f private.img
for all the app-vms and service-vms in the directory structure of
/var/lib/qubes/

then I went to the vms like
cd /var/lib/qubes/appvms/banking1
said
mount -o loop,ro,noatime private.img /mnt/9
and I copied the important stuff here to the encrypted nas

in /var/lib/qubes/appvms/personal
I also copied the important stuff to the encrypted nas, and then I
deleted all the bloody videos I downloaded from the private.img in
personal and there is now room on the disk.

Videos are to be watched from nas from now on :-)

--
Only one Problem remains:
The Qubes-VM-Manager only shows running VMs and not all the VMs that are
there, but from the menue button one can start the shells of these VMs,
which causes the vms to be started.

Also I can not change the disk size of private.img in the shutdown
personal vm. And maybe others.

How to fix qubes vm manager?!

Reply all
Reply to author
Forward
0 new messages