AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1239101
Accepted
Joe Molnar
Joe Molnar
Asked: 2020-05-14 08:41:43 +0800 CST2020-05-14 08:41:43 +0800 CST 2020-05-14 08:41:43 +0800 CST

从 Ubuntu 16.04 升级到 20.04 后重新连接 raid 10 驱动器 md0

  • 772

我刚刚从Ubuntu 16.04升级到20.04。在我的计算机中,我在raid 10阵列中有 4 X 1TB HHD。它们是sda、sdb、sdc 和 sdd = md0 这个被袭击的驱动器包含我的主目录,在我的例子中是 /home/joe/ 我在 fstab 中有一行:

UUID=f7790191-84f3-4d9b-81b8-43de132244a2 /home           ext4    defaults        0       0

Linux Ubuntu 安装在固态驱动器dev/nvme0n1 上。

这是 blkid 在 16.04 下的输出:

/dev/nvme0n1p1: UUID="1c7b2d4e-d543-4e71-8b05-569a0993e339" TYPE="ext4" PARTUUID="3acfb4f5-01"
/dev/nvme0n1p5: UUID="2403be72-9dca-43b6-a596-044cfd813801" TYPE="swap" PARTUUID="3acfb4f5-05"
/dev/sda: UUID="43468a60-e0d2-6202-4e0c-320120beeee1" UUID_SUB="a49f1c1a-3450-39bc-8efb-67da1ebeacdf" LABEL="joeslinux:0" TYPE="linux_raid_member"
/dev/sdb: UUID="43468a60-e0d2-6202-4e0c-320120beeee1" UUID_SUB="11eb3ea8-74da-18c2-cd0a-bb2454c0cb46" LABEL="joeslinux:0" TYPE="linux_raid_member"
/dev/sdc: UUID="43468a60-e0d2-6202-4e0c-320120beeee1" UUID_SUB="e5b7cd63-974c-b4ed-8061-fc1c405abb08" LABEL="joeslinux:0" TYPE="linux_raid_member"
/dev/sdd1: UUID="82374f03-c484-4420-8693-6ed0a7704b4e" TYPE="ext4" PARTUUID="049ace7e-01"
/dev/sde: UUID="74D8-8B03" TYPE="vfat"
/dev/nvme0n1: PTUUID="3acfb4f5" PTTYPE="dos"

然后我从 Ubuntu 16.04 升级到 20.04。升级中途死机了,需要删除一些与 Python 3 基础包有关的东西。但是,我的计算机无法运行,因此我在该 SSD nvme01n 上进行了 20.04 的全新安装。这样做时,我从物理上断开了 4 个硬盘驱动器,从 sda 到 sdd。我这样做是因为安装程序暗示它想使用我的 sda 作为安装设备,我不能冒险让这种情况发生。

现在我已经干净、成功地安装了 20.04。我认为我在主目录中的所有工作仍然完好无损。但是我目前无法访问它。我没有我的 md0 驱动器。

这是我的新 fdisk -l:

Disk /dev/nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors
Disk model: SAMSUNG MZVPW256HEGL-000H1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 233AD7D4-8BEC-407D-8096-A2C7BEA37CB7

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 500117503 499066880 238G Linux filesystem

Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: HGST HTS721010A9
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000680a0

Disk /dev/sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: HGST HTS721010A9
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xd92e9edf

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953525167 1953523120 931.5G 83 Linux

Disk /dev/sdc: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM010-2EP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x76221e63

Disk /dev/sdd: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM010-2EP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xee260f95

Disk /dev/sdf: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: PSZ-HB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x049ace7e

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdf1        2048 3907029167 3907027120  1.8T 83 Linux

(上面省略了 Loop0 到 9。)

我知道 sda sdb sdc 和 sdd 是正确的大小。我还看到了一个与 md0 应该大小相同的新 sdf,即 1.84TiB。这与现实是一致的,所以我知道一切都在那里。

目前我的 blkid 只显示 1 行:

/dev/nvme0n1p2: UUID="ebb08f84-7501-4461-a5c4-c69c3c25d9b0" TYPE="ext4" PARTUUID="3ba58f92-47c7-423a-aad0-459ffe32cae1"

这只是带有操作系统的SSD。令人怀疑的是,UUID 和 PARTUUID 都与旧 16.04 上的相同。这让我担心被袭击的 md0 的 UUID 也发生了变化。

无论如何,我需要关于如何重建raid md0并重新指向我的主文件夹的建议。我不敢激活线路

UUID=f7790191-84f3-4d9b-81b8-43de132244a2 /home           ext4    defaults        0       0

在新的 fstab 中并重新启动。

而且我不敢在不完全了解我在做什么的情况下摆弄 mdadm。

提前感谢您的任何帮助或建议,

boot mount raid hard-drive
  • 1 1 个回答
  • 165 Views

1 个回答

  • Voted
  1. Best Answer
    Joe Molnar
    2020-05-21T19:54:44+08:002020-05-21T19:54:44+08:00

    我刚刚运行 mdadm 如下。

    mdadm --assemble /dev/md0 /dev/sda /dev/sdb /dev/sdc /dev/sdd
    

    只花了几秒钟。它第一次奏效。

    为了保持磁盘挂载,我将其添加到 /etc/fstab

    UUID=<my uuid for the new md0> /home           ext4    defaults        0       0
    
    • 0

相关问题

  • 用户如何避免在启动时输入密码?[关闭]

  • 更改 Wubi 的启动顺序

  • 当另一个文件系统安装在路径上时是否可以删除文件?

  • 如何在 Ubuntu 启动时显示或隐藏启动消息?

  • 如何避免启动时出现“S to Skip”消息?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve