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
    • 最新
    • 标签
主页 / unix / 问题

问题[raid](unix)

Martin Hope
酸柠檬猹
Asked: 2024-11-23 23:00:11 +0800 CST

mdadm RAID1:无法更换(--add)故障驱动器

  • 5

我有一个由两个硬盘组成的 RAID1 阵列,最近丢失了一个驱动器,但我似乎无法简单地更换损坏的驱动器。 mdadm --detail报告称第一个驱动器插槽sda已被移除(物理上已移除),第二个驱动器插槽sdb仍在工作(活动、同步)。sdb最近被更换了,因此数据是安全的。但是当我尝试添加磁盘时,mdadm /dev/md127 --add /dev/sdx它返回错误:

$ sudo mdadm /dev/md127 --add /dev/sdx1
mdadm: add new device failed for /dev/sdx1 as 3: Invalid argument

dmesg 显示这些:

[  xx.xx] md: sdx1 does not have a valid v1.2 superblock, not importing!
[  xx.xx] md: md_import_device returned -22

我用parted确认了sdx1的分区大小和sdb1完全一样(扇区和字节)。同样在--add驱动之后,虽然出现了错误,但是lsblk显示sda1上已经有了阵列的元数据。

使用 DeepL 翻译

raid
  • 1 个回答
  • 27 Views
Martin Hope
quixotrykd
Asked: 2024-07-08 08:49:59 +0800 CST

RAID 总是读取/写入整个块吗?

  • 6

互联网上的许多资源包含有关 RAID 块的读/写逻辑的相互矛盾的信息。

该答案包含以下(看似相互矛盾的)信息:

512 KB 块大小并不要求系统每次写入 4 KB 时都写入 512 KB,或者每次应用程序读取 4 KB 时都读取 512 KB 的设备表面。

[当从具有 64 KiB 块大小的 RAID 读取 16 KiB 块时] RAID 将在写入该 4 KiB 文件/16 KiB 块时执行读取/修改/写入操作,因为 RAID 的最小存储单位是 64 KiB。

另一方面,该资源包含以下信息:

例如,如果您有一个 10 KB 的文本文件,且块大小为 256 KB,则该 10 KB 的数据将存储在 256 KB 的块中,其余块将留空。相反,如果使用 16 KB 的块,则存储该 10 KB 文件时浪费的空间要少得多。

我特别有以下问题:

  1. 当使用无奇偶校验的方案读取/写入小于 RAID 块大小的某些数据单元时,是否需要对整个块进行读取/修改/写入操作,还是仅对修改的部分块进行读取/修改/写入操作?
  2. 当使用具有奇偶校验的RAID 方案时,这会改变问题 1 的答案吗?
  3. 正如第二个参考文献中提到的,写入小于 RAID 块的数据单元是否会以某种方式使 RAID 块的其余部分保持空白?这在我看来似乎是不正确的,但我想澄清一下,因为这个资源非常明确地说明了这一点。
  4. 这些答案是否会根据 RAID 实现(Linux 内核、硬件 RAID 等)而改变?

如果可能的话,提供某种权威参考(一些 RAID 规范、源代码等)就太好了。

提前致谢!

raid
  • 1 个回答
  • 88 Views
Martin Hope
schtocker
Asked: 2024-01-13 04:08:41 +0800 CST

添加到 mdadm RAID 的单个驱动器在重启后消失

  • 6

我已经寻找并寻找其他有同样问题的人,但这里的所有问题似乎都是关于整个 RAID 在重新启动后消失,而我只有一个成员驱动器有问题。

这是一台视频制作机器,上周(从 CentOS 7 升级到 Rocky 8 后)我们注意到视频播放在视频上产生了视觉伪影。所有视频都存储在附加的 RAID 上。

它是 RAID 60,因此两个 RAID6 每个包含 12 个 1.2TB 驱动器,然后这两个 RAID6 组合在一起形成 RAID0。这是在我开始在这里工作很久之前由外部公司设立的,但它在我的经验中一直很扎实。

通过调查这些视觉伪影,我发现根据 mdadm,其中一个 RAID6 中的一个驱动器被标记为“已删除”。没有这个驱动器,RAID 仍然可以工作,正如您对 RAID6 所期望的那样,但我怀疑它与我们所看到的伪影有关。smartctl 显示有问题的驱动器出现故障,因此我们订购了一个新驱动器。

它是今天早上收到的,从那里我严格按照redhat.com 上的说明进行操作。它花了近三个小时用新驱动器重建 RAID,但它似乎有效,RAID 回来了,我没有看到伪影。

然而,我重新启动了机器,我们又回到了原点。这与我们开始时一模一样,其中一个 RAID6 显示已移除的驱动器。另外,当我查看磁盘时,我可以看到有问题的驱动器 (/dev/sdc) 已丢失其分区,或者至少它显示“1.2TB 可用空间”而不是“1.2TB Linux RAID 成员”。我想(希望)也许这是一个侥幸,今晚我再次经历了整个过程,并且发生了完全相同的事情。我第二次做的唯一不同的是/etc/mdadm.conf使用mdadm --examine --scan >> /etc/mdadm/mdadm.confas su 创建一个文件,但似乎没有什么区别。我现在已经清除了文件以便重新开始。

我一生都无法弄清楚发生了什么事。我对 Linux 相当有能力,但在本周之前我什至不知道 mdadm 的存在,所以我一直在尝试即时学习。这台生产机器需要在周二恢复运行,所以我反对它!我将在一夜之间再次重建 RAID,并于明天重新开始。以下是我认为您可能需要的所有输出,但如果我可以提供其他任何内容,请告诉我。

输出cat /proc/mdstat:

Personalities : [raid6] [raid5] [raid4] [raid0] 
md103 : active raid0 md101[0] md102[1]
      23439351808 blocks super 1.2 512k chunks
      
md102 : active raid6 sdu[6] sdz[11] sdx[9] sdw[8] sdy[10] sdq[2] sdt[5] sdr[3] sdv[7] sds[4] sdo[0] sdp[1]
      11719808000 blocks super 1.2 level 6, 512k chunk, algorithm 2 [12/12] [UUUUUUUUUUUU]
      bitmap: 0/9 pages [0KB], 65536KB chunk

md101 : active raid6 sdk[8] sdh[5] sdg[4] sdl[9] sdf[3] sdi[6] sdj[7] sde[2] sdd[1] sdm[10] sdn[11]
      11719808000 blocks super 1.2 level 6, 512k chunk, algorithm 2 [12/11] [_UUUUUUUUUUU]
      bitmap: 1/9 pages [4KB], 65536KB chunk

mdadm --detail有问题的 RAID6的输出:

/dev/md101:
           Version : 1.2
     Creation Time : Tue Jun  8 17:37:23 2021
        Raid Level : raid6
        Array Size : 11719808000 (10.91 TiB 12.00 TB)
     Used Dev Size : 1171980800 (1117.69 GiB 1200.11 GB)
      Raid Devices : 12
     Total Devices : 11
       Persistence : Superblock is persistent

     Intent Bitmap : Internal

       Update Time : Fri Jan 12 19:20:16 2024
             State : clean, degraded 
    Active Devices : 11
   Working Devices : 11
    Failed Devices : 0
     Spare Devices : 0

            Layout : left-symmetric
        Chunk Size : 512K

Consistency Policy : bitmap

              Name : grade1:101
              UUID : 56d9ee6d:3a9ef416:91d3b7ec:0da562b0
            Events : 1036527

    Number   Major   Minor   RaidDevice State
       -       0        0        0      removed
       1       8       48        1      active sync   /dev/sdd
       2       8       64        2      active sync   /dev/sde
       3       8       80        3      active sync   /dev/sdf
       4       8       96        4      active sync   /dev/sdg
       5       8      112        5      active sync   /dev/sdh
       6       8      128        6      active sync   /dev/sdi
       7       8      144        7      active sync   /dev/sdj
       8       8      160        8      active sync   /dev/sdk
       9       8      176        9      active sync   /dev/sdl
      10       8      192       10      active sync   /dev/sdm
      11       8      208       11      active sync   /dev/sdn

这可能有点矫枉过正,但fdisk -l其输出很长,因为驱动器太多了。sda 和 sdb 是操作系统驱动器,问题驱动器 /dev/sdc 看起来有所不同,因为我已经按照准备读取它的 redhat.com 说明在其上运行了 sgdisk:

Disk /dev/sda: 894.3 GiB, 960197124096 bytes, 1875385008 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
Disklabel type: gpt
Disk identifier: 18255C5C-FE0C-4ADB-9D13-52560809D652

Device       Start        End    Sectors   Size Type
/dev/sda1     2048    1230847    1228800   600M EFI System
/dev/sda2  1230848    3327999    2097152     1G Linux filesystem
/dev/sda3  3328000 1875384319 1872056320 892.7G Linux LVM


Disk /dev/sdb: 894.3 GiB, 960197124096 bytes, 1875385008 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
Disklabel type: gpt
Disk identifier: D2D8699C-C29B-4C34-B126-3667FA7B794A

Device     Start        End    Sectors   Size Type
/dev/sdb1   2048 1875384319 1875382272 894.3G Linux LVM


Disk /dev/mapper/rl-root: 70 GiB, 75161927680 bytes, 146800640 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


Disk /dev/mapper/rl-swap: 4 GiB, 4294967296 bytes, 8388608 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


Disk /dev/sdd: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdc: 1.1 TiB, 1200243695616 bytes, 2344225968 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
Disklabel type: gpt
Disk identifier: B9AB730B-09DD-44FF-BD9E-79502FB2CF5E


Disk /dev/sdh: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdg: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sde: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdl: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdi: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdm: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdo: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdp: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdk: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdq: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdf: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdn: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdr: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdj: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sds: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdt: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdu: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdv: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdw: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdx: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdy: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/sdz: 1.1 TiB, 1200243695616 bytes, 2344225968 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


Disk /dev/mapper/rl-home: 1.7 TiB, 1839227469824 bytes, 3592241152 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


Disk /dev/md101: 10.9 TiB, 12001083392000 bytes, 23439616000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 5242880 bytes


Disk /dev/md102: 10.9 TiB, 12001083392000 bytes, 23439616000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 5242880 bytes


Disk /dev/md103: 21.8 TiB, 24001896251392 bytes, 46878703616 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 5242880 bytes
raid
  • 1 个回答
  • 34 Views
Martin Hope
elbarna
Asked: 2023-11-08 12:40:17 +0800 CST

是否可以将 /dev/md126 重命名为 /dev/md0 并同时保留 /dev/md 上的别名?

  • 7

这是我的/etc/mdadm/mdadm.conf

ARRAY /dev/md/root   metadata=1.2 name=root   UUID=331728d9:c4d12r4f:f589d3ze:01ab3c17
ARRAY /dev/md/backup metadata=1.2 name=backup UUID=429845f1:d5e24f5g:8135dgte:120ff5c0

发现报告这种情况:

find /dev/md -ls
     1656      0 drwxr-xr-x   2 root     root           80 nov  8 05:30 /dev/md
     1784      0 lrwxrwxrwx   1 root     root            8 nov  8 05:30 /dev/md/ibmlinux:backup -> ../md127
     1657      0 lrwxrwxrwx   1 root     root            8 nov  8 05:30 /dev/md/ibmlinux:root -> ../md126

正如你所看到的,我们有 md126 和 md127,是否可以强制它命名 md0 和 md1?我尝试在 mdadm.conf 中创建重复的数组,但不起作用。系统是Debian SID。

我想要这样的结果:保留 /dev/md/name 并使用 md0 和 md1 而不是 md127 和 md126

find /dev/md -ls
     1656      0 drwxr-xr-x   2 root     root           80 nov  8 05:30 /dev/md
     1784      0 lrwxrwxrwx   1 root     root            8 nov  8 05:30 /dev/md/ibmlinux:backup -> ../md1
     1657      0 lrwxrwxrwx   1 root     root            8 nov  8 05:30 /dev/md/ibmlinux:root -> ../md0

现在我尝试这个 mdadm.conf

ARRAY /dev/md0 metadata=1.2 name=root   UUID=331728d9:c4d12r4f:f589d3ze:01ab3c17
ARRAY /dev/md1 metadata=1.2 name=backup UUID=429845f1:d5e24f5g:8135dgte:120ff5c0

更新 initramfs 并重新启动后...

find /dev/md -ls
     9250      0 drwxr-xr-x   2 root     root           80 nov  8 05:50 /dev/md
     9299      0 lrwxrwxrwx   1 root     root            8 nov  8 05:50 /dev/md/ibmlinux:root -> ../md126
     9251      0 lrwxrwxrwx   1 root     root            8 nov  8 05:50 /dev/md/ibmlinux:backup -> ../md127

一样。

raid
  • 2 个回答
  • 168 Views
Martin Hope
rubo77
Asked: 2023-10-10 08:32:58 +0800 CST

如何在Linux中格式化NVMe驱动器以适合xen主机上的raid 1和lvm

  • 8
这个问题是从服务器故障 迁移过来的,因为它可以在 Unix & Linux Stack Exchange 上得到回答。10天前迁移 。

我想在两个相同的 SSD 上创建软件 raid

如何创建分区并对其进行最佳格式化?

lsblk

nvme0n1            259:0    0 953.9G  0 disk
nvme1n1            259:1    0 953.9G  0 disk

我可能必须使用fdisk或parted创建分区。我需要什么选择?这够了吗?

parted /dev/nvme0n1

(parted) mkpart primary ext4 0% 100%
(parted) set 1 raid on

磁盘都有 1tb,我还需要一个 500mb 的小型启动分区

raid
  • 1 个回答
  • 19 Views
Martin Hope
Arunas Bartisius
Asked: 2023-02-08 12:41:28 +0800 CST

多个 mdadm raid 并行重建

  • 6

我想知道是否有任何程序可以启动两个或多个独立阵列的并发重建?

一个正在重建,另一个保持状态:

md2 : active raid10 sdf5[4] sdd5[6] sdc5[5] sda5[7]
      7804374912 blocks super 1.2 64K chunks 2 near-copies [4/3] [_UUU]
      [=====>...............]  recovery = 28.8% (1124301568/3902187456) finish=364.1min speed=127142K/sec

md4 : active raid5 sde7[3](R) sdc7[0] sda7[2] sdb7[1]
      15623708416 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
        recovery=DELAYED

有什么办法可以并行启动另一个 md 阵列恢复?

更新 1:

感谢接受的答案,我节省了大量时间:

md2 : active raid10 sdb5[8](R) sdf5[4] sdd5[6] sdc5[5] sda5[7]
      7804374912 blocks super 1.2 64K chunks 2 near-copies [4/4] [UUUU]
      [===============>.....]  recovery = 78.9% (3079104384/3902187456) finish=123.8min speed=110796K/sec

md4 : active raid5 sde7[3](R) sdc7[0] sda7[2] sdb7[1]
      15623708416 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
      [>....................]  recovery =  0.0% (3492100/7811854208) finish=708.0min speed=183794K/sec

由于我之前的不同尝试行为,我仍然遇到了非常有趣的问题,这些问题将在单独的答案中发布。

raid
  • 2 个回答
  • 28 Views
Martin Hope
Daniel Böhmer
Asked: 2023-01-11 04:10:23 +0800 CST

将 1 个驱动器添加到带有 SSD 的 mdadm RAID5 是否需要写入所有磁盘一次?

  • 6

我打算在 Linux 的 mdadm 下用 RAID5 中的几个 SSD 构建一个新存储。我现在正在考虑购买 5 或 6 个 SSD。

如果我将来添加另一个 SSD,将它添加到 RAID5 是否需要对所有当时使用的 SSD 进行完整写入?SSD 的写入能力有限,这对我来说是一个小指标,可以让我现在购买更多可用空间。我不确定是否必须重新排列数据才能增加数组。

raid
  • 1 个回答
  • 24 Views
Martin Hope
Alexa
Asked: 2022-10-03 04:39:44 +0800 CST

在 Raid 驱动器上运行 fsck

  • 1

我最近购买了联想的旧 ix4-300d NAS(过时型号)。它在显示文件系统错误一段时间后开始。

在通过 SSH 使用 putty 连接到设备后,我尝试运行 fsck,这在空运行时确实确定了一个可纠正的问题。但是,尽管卸载了驱动器和共享,fsck 仍会以错误提示终止驱动器仍在使用中。fuser 不显示任何正在使用该驱动器的内容。我还通过 Web 界面禁用了协议。我无法从 Web 界面使用文件系统扫描仪的原因是它不起作用。我也无法在根 FS 上触摸 forcefsck,因为根 FS 是只读的,并且触摸的文件在重新启动时就会消失。

任何帮助将不胜感激。非常感谢。

显示 Raid 仍在使用中的错误

我的 /etc/fstab

单位错误

在 Web 界面中禁用所有协议

尾 /var/log/messages

root@AdanetCloud:/# vgs
  VG          #PV #LV #SN Attr   VSize  VFree
  7d2470b7_vg   1   1   0 wz--n- 14.48t    0
  md0_vg        1   2   0 wz--n- 19.98g    0

root@AdanetCloud:/# lvs
  LV        VG          Attr     LSize  Pool Origin Data%  Move Log Copy%  Convert
  lv9953e62 7d2470b7_vg -wi-ao-- 14.48t                                         
  BFDlv     md0_vg      -wi-ao--  4.00g                                         
  vol1      md0_vg      -wi-ao-- 15.98g                                         


root@AdanetCloud:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/7d2470b7_vg-lv9953e62 15T 2.6T 12T 18% /mnt/pools/A/A0 ... (truncated)

fsck -yf /dev/mapper/7d2470b7_vg-lv9953e62

root@AdanetCloud:/# fuser -uvm /mnt/pools/A/A0
                     USER        PID ACCESS COMMAND
/mnt/pools/A/A0:     root     kernel mount (root)/mnt/pools/A/A0
                     root       3512 F.... (root)mt-daapd

[fuser -uvm /mnt/pools/A/A0 after unmounting /mnt/pools/A/A0]

root@AdanetCloud:/# fuser -uvm /mnt/pools/A/A0
                     USER        PID ACCESS COMMAND
/mnt/pools/A/A0:     root     kernel mount (root)/
                     root          1 .rce. (root)init
                     root          2 .rc.. (root)kthreadd
                     root          3 .rc.. (root)ksoftirqd/0
                     root          6 .rc.. (root)migration/0
                     root          7 .rc.. (root)migration/1
                     root          9 .rc.. (root)ksoftirqd/1
                     root         10 .rc.. (root)khelper
                     root         11 .rc.. (root)netns
                     root        183 .rc.. (root)sync_supers
                     root        185 .rc.. (root)bdi-default
                     root        187 .rc.. (root)kblockd
                     root        193 .rc.. (root)ata_sff
                     root        204 .rc.. (root)khubd
                     root        210 .rc.. (root)md
                     root        228 .rc.. (root)rpciod
                     root        251 .rc.. (root)khungtaskd
                     root        256 .rc.. (root)kswapd0
                     root        257 .rc.. (root)fsnotify_mark
                     root        258 .rc.. (root)unionfs_siod
                     root        259 .rc.. (root)nfsiod
                     root        260 .rc.. (root)xfs_mru_cache
                     root        261 .rc.. (root)xfslogd
                     root        262 .rc.. (root)xfsdatad
                     root        263 .rc.. (root)xfsconvertd
                     root        264 .rc.. (root)crypto
                     root        345 .rc.. (root)iscsi_eh
                     root        348 Frc.m (root)httpd
                     root        361 .rc.. (root)scsi_eh_0
                     root        364 .rc.. (root)scsi_eh_1
                     root        367 .rc.. (root)scsi_eh_2
                     root        370 .rc.. (root)scsi_eh_3
                     root        384 .rc.. (root)scsi_eh_4
                     root        387 .rc.. (root)scsi_eh_5
                     root        393 .rc.. (root)target_completi
                     root        394 .rc.. (root)LIO_rd_mcp
                     root        403 .rc.. (root)mtdblock0
                     root        408 .rc.. (root)mtdblock1
                     root        413 .rc.. (root)mtdblock2
                     root        418 .rc.. (root)mtdblock3
                     root        423 .rc.. (root)mtdblock4
                     root        428 .rc.. (root)mtdblock5
                     root        433 .rc.. (root)mtdblock6
                     root        538 .rc.. (root)scsi_eh_6
                     root        539 .rc.. (root)usb-storage
                     root        558 .rc.. (root)kworker/u:1
                     root        633 .rc.. (root)ubi_bgt0d
                     root        694 .rc.. (root)kworker/0:0
                     root        713 .rc.. (root)ubifs_bgt0_0
                     root        718 .rc.. (root)md0_raid1
                     root        726 .rc.. (root)kdmflush
                     root        735 .rc.. (root)kjournald
                     root        750 .rc.. (root)loop0
                     root        754 .rc.. (root)loop1
                     root        776 .rc.. (root)loop2
                     root        839 .rc.. (root)krfcommd
                     root        920 .rc.. (root)flush-7:1
                     root       1049 Frc.m (root)udevd
                     root       2172 Frc.m (root)logsave
                     root       2484 Frc.m (root)rsyslogd
                     root       2554 .rc.. (root)bond0
                     root       2705 .rc.. (root)kworker/0:1
                     root       2795 Frc.m (root)dhclient
                     nobody     2934 Frc.m (nobody)mdnsd
                     root       2936 .rc.m (root)hostnamed
                     root       2949 Fr..m (root)appmd
                     root       2960 Frc.m (root)getty
                     root       2973 Fr..m (root)dbus-daemon
                     root       2975 Fr..m (root)eventd
                     nobody     3007 Frc.m (nobody)mdnsd
                     root       3009 .rc.m (root)hostnamed
                     root       3010 Fr..m (root)pkgd
                     root       3026 Fr..m (root)upnpdiscovery
                     nobody     3029 Fr..m (nobody)mdnsd
                     root       3031 Frc.m (root)sshd
                     root       3033 Fr..m (root)svcd
                     root       3037 Fr..m (root)acpid
                     root       3043 Fr..m (root)imgd
                     root       3057 Frc.m (root)lld2d
                     root       3058 Fr..m (root)sh
                     root       3060 Fr..m (root)sh
                     root       3077 Frc.m (root)httpd
                     root       3102 Fr..m (root)pcloudd
                     root       3105 Fr..m (root)activefolder
                     root       3243 Fr..m (root)sleep
                     root       3320 Frc.m (root)cron
                     root       3371 Frc.m (root)netplugd
                     root       3463 Frc.m (root)sshd
                     root       3478 .rc.m (root)sh
                     root       3556 .rc.. (root)flush-ubifs_0_0
                     root       3601 Fr..m (root)sleep
                     root       3678 Fr..m (root)sleep
                     root       3900 Frc.m (root)udevd
                     root       3902 Frc.m (root)udevd
                     root       4042 .rc.. (root)kdmflush
                     root       4087 .rc.. (root)kdmflush
                     root       4099 .rc.. (root)jbd2/dm-1-8
                     root       4100 .rc.. (root)ext4-dio-unwrit
                     root       4105 .rc.. (root)jbd2/dm-2-8
                     root       4106 .rc.. (root)ext4-dio-unwrit
                     root       4110 .rc.. (root)flush-253:1
                     root       4149 .rc.. (root)ufsd_sdd1
                     root       4316 Fr..m (root)displayd
                     root       4340 Fr..m (root)quiktransfer
                     root       4343 Fr..m (root)logrotation
                     root       4384 Fr..m (root)datamover
                     root       4459 Fr..m (root)connectd
                     root       4483 Fr..m (root)amazon
                     root       4548 Fr..m (root)Transmission
                     root       4550 Fr..m (root)transmission-da
                     root       4607 Fr..m (root)smbd
                     root       4611 Fr..m (root)winbindd
                     root       4616 Fr..m (root)mysqlserver
                     root       4683 Fr..m (root)winbindd
                     root       4839 Fr..m (root)smbd-notifyd
                     root       4840 Fr..m (root)cleanupd
                     root       4850 Fr..m (root)winbindd
                     root       4856 Fr..m (root)winbindd
                     root       4887 Fr..m (root)lpqd
                     root       4952 Fr..m (root)nmbd
                     root       4974 Fr..m (root)mysqld_safe
                     root       5202 Fr..m (root)rsync
                     root       5439 Fr..m (root)twonkystart.sh
                     root       5447 Fr..m (root)su
                     root       5451 Frc.m (root)isnsd
                     nobody     5459 Fr..m (nobody)twonkyserver
                     mysql      5837 Fr..m (mysql)mysqld
                     root       5985 .rc.. (root)scst_release_ac
                     root       5991 .rc.. (root)scst_uid
                     root       5995 .rc.. (root)scstd0
                     root       5998 .rc.. (root)scstd1
                     root       5999 .rc.. (root)scst_initd
                     root       6000 .rc.. (root)scsi_tm
                     root       6001 .rc.. (root)scst_mgmtd
                     root       6044 .rc.. (root)iscsird0_0
                     root       6045 .rc.. (root)iscsird0_1
                     root       6046 .rc.. (root)iscsird0_2
                     root       6049 .rc.. (root)iscsird0_3
                     root       6051 .rc.. (root)iscsiwr0_0
                     root       6052 .rc.. (root)iscsiwr0_1
                     root       6053 .rc.. (root)iscsiwr0_2
                     root       6055 .rc.. (root)iscsiwr0_3
                     root       6066 Frc.m (root)iscsi-scstd
                     root       6247 .rc.. (root)kworker/u:0
                     root      15522 Frc.m (root)httpd
                     root      16215 .rc.. (root)kworker/1:1
                     root      23662 Frc.m (root)httpd
                     root      26558 .rc.. (root)flush-253:2
                     root      32367 .rc.. (root)kworker/1:2

[After trying to run fsck on unmounted drive]

root@AdanetCloud:/# fsck /dev/mapper/7d2470b7_vg-lv9953e62
fsck 1.42.5 (29-Jul-2012)
e2fsck 1.42.5 (29-Jul-2012)
/dev/mapper/7d2470b7_vg-lv9953e62 is in use.
e2fsck: Cannot continue, aborting.
ssh raid
  • 1 个回答
  • 80 Views
Martin Hope
Matt
Asked: 2022-07-06 10:27:37 +0800 CST

使用 RAID 1 镜像两个外部备份驱动器

  • 8

我正在寻找在我的操作系统(Pop OS Linux)上学习 RAID 的设置并备份我的笔记本电脑。

我希望在一个外部驱动器(驱动器 A)上设置适当的备份方案,并且我希望在另一个外部驱动器(驱动器 B)之间设置 RAID 1。驱动器 A 和 B 都不会镜像我的硬盘驱动器,但我希望它们相互镜像以实现备份冗余。我尝试为他们设置 RAID 1,但他们试图镜像我的引导驱动器,这不是我想要的。

RAID 是否适合以这种方式镜像外部驱动器?还是有更好的工具?驱动器必须在启动时存在吗?

在没有驱动器的情况下重新启动计算机时,我一直需要驱动器。

raid backup
  • 2 个回答
  • 1005 Views
Martin Hope
tater
Asked: 2022-04-28 22:44:39 +0800 CST

使用 mdadm 修复两个 RAID1 磁盘上丢失的超级块

  • 2

我的 RAID1 阵列工作正常,/dev/md128但在重新启动后似乎完全消失了,mdadm报告两个磁盘都缺少超级块。我的问题是如何解决这个问题?

背景:运行 CentOS 7 的系统。有 2xSSD ( sda, sdb) 和 2xHDD ( sdc, sdd)。应该有一个 RAID1 阵列,/dev/md128但没有显示。在重新启动以进行内核更新之前,它一直运行良好。sdcsdd

未列出的数组/etc/mdadm.conf:

# cat /etc/mdadm.conf
# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md/boot level=raid1 num-devices=2 UUID=a2f6b6fe:31c80062:67e7a858:a21502a9
ARRAY /dev/md/boot_efi level=raid1 num-devices=2 UUID=ffbc39c9:ff982933:b77aece5:b44bec5f
ARRAY /dev/md/root level=raid1 num-devices=2 UUID=b31f6af6:78305117:7ca807e7:7691d745
ARRAY /dev/md/swap level=raid0 num-devices=2 UUID=f31db9e8:e136e642:1ae8f2d0:7178c956

尝试手动组装阵列:

# mdadm --verbose --assemble /dev/md128 /dev/sdc1 /dev/sdd1
mdadm: looking for devices for /dev/md128
mdadm: no recogniseable superblock on /dev/sdc1
mdadm: /dev/sdc1 has no superblock - assembly aborted
# mdadm -E /dev/sdc1
mdadm: No md superblock detected on /dev/sdc1.
# mdadm -E /dev/sdd1
mdadm: No md superblock detected on /dev/sdd1.

检查的其他事项:smartctl没有显示错误(两个驱动器都使用了大约 3 个月大并且很少使用),mdadm -E /dev/sdc没有在设备级别显示任何超级块。恢复到旧内核,没有任何变化。我很高兴添加其他输出,只是尽量不要让问题变得不必要地冗长。

任何想法表示赞赏!与此同时,我计划将dd两个驱动器都放在手头上。

raid mdadm
  • 1 个回答
  • 328 Views

Sidebar

Stats

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

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve