Amazon-Ec2
無法在 AWS 上掛載現有 EBS
我嘗試將現有的 EBS 儲存**(有數據)**安裝到一個實例,但它一直拋出這個錯誤。
mount: wrong fs type, bad option, bad superblock on /dev/xvdf, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.
儲存細節如下:
ec2-user@ip ~]$ sudo parted -l Model: Xen Virtual Block Device (xvd) Disk /dev/xvda: 8590MB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 128 1049kB 2097kB 1049kB BIOS Boot Partition bios_grub 1 2097kB 8590MB 8588MB ext4 Linux Model: Xen Virtual Block Device (xvd) Disk /dev/xvdf: 16.1GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 128 1049kB 2097kB 1049kB BIOS Boot Partition bios_grub 1 2097kB 16.1GB 16.1GB ext4 Linux
dmesg | tail 顯示以下詳細資訊
[ec2-user@ip- ~]$ dmesg | tail [ 2.593163] piix4_smbus 0000:00:01.3: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr [ 2.625565] evbug: Connected device: input0 (AT Translated Set 2 keyboard at isa0060/serio0/input0) [ 2.625568] evbug: Connected device: input2 (Power Button at LNXPWRBN/button/input0) [ 2.625570] evbug: Connected device: input3 (Sleep Button at LNXSLPBN/button/input0) [ 3.657958] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input4 [ 3.664979] evbug: Connected device: input4 (ImExPS/2 Generic Explorer Mouse at isa0060/serio1/input0) [ 5.731219] EXT4-fs (xvda1): re-mounted. Opts: (null) [ 5.938276] NET: Registered protocol family 10 [ 11.720921] audit: type=1305 audit(1412199137.191:2): audit_pid=2080 old=0 auid=4294967295 ses=4294967295 res=1 [ 101.024164] EXT4-fs (xvdf): VFS: Can't find ext4 filesystem [ec2-user@ip- ~]$
看起來您已經對該塊設備進行了分區。在這種情況下,您需要安裝
/dev/xvdf1
,而不僅僅是/dev/xvdf
。
對我來說,有一些神秘的文件導致了這個問題。
對我來說,我必須使用以下命令清除目錄。
sudo mkfs -t ext3 /dev/sdf
警告:這可能會刪除您保存的文件。因此,您可以執行
ls
以確保不會失去重要的已保存文件