本文介绍了Google计算引擎VM实例:VFS:无法在未知块上挂载根FS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于有一些启动顺序问题,我在Google Compute Engine上的实例无法启动。因此,我创建了另一个实例并重新配置了我的机器。

我的问题:


  1. 网站?

  2. 如何从旧磁盘恢复数据?





$ b [0.348577]密钥类型可信任注册
[0.349232]密钥类型加密注册
[0.349769] AppArmor:启用AppArmor sha1策略散列
[0.350351] ima:找不到TPM芯片,激活TPM绕过!
[0.351070] evm:HMAC attrs:0x1
[0.351549]幻数:11:333:138
[0.352077] block ram3:哈希匹配
[0.352550] rtc_cmos 00: 00:设置系统时钟为2015-12-19 17:06:53 UTC(1450544813)
[0.353492] BIOS EDD设备v0.16 2004年6月25日,0设备找到
[0.354108] EDD信息不可用。
[0.536267]输入:AT Translated Set 2 keyboard as / devices / platform / i8042 / serio0 / input / input2
[0.537862] md:等待所有设备在自动检测之前可用
[ 0.538979] md:如果不使用raid,请使用raid = noautodetect
[0.539969] md:自动侦测RAID阵列。
[0.540699] md:扫描0并添加了0个设备。
[0.541565] md:autorun ...
[0.542093] md:... autorun DONE。
[0.542723] VFS:无法打开根设备sda1或未知块(0,0):错误-6
[0.543731]请附加正确的root =启动选项; (0,0)
[0.546199] CPU:0 PID:1通讯:无法在未知块(0,0)
上挂载root fs:
[0.545011] swapper / 0未被污染3.19.0-39-generic#44〜14.04.1-Ubuntu
[0.547579]硬件名称:Google Google,BIOS Google 01/01/2011
[0.548728] ffffea00008ae140 ffff880024ee7db8 ffffffff817af92b 000000000000111e
[0.549004] ffffffff81a7c7c8 ffff880024ee7e38 ffffffff817a976b ffff880024ee7dd8
[0.549004] ffffffff00000010 ffff880024ee7e48 ffff880024ee7de8 ffff880024ee7e38
[0.549004]呼叫追踪:
[0.549004] [] dump_stack + 0×45/0×57 $ b $ [0.549004] [] mount_root + 0x54 / 0x58
[0.549004] [] prepare_namespace + [0.549004] [] panic + 0xc1 / 0x1f5
[0.549004] [] mount_block_root + 0x210 / 0x2a9
[0.549004] 0x16d / 0x1a6
[0.549004] [] kernel_init_freeable + 0x1f6 / 0x20b
[0.549004] []? initcall_blacklist + 0xc0 / 0xc0
[0.549004] []? 0.564004] [] kernel_init + 0xe / 0xf0
[0.549004] [] ret_from_fork + 0x58 / 0x90
[0.549004] []?rest_init + 0x80 /​​ 0x80
[0.549004] rest_init + 0x80 /​​ 0x80
[0.549004]内核偏移量:0xffffffff81000000(重定位范围:0xffffffff80000000-0xffffffffbfffffff)
[0.549004] --- [end kernel panic - not syncing:VFS:Unable to mount root fs on unknown-block(0,0)



解决方案

我不确定你是怎么陷入这种情况的,但是有额外的信息(见上面我的评论)能够理解是什么触发了这个问题。



附加并挂载磁盘



假设您在删除实例时没有删除原始磁盘,您可以简单地从另一个VM挂载此磁盘以从中读取数据。要做到这一点:




  1. gcloud计算实例detach-disk $ INSTANCE - 设备名称my-new-device



My instance on Google Compute Engine is not booting up due to having some boot order issues.

So, I have created a another instance and re-configured my machine.

My questions:

  1. How can I handle these issues when I host some websites?
  2. How can I recover my data from old disk?

logs


    [    0.348577] Key type trusted registered
    [    0.349232] Key type encrypted registered
    [    0.349769] AppArmor: AppArmor sha1 policy hashing enabled
    [    0.350351] ima: No TPM chip found, activating TPM-bypass!
    [    0.351070] evm: HMAC attrs: 0x1
    [    0.351549]   Magic number: 11:333:138
    [    0.352077] block ram3: hash matches
    [    0.352550] rtc_cmos 00:00: setting system clock to 2015-12-19 17:06:53 UTC (1450544813)
    [    0.353492] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
    [    0.354108] EDD information not available.
    [    0.536267] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2
    [    0.537862] md: Waiting for all devices to be available before autodetect
    [    0.538979] md: If you don't use raid, use raid=noautodetect
    [    0.539969] md: Autodetecting RAID arrays.
    [    0.540699] md: Scanned 0 and added 0 devices.
    [    0.541565] md: autorun ...
    [    0.542093] md: ... autorun DONE.
    [    0.542723] VFS: Cannot open root device "sda1" or unknown-block(0,0): error -6
    [    0.543731] Please append a correct "root=" boot option; here are the available partitions:
    [    0.545011] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [    0.546199] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.0-39-generic #44~14.04.1-Ubuntu
    [    0.547579] Hardware name: Google Google, BIOS Google 01/01/2011
    [    0.548728]  ffffea00008ae140 ffff880024ee7db8 ffffffff817af92b 000000000000111e
    [    0.549004]  ffffffff81a7c7c8 ffff880024ee7e38 ffffffff817a976b ffff880024ee7dd8
    [    0.549004]  ffffffff00000010 ffff880024ee7e48 ffff880024ee7de8 ffff880024ee7e38
    [    0.549004] Call Trace:
    [    0.549004]  [] dump_stack+0x45/0x57
    [    0.549004]  [] panic+0xc1/0x1f5
    [    0.549004]  [] mount_block_root+0x210/0x2a9
    [    0.549004]  [] mount_root+0x54/0x58
    [    0.549004]  [] prepare_namespace+0x16d/0x1a6
    [    0.549004]  [] kernel_init_freeable+0x1f6/0x20b
    [    0.549004]  [] ? initcall_blacklist+0xc0/0xc0
    [    0.549004]  [] ? rest_init+0x80/0x80
    [    0.549004]  [] kernel_init+0xe/0xf0
    [    0.549004]  [] ret_from_fork+0x58/0x90
    [    0.549004]  [] ? rest_init+0x80/0x80
    [    0.549004] Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
    [    0.549004] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


解决方案

I'm not sure how you got into this situation, but it would be nice to have additional information (see my comment above) to be able to understand what triggered this issue.

Attach and mount the disk

Assuming you did not delete the original disk when you deleted the instance, you can simply mount this disk from another VM to read the data from it. To do this:

  1. attach the disk to another VM instance, e.g.,

    gcloud compute instances attach-disk $INSTANCE --disk $DISK

  2. mount the disk:

    sudo mkdir -p /mnt/disks/[MNT_DIR]

    sudo mount [OPTIONS] /dev/disk/by-id/google-[DISK_NAME] /mnt/disks/[MNT_DIR]

    Note: you'll need to substitute appropriate values for:

    • MNT_DIR: directory
    • OPTIONS: options appropriate for your disk and filesystem
    • DISK_NAME: the id of the disk after you attach it to the VM

Unmounting and detaching the disk

When you are done using the disk, reverse the steps:

Note: Before you detach a non-root disk, unmount the disk first. Detaching a mounted disk might result in incomplete I/O operation and data corruption.

  1. unmount the disk

    sudo umount /dev/disk/by-id/google-[DISK_NAME]

  2. detach the disk from the VM:

    gcloud compute instances detach-disk $INSTANCE --device-name my-new-device

这篇关于Google计算引擎VM实例:VFS:无法在未知块上挂载根FS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 11:37