我有一个可怕的情况,我必须在救援的Debian Linux中从损坏的RAID系统中恢复数据。我只想以只读方式将它们全部挂载到/ mnt / rescue,以便能够将VMWare GSX映像复制到另一台计算机上,并稍后将它们迁移到ESXi。相关命令的输出如下。

fdisk -l

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes

255 heads, 63 sectors/track, 182401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0005e687

Device Boot Start End Blocks Id System

/dev/sda1 1 523 4200997 fd Linux raid autodetect

/dev/sda2 524 785 2104515 fd Linux raid autodetect

/dev/sda3 786 182401 1458830520 fd Linux raid autodetect

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes

255 heads, 63 sectors/track, 182401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00014fc7

Device Boot Start End Blocks Id System

/dev/sdb1 1 523 4200997 fd Linux raid autodetect

/dev/sdb2 524 785 2104515 fd Linux raid autodetect

/dev/sdb3 786 182401 1458830520 fd Linux raid autodetect

Disk /dev/md0: 4301 MB, 4301717504 bytes

2 heads, 4 sectors/track, 1050224 cylinders

Units = cylinders of 8 * 512 = 4096 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 2154 MB, 2154954752 bytes

2 heads, 4 sectors/track, 526112 cylinders

Units = cylinders of 8 * 512 = 4096 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table

我试图按以下方式安装磁盘。

mount -o ro /dev/sda1 /mnt/rescue

然后我得到以下错误。

mount: unknown filesystem type 'linux_raid_member'

猜测文件系统也不顺利。

mount -o ro -t ext3 /dev/sda1 /mnt/rescue/

mount: /dev/sda1 already mounted or /mnt/rescue/ busy

因此,我尝试如下创建虚拟设备。

mdadm -A -R /dev/md9 /dev/sda1

这将导致以下消息。

mdadm: cannot open device /dev/sda1: Device or resource busy

mdadm: /dev/sda1 has no superblock - assembly aborted

现在我迷路了,我不知道如何恢复磁盘并取回数据。以下是所有3个磁盘的mda --examine输出(我认为应该是3x raid1磁盘)。

/ dev / sda1:

Magic : a92b4efc

Version : 0.90.00

UUID : 6708215c:6bfe075b:776c2c25:004bd7b2 (local to host rescue)

Creation Time : Mon Aug 31 17:18:11 2009

Raid Level : raid1

Used Dev Size : 4200896 (4.01 GiB 4.30 GB)

Array Size : 4200896 (4.01 GiB 4.30 GB)

Raid Devices : 3

Total Devices : 2

Preferred Minor : 0

Update Time : Sun Jun 2 00:58:05 2013

State : clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0

Checksum : 9070963e - correct

Events : 19720

Number Major Minor RaidDevice State

this 1 8 1 1 active sync /dev/sda1

0 0 0 0 0 removed

1 1 8 1 1 active sync /dev/sda1

2 2 8 17 2 active sync /dev/sdb1

/ dev / sda2:

Magic : a92b4efc

Version : 0.90.00

UUID : e8f7960f:6bbea0c7:776c2c25:004bd7b2 (local to host rescue)

Creation Time : Mon Aug 31 17:18:11 2009

Raid Level : raid1

Used Dev Size : 2104448 (2.01 GiB 2.15 GB)

Array Size : 2104448 (2.01 GiB 2.15 GB)

Raid Devices : 3

Total Devices : 2

Preferred Minor : 1

Update Time : Sat Jun 8 07:14:24 2013

State : clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0

Checksum : 120869e1 - correct

Events : 3534

Number Major Minor RaidDevice State

this 1 8 2 1 active sync /dev/sda2

0 0 0 0 0 removed

1 1 8 2 1 active sync /dev/sda2

2 2 8 18 2 active sync /dev/sdb2

/ dev / sda3:

Magic : a92b4efc

Version : 0.90.00

UUID : 4f2b3b67:c3837044:776c2c25:004bd7b2 (local to host rescue)

Creation Time : Mon Aug 31 17:18:11 2009

Raid Level : raid5

Used Dev Size : 1458830400 (1391.25 GiB 1493.84 GB)

Array Size : 2917660800 (2782.50 GiB 2987.68 GB)

Raid Devices : 3

Total Devices : 2

Preferred Minor : 2

Update Time : Sat Jun 8 14:47:00 2013

State : clean

Active Devices : 1

Working Devices : 1

Failed Devices : 1

Spare Devices : 0

Checksum : 2b2b2dad - correct

Events : 36343894

Layout : left-symmetric

Chunk Size : 64K

Number Major Minor RaidDevice State

this 1 8 3 1 active sync /dev/sda3

0 0 0 0 0 removed

1 1 8 3 1 active sync /dev/sda3

2 2 0 0 2 faulty removed

cat /proc/mdstat

Personalities : [raid1]

md2 : inactive sda3[1](S) sdb3[2](S)

2917660800 blocks

md1 : active raid1 sda2[1] sdb2[2]

2104448 blocks [3/2] [_UU]

md0 : active raid1 sda1[1] sdb1[2]

4200896 blocks [3/2] [_UU]

md2似乎已损坏,可能是与我的VMWare映像有关的袭击。

我想通过将其安装在RAID之外来访问md2中的数据(活动且未损坏的磁盘上的数据,即/ dev / sda3)。

只是执行一个好主意

mdadm --manage /dev/md2 --remove /dev/sda3

(因为fdisk看不到md2,它是否还能工作)?

我应该通过运行重新对​​其他突袭md0和md1进行复仇吗

mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1

更新0:我不能组装md0和md2。

root@rescue ~ # mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1

mdadm: cannot open device /dev/sda1: Device or resource busy

mdadm: /dev/sda1 has no superblock - assembly aborted

root@rescue ~ # mdadm --assemble /dev/md2 /dev/sda3 /dev/sdb3

mdadm: cannot open device /dev/sda3: Device or resource busy

mdadm: /dev/sda3 has no superblock - assembly aborted

无法使用mount -t auto进行安装。

root@rescue ~ # mount -t auto -o ro /dev/md0 /mnt/rescue/

/dev/md0 looks like swapspace - not mounted

mount: you must specify the filesystem type

root@rescue ~ # mount -t auto -o ro /dev/md2 /mnt/rescue/

mount: you must specify the filesystem type

挂载/ dev / md1可以,但是上面没有VMWare数据。

root@rescue /mnt/rescue # ll

total 139M

-rw-r--r-- 1 root root 513K May 27 2010 abi-2.6.28-19-server

-rw-r--r-- 1 root root 631K Sep 16 2010 abi-2.6.32-24-server

-rw-r--r-- 1 root root 632K Oct 16 2010 abi-2.6.32-25-server

-rw-r--r-- 1 root root 632K Nov 24 2010 abi-2.6.32-26-server

-rw-r--r-- 1 root root 632K Dec 2 2010 abi-2.6.32-27-server

-rw-r--r-- 1 root root 632K Jan 11 2011 abi-2.6.32-28-server

-rw-r--r-- 1 root root 632K Feb 11 2011 abi-2.6.32-29-server

-rw-r--r-- 1 root root 632K Mar 2 2011 abi-2.6.32-30-server

-rw-r--r-- 1 root root 632K Jul 30 2011 abi-2.6.32-33-server

lrwxrwxrwx 1 root root 1 Aug 31 2009 boot -> .

-rw-r--r-- 1 root root 302K Aug 4 2010 coffee.bmp

-rw-r--r-- 1 root root 89K May 27 2010 config-2.6.28-19-server

...

更新1:

我试图停止md2和md0并再次组装。

mdadm -S /dev/md0

root@rescue ~ # mount -t auto -o ro /dev/md0 /mnt/rescue/

/dev/md0 looks like swapspace - not mounted

mount: you must specify the filesystem type

mdadm -S /dev/md2

root@rescue ~ # mount -t auto -o ro /dev/md2 /mnt/rescue/

mount: you must specify the filesystem type

有任何想法吗?

更新2:

由于出现以下错误消息,因此无法从一个磁盘进行组装。

root@rescue ~ # mdadm -S /dev/md2

root@rescue ~ # mdadm --assemble /dev/md2 /dev/sda3

mdadm: /dev/md2 assembled from 1 drive - not enough to start the array.

root@rescue ~ # mdadm -S /dev/md2

mdadm: stopped /dev/md2

root@rescue ~ # mdadm --assemble /dev/md2 /dev/sdb3

mdadm: /dev/md2 assembled from 1 drive - not enough to start the array.

甚至新的袭击也失败了。

root@rescue ~ # mdadm -S /dev/md9

mdadm: stopped /dev/md9

root@rescue ~ # mdadm --assemble /dev/md9 /dev/sda3

mdadm: /dev/md9 assembled from 1 drive - not enough to start the array.

root@rescue ~ # mdadm -S /dev/md9

mdadm: stopped /dev/md9

root@rescue ~ # mdadm --assemble /dev/md9 /dev/sdb3

mdadm: /dev/md9 assembled from 1 drive - not enough to start the array.

创建新的md磁盘也失败。

root@rescue ~ # cat /proc/mdstat

Personalities : [raid1]

md0 : active raid1 sda1[1] sdb1[2]

4200896 blocks [3/2] [_UU]

md1 : active raid1 sda2[1] sdb2[2]

2104448 blocks [3/2] [_UU]

unused devices:

root@rescue ~ # mdadm -A -R /dev/md9 /dev/sda3

mdadm: failed to RUN_ARRAY /dev/md9: Input/output error

mdadm: Not enough devices to start the array.

root@rescue ~ # cat /proc/mdstat

Personalities : [raid1] [raid6] [raid5] [raid4]

md9 : inactive sda3[1]

1458830400 blocks

md0 : active raid1 sda1[1] sdb1[2]

4200896 blocks [3/2] [_UU]

md1 : active raid1 sda2[1] sdb2[2]

2104448 blocks [3/2] [_UU]

unused devices:

root@rescue ~ # mdadm -S /dev/md9

mdadm: stopped /dev/md9

root@rescue ~ # mdadm -A -R /dev/md9 /dev/sdb3

mdadm: failed to RUN_ARRAY /dev/md9: Input/output error

mdadm: Not enough devices to start the array.

更新3:

从md2删除磁盘不起作用。

mdadm --remove /dev/md2 /dev/sda3

mdadm: cannot get array info for /dev/md2

更新4:

最后,--force希望通过运行汇编来完成。我现在正在将文件复制到另一台服务器。

做raid会损坏linux文件吗,如何从损坏的RAID系统挂载磁盘?相关推荐

  1. 【Linux挂载磁盘】Linux系统挂载磁盘详细操作步骤

    近期公司服务运行环境,从Windows服务器切换到了Linux服务器,于是开始了一波操作,整了两天终于整完了,记录一下腾讯云挂载数据盘的过程,因为云磁盘的大小只有600GB,然后就没有进行分区,直接整 ...

  2. linux系统挂载磁盘

    一.如何确认当前系统还有磁盘未挂载. su  root 输入密码后,切换到root账号 1.输入    fdisk -l   查看是否有磁盘未挂载,如下图所示 如上图所示,若没有显示后半部分时,可以确 ...

  3. linux反复出现文件系统损坏,Linux日常维护之文件系统损坏后的修复

    Linux文件系统损坏后的修复技巧详细介绍 在日常运维中,经常会遇到文件系统损坏的问题,如下图: Linux不正常关机,有时候再次启动时会报文件系统损坏,如何修复文件? 首先会让你输入root用户的密 ...

  4. bios设置raid启动模式Linux,教程:BIOS中如何打开RAID模式

    用户构筑RAID 0阵列系列步骤非常简单,只需在BIOS中轻松几步设置即可搞定.目前主流的B75/B85主板具备RAID0功能,其中B75仅有1个SATA3.0接口,其余5个SATA2.0接口适合接驳 ...

  5. linux系统挂载磁盘慢,arch开机速度竟然是挂载磁盘拖慢了。。

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 全程21秒,挂载分区的秒数真是...是磁盘太菜了吗 Startup finished in 4.804s (kernel) + 17.037s (user ...

  6. linux 分区 启动 慢,arch开机速度竟然是挂载磁盘拖慢了。。

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 全程21秒,挂载分区的秒数真是...是磁盘太菜了吗 Startup finished in 4.804s (kernel) + 17.037s (user ...

  7. windows 1903用linux使用,Win10 build 1903中的WSL Update允许您从Windows访问Linux文件

    WSL主要是一个命令行工具. 当然,此功能也适用于命令行. 您可以通过转到\ wsl $ {分配名称}找到要分发的文件,其中{distribution name}是正在运行的分发的名称. 以下是使用P ...

  8. 3、Linux文件与目录结构

    文章目录 3.Linux文件与目录结构 3.1 Linux文件 3.1.1 文件系统 3.1.2 挂载点 3.2 Linux目录结构 尚硅谷2022版Linux教程-讲师:武晟然 壁立千仞 无欲则刚 ...

  9. Linux运维学习笔记之九:网络管理和磁盘管理

    第十六章 网络管理 一.修改主机名 1.临时修改(重启失效) (1)hostname  主机名 hostname chuji001 (2)hostname查看 hostname chuji001 (3 ...

最新文章

  1. 20亿参数+30亿张图像,刷新ImageNet最高分!谷歌大脑华人研究员领衔发布最强Transformer...
  2. Go 语言编程 — 高级数据类型 — 指针
  3. 【C 语言】二级指针作为输入 ( 自定义二级指针内存 | 为 二级指针 分配内存 - 存放 一维指针 | 为每个 一级指针 分配内存 | 释放二维指针内存 )
  4. c++中的变量作用范围
  5. python摄像头人脸识别代码_python 实现摄像头人脸识别
  6. 页面上指定类型的控件的样式添加
  7. php 路由 隐藏index,CI中路由与伪静态、隐藏index.php(十四)
  8. 延迟加载图片 Lazy Load
  9. 上物理课还不够 张朝阳集结明星开启野雪挑战直播
  10. paip.提升用户体验---c++ 悬浮窗体以及右键菜单以及socket接口
  11. Windows内核编程学习1:构建HelloWorld
  12. 网上提交材料时让登记照瞬间符合审核尺寸要求的小工具
  13. Sentaurus SDE
  14. 什么是M1、M2以及与资本市场的关系
  15. 【MPI编程】矩阵向量乘法--解法二(高性能计算)
  16. 微信小程序 实时录制音视频流和实时播放音视频流
  17. Android OpenGLES滤镜开发之仿抖音灵魂出窍
  18. backtracking及其应用2
  19. .NETCore——依赖注入
  20. Flutter桌面开发 — Windows App打包以及使用Inno Setup生成.exe文件安装包

热门文章

  1. Visual Studio 2013运行的结果一闪而过
  2. tf.data.TextLineDataset()
  3. 由二分查找算法学习算法的时间复杂度
  4. pytorch基础知识+构建LeNet对Cifar10进行训练+PyTorch-OpCounter统计模型大小和参数量+模型存储与调用
  5. 实现两个点集的欧式距离和cos距离和索引值寻找(含有两种解法,for循环和矩阵操作)
  6. 即插即用+任意blur的超分辨率重建——DPSR
  7. Python面试题大全(三):Web开发(Flask、爬虫)
  8. Windows 必备神器 Cmder 使用教程
  9. 可以叫板Google的一个搜索引擎 —— DuckDuckGo
  10. 开源 Python网络爬虫框架 Scrapy