求助帖,群晖 raid 丢失 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
stong2
V2EX    Linux

求助帖,群晖 raid 丢失

  •  
  •   stong2 261 天前 2027 次点击
    这是一个创建于 261 天前的主题,其中的信息可能已经有所发展或是发生改变。

    群晖 920+四盘位,之前 1 & 2 盘位用了 2T 组 SHR 成存储池 2 ,3 & 4 盘位组 raid0 成存储池 1 ; 前段时间觉得没必要数据保护,就把 2 盘位硬盘拆下来,将存储池 2 手动降级成了无数据保护 SHR ,淘了块 14T 二手企业硬盘准备加进存储池 1 (脑抽的开始); 网上搜了一圈,发现 raid0 扩容好像是不可能的,但在 CSDN 看到有篇文章说扩容成功了,就抱着侥幸心理进行了以下操作:

    mdadm --grow /dev/md2 --raid-devices=3 --add /dev/sata4 

    执行成功,同时开始了时长两周的空间重建,过程/proc/mdstat 信息如下:

    Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [raidF1] md3 : active raid1 sata3p5[0] 2925435456 blocks super 1.2 [1/1] [U] md2 : active raid4 sata4[3] sata1p3[0] sata2p3[1] 23428126720 blocks super 1.2 level 4, 64k chunk, algorithm 5 [4/3] [UU__] [==================>..] reshape = 93.0% (10902819456/11714063360) finish=426.7min speed=31685K/sec md4 : active raid1 nvme0n1p1[0] 488381952 blocks super 1.2 [1/1] [U] md1 : active raid1 sata1p2[1] sata3p2[3] sata2p2[2] 2097088 blocks [4/3] [_UUU] md0 : active raid1 sata1p1[1] sata3p1[3] sata2p1[2] 2490176 blocks [4/3] [_UUU] 

    昨晚成功后,群晖报无法重组,mdadm -D /dev/md2 查看信息,显示如下:

    /dev/md2: Version : 1.2 Creation Time : Thu Feb 17 21:02:49 2022 Raid Level : raid0 Array Size : 35142190080 (33514.20 GiB 35985.60 GB) Raid Devices : 3 Total Devices : 3 Persistence : Superblock is persistent Update Time : Tue Jan 21 23:28:13 2025 State : clean Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 Chunk Size : 64K Name : Stone_NAS:2 (local to host Stone_NAS) UUID : fb1ab0ae:6e5622c3:6b01e711:3ce01664 Events : 425749 Number Major Minor RaidDevice State 0 8 3 0 active sync /dev/sata1p3 1 8 19 1 active sync /dev/sata2p3 3 8 48 2 active sync /dev/sata4 

    我寻思着既然已经添加进去了,群晖显示无法在线重组,那我就来重启下看看吧,于是悲剧发生了,存储池 1 直接显示丢失,硬盘 3 、4 显示已检测到,但是硬盘 2 显示无法访问系统分区

    Personalities : [raid1] md4 : active raid1 nvme0n1p1[0] 488381952 blocks super 1.2 [1/1] [U] md3 : active raid1 sata3p5[0] 2925435456 blocks super 1.2 [1/1] [U] md1 : active raid1 sata1p2[1] sata3p2[3] sata2p2[2] 2097088 blocks [4/3] [_UUU] md0 : active raid1 sata1p1[1] sata3p1[3] sata2p1[2] 2490176 blocks [4/3] [_UUU] 

    现在用 mdadm 无法查看到/dev/md2 的信息,请问大佬们,存储池 1 还有没有救,可以的话应该怎么操作?拜谢各位大佬!

    第 1 条附言    260 天前

    又看了下群晖正常的raid信息,md0应该包含所有硬盘的sata*p1,我这个md0里面的sata4p1应该是群晖自动创建的。

    /dev/md0: Version : 0.90 Creation Time : Thu Feb 17 20:28:33 2022 Raid Level : raid1 Array Size : 2490176 (2.37 GiB 2.55 GB) Used Dev Size : 2490176 (2.37 GiB 2.55 GB) Raid Devices : 4 Total Devices : 4 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Thu Jan 23 09:37:20 2025 State : clean Active Devices : 4 Working Devices : 4 Failed Devices : 0 Spare Devices : 0 UUID : af8fe441:25ce4536:05d949f7:b0bbaec7 Events : 0.950645 Number Major Minor RaidDevice State 0 8 49 0 active sync /dev/sata4p1 1 8 1 1 active sync /dev/sata1p1 2 8 17 2 active sync /dev/sata2p1 3 8 33 3 active sync /dev/sata3p1 

    md1应该包含所有硬盘的sata*p2

    /dev/md1: Version : 0.90 Creation Time : Thu Feb 17 20:28:36 2022 Raid Level : raid1 Array Size : 2097088 (2047.94 MiB 2147.42 MB) Used Dev Size : 2097088 (2047.94 MiB 2147.42 MB) Raid Devices : 4 Total Devices : 3 Preferred Minor : 1 Persistence : Superblock is persistent Update Time : Wed Jan 22 18:58:24 2025 State : clean, degraded Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 UUID : 829a277c:9fabaf79:05d949f7:b0bbaec7 Events : 0.296 Number Major Minor RaidDevice State - 0 0 0 removed 1 8 2 1 active sync /dev/sata1p2 2 8 18 2 active sync /dev/sata2p2 3 8 34 3 active sync /dev/sata3p2 
    第 2 条附言    260 天前

    正常的数据应该是sata*p3加到创建的存储池,但md2被我加成了sata4

    /dev/md2: Version : 1.2 Creation Time : Thu Feb 17 21:02:49 2022 Raid Level : raid0 Array Size : 35142190080 (33514.20 GiB 35985.60 GB) Raid Devices : 3 Total Devices : 3 Persistence : Superblock is persistent Update Time : Tue Jan 21 23:28:13 2025 State : clean Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 Chunk Size : 64K Name : Stone_NAS:2 (local to host Stone_NAS) UUID : fb1ab0ae:6e5622c3:6b01e711:3ce01664 Events : 425749 Number Major Minor RaidDevice State 0 8 3 0 active sync /dev/sata1p3 1 8 19 1 active sync /dev/sata2p3 3 8 48 2 active sync /dev/sata4 

    使用fdisk -l查看sata4信息如下:

    Disk /dev/sata4: 14.6 TiB, 16000900661248 bytes, 31251759104 sectors Disk model: WUH721816ALE6L4 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: 0x3353a82e Device Boot Start End Sectors Size Id Type /dev/sata4p1 2048 4294967294 4294965247 2T 83 Linux 
    13 条回复    2025-01-23 18:28:42 +08:00
    IsA26hN4DcQDS7Z9
        1
    IsA26hN4DcQDS7Z9  
       261 天前 via iPhone   1
    白群问客服
    hicdn
        2
    hicdn  
       260 天前 via Android   1
    楼上说的对,白的问客服,转技术支持。高价硬件里包含了技术支持的费用。
    stong2
        3
    stong2  
    OP
       260 天前
    @Raynard #1
    @hicdn #2
    我也问了群晖,就是公式化的回复说我这个操作是不对的,并且我通过 ssh 操作他们不管
    vibbow
        4
    vibbow  
       260 天前   1
    你的原始 md2 是 raid 4 ,然后你对 md2 做了 grow

    然而...

    https://man7.org/linux/man-pages/man8/mdadm.8.html#For_create,_build,_or_grow:
    --raid-devices
    It is never allowed for RAID4, RAID5 or RAID6.
    vibbow
        5
    vibbow  
       260 天前   1
    更正:
    https://www.suse.com/support/kb/doc/?id=000020890

    看起来你的 grow 是成功了的
    vibbow
        6
    vibbow  
       260 天前   1
    还有一种可能性

    NAS 会自动创建系统分区(并加到系统盘的 raid1 里)
    你看你的 md0 和 md1 ,都是现有硬盘的分区

    但是你的硬盘 2 已经有一个分区(并且被 mdadm 占用),所以创建这个分区失败,所以提示
    硬盘 2 无法访问系统分区。

    你现在需要把你的硬盘 2 拔下来插电脑上,看看上面的分区状态是什么,如果是无分区(并且有 mdadm 的 superblock ),那么可能还有的救。

    如果已经被 NAS 自动分区了,那就 GG 了,你现在的 RAID 0 也没了。
    alfawei
        7
    alfawei  
       260 天前   1
    你这个是就是瞎操作,数据没有备份就折腾。
    raid1 拿掉一个硬盘还行,raid0 也折腾
    stong2
        8
    stong2  
    OP
       260 天前
    @vibbow 我翻了下最开始的记录,md2 是 raid0 ,使用了 grow 之后,过程中显示是 raid4 ,grow 成功后显示成 raid0 ;
    但是看了下好像群晖的硬盘要创建两个分区 sata*p1 和 sata*p2 分别加到 md0 和 md1 ,然后把 sata*p3 加到数据分区组成 raid ,而我新增的硬盘只是粗暴建了一个分区 sata4p1 直接加到 md2 了,这应该是新加的硬盘 2 无法访问系统分区的原因。
    stong2
        9
    stong2  
    OP
       260 天前
    @alfawei 是的,数据很重要,我当时脑子一热,看到 csdn 那篇说扩容成功了就头铁着直接上了= =
    alfawei
        10
    alfawei  
       260 天前   1
    @stong2 那你只能拆出来恢复数据了
    stong2
        11
    stong2  
    OP
       260 天前
    @alfawei 好的吧= =
    linzyjx
        12
    linzyjx  
       260 天前   1
    raid0 就别瞎折腾了,数据重要就下盘去做数据恢复吧。能逻辑恢复的话应该也不会太贵
    stong2
        13
    stong2  
    OP
       260 天前
    @linzyjx 嗯呢呢,是的
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2352 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 30ms UTC 15:45 PVG 23:45 LAX 08:45 JFK 11:45
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86