Reputation: 191
I am using Google Compute Engine in Europe and the maintenance window just hit us. The "automatic migration" didn't work, so all of our servers are offline. During the recovery from backup, we found a few files missing.
I have a persistent boot disk created from the debian-7-wheezy-v20130617 image with data, which I am trying to access.
I came up with 2 possible solutions to access the data:
Create a new VM with the old bootdisk. Sounds easy, but Google changed something and the VM won't boot.
Create a new VM with a new image and attach the old bootdisk. Sounds easy, but the old disk is not recognized using good old safe_format_and_mount
.
Any ideas how to access the data from the disk? The migration doc didn't really help, it seems they assume you always have the old VM with the old disk still running.
Upvotes: 2
Views: 447
Reputation: 3714
As your disks were created before the migration to the current v1 API, before you can re-attach the disk to a new instance, you must upgrade the disk to use an embedded kernel.
Upvotes: 1
Reputation: 191
Finally figured out how to access the data on old disks in a new VM.
ls -la /dev/sd*
. "sda" is boot, the others attached.brw-rw---T 1 root disk 8, 0 Jan 22 11:18 /dev/sda
brw-rw---T 1 root disk 8, 1 Jan 22 11:18 /dev/sda1
brw-rw---T 1 root disk 8, 16 Jan 22 11:18 /dev/sdb
brw-rw---T 1 root disk 8, 17 Jan 22 11:18 /dev/sdb1
brw-rw---T 1 root disk 8, 32 Jan 22 11:49 /dev/sdc
brw-rw---T 1 root disk 8, 33 Jan 22 11:49 /dev/sdc1
4 Create mount point mkdir /mnt/disk_b
and mount disk partition mount /dev/sdb1 /mnt/disk_b
.
mount: block device /dev/sdb1 is write-protected, mounting read-only
5 Check your data ls -la /mnt/disk_b
Upvotes: 0