Using Qubes R4.1rc2
Short question: I deleted a qube, I have found the LV name and id… now what? How do I recover that LV?
/etc/lvm/archive/ I learn:
vm-torrent-private (id = "guFjyr-eQmg-Tgc6-SkW0-IKSj-Txkg-csWAhe" and origin = "vm-a-private-1640554227-back") vm-torrent-private-1640554227-back (id = "rqrNkV-IjcM-EhOA-uXH7-olnD-mGfU-IkfhVB" and origin = "vm-a-private-1640553553-back") vm-torrent-private-1640553553-back (id = "tChIpl-42Un-siVi-Z2YV-RJoY-ZkRl-M8p1Rr")
Before my external disk chrashed, I moved the payload to that external disk, so “
vm-torrent-private” contains the “move-action”
I suspect the payload to reside in mostly “
vm-torrent-private-1640553553-back” and a little bit in “
How do I recover these two LV’s so I can recover the data?
I tried this method (dry-test only) but failed: Recover a deleted Logical Volume in LVM | 1 Quick guide
Anything else I could try?
What happened (the long version)
I wanted to install NVIDIA drivers, and latest kernel and in general learn about the process.
Before I began, I took a full backup of every qube I had.
But since I had 2 big qubes: youtube-dl and torrent, I moved all the content to the external hdd.
I wanted to keep youtube-dl, which now only contains my download-scripts
I deleted my torrent qube as I wanted too start a new one
So I backed up everything, except for my torrent qube as I deleted it.
Then I played around with the kernel, and nvidia drivers, and some other things, all while my external hdd was still connected so I could manually copy all changes I wanted to keep to that drive.
Then my external hdd fell onto the ground, from about a meter high… while spinning.
I reconnect it, and it did not pop up in the “Data (Block) Devices”, but was in the “USB Devices” only.
I decided to reboot in a xubuntu LiveUSB to have more direct access to the disk… but no luck. disk appears while making weird noice, then disappears.
I grabbed my screw drivers and opened the drive up, and the heads were stuck firmly onto the platters. I had a lot of trouble removing the heads! But once done… the platters spinned again, and the heads moved. But still can’t access data.
Tried to reboot in Qubes… failed a couple times. It took me a long time before I was able to boot qubes again and the error-messages during boot are long, so once I was able to boot I gladly took a backup of all my qubes again! However, the data of youtube-dl and torrent were “moved”, and the torrent qube deleted.
This post is to ask if anyone has an idea how (if possible) I could recover my torrent-qube, and to explain how I recovered 200+Gb from my youtube-dl qube, in case someone has the same problem:
Qubes uses snapshots, and standard it uses 2 off them (“revisions_to_keep=2”)
Since I didn’t want to mess inside Qubes fearing to make even more of a mess, I booted using a xubuntu LiveUSB again, there I unencrypted the luks container, and wait until ubuntu was ready auto-mounting all LV’s (grab a coffee… have lunch… )
Once finished look at the mount-points
$ mount > mount.txt # or
$ mount | grep qube-name-to-recover
/dev/mapper/VolGroup0-vm--youtube--dl--new--private on /media/xubuntu/061eff5b-420c-4c87-b0ff-46ceb0e2981f type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2) /dev/mapper/VolGroup0-vm--youtube--dl--new--private--1640558526--back on /media/xubuntu/061eff5b-420c-4c87-b0ff-46ceb0e2981f1 type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2) /dev/mapper/VolGroup0-vm--youtube--dl--new--private--1640558161--back on /media/xubuntu/061eff5b-420c-4c87-b0ff-46ceb0e2981f2 type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2)
=> if you have “revisions_to_keep=2”, then you have 3 folders with a name like:
/media/xubuntu/061eff5b-420c-4c87-b0ff-46ceb0e2981f /media/xubuntu/061eff5b-420c-4c87-b0ff-46ceb0e2981f1 /media/xubuntu/061eff5b-420c-4c87-b0ff-46ceb0e2981f2
Copy the data you need somewhere else.
It would be nice if I could recover my torrent-qube, but not a disaster if I can’t. Loosing the data from my WD-5Tb is more painful :-s Tips on recovering that one are welcome too (tips that cost time and not too much money (buying another WD-5Tb disk, voiding the warranty and replacing the heads is an option I’m probably not willing to try…)
Anyway… note to self: don’t drop your hard drive while it’s spinning! (erghm… I mean… don’t drop your hard drive period!). (and back really important data on multiple backup disks)