• 5

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I attached, formatted, and mounted a persistent storage disk to my google cloud compute VM last week. Saved some work to it, and left for a week. When I returned the disk had been unmounted, and now seems corrupt, how can I recover the data on this corrupt disk?

Some hopefully relevant information:

Machine type: n1-standard-2 (2 vCPUs, 7.5 GB memory)

OS: Ubuntu 16.04

Additional disks: Standard persistent disk, Read/write, Keep disk when deleting instance

$ mount -o discard,defaults /dev/sdb /mnt/disks/data
mount: /dev/sdb: can't read superblock

$ fdisk -l
Disk /dev/sdb: 1000 GiB, 1073741824000 bytes, 2097152000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

$ lsblk
sdb      8:16   0 1000G  0 disk 
sda      8:0    0   10G  0 disk 
??sda1   8:1    0   10G  0 part /

$ fsck.ext4 -v /dev/sdb
e2fsck 1.42.13 (17-May-2015)
/dev/sdb has unsupported feature(s): metadata_csum
e2fsck: Get a newer version of e2fsck!

$ cat /etc/fstab
LABEL=cloudimg-rootfs   /    ext4   defaults    0 0

Thank you for your time!

For anyone running into this later, if you want an older version of Ubuntu, Gcloud may change your additional storage underneath you, in which case, spin up the latest version of OS, recover your data with fsck.ext4 (assuming it is ext4) and get it into google cloud... or out of the system altogether.

  • 0
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags