LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Trying to fix little accident on Synology Raid 1 System Volume (https://www.linuxquestions.org/questions/linux-general-1/trying-to-fix-little-accident-on-synology-raid-1-system-volume-4175698077/)

devedse 07-21-2021 07:01 AM

Trying to fix little accident on Synology Raid 1 System Volume
 
Hi all,

As of this morning I accidently screwed up my Synology device. I tried to manually install iperf3 on it for which I assumed you had to overwrite some files in the /lib folder on the synology device.

The second I did this operation my SSH connection disconnected and the device was unreachable.

Shit. Where's the CTRL+Z...
(you probably know this feeling)

Anyway, my train of thought on how to fix this is as follows:
1. The Synology device has 4 disks
2. There's 2 raid partitions on there. 1: The system partition (should be raid 1) and 2: The Synology Hybrid Raid partition
3. I'm not interested in the SHR partition I just want to fix those files on the system partition.

4. I thought let's put only drive 1 in an Ubuntu computer. Mount the drive, replace the /lib folder with the original en I'd be done. (I hope if I put this drive in my Synology first that it would sync up the other 3 drives system partitions. Hopefully I'd be right on this. (But please let me know if I'm not)

I haven't been able to get the drive to mount though, what I've tried:
Install mdadm + lvm2
I then followed lots of these commands: https://ubuntuforums.org/archive/ind...t-2331271.html

But I haven't been able to get it to mount.

The last thing that I tried was:
Code:

mdadm --create /dev/md0 --assume-clean --verbose --level=raid1 --raid-devices=4 /dev/sda1 missing missing missing
This showed me the following text:
Code:

mdadm: /dev/sda1 appears to contain an ext2fs file system
      size=2490176K  mtime=Wed Jul 21 09:49:03 2021
mdadm: /dev/sda1 appears to be part of a raid array:
      level=raid1 devices=4 ctime=Sun Dec  8 21:09:22 2019
mdadm: Note: this array has metadata at the start and
    may not be suitable as a boot device.  If you plan to
    store '/boot' on this device please ensure that
    your boot-loader understands md/v1.x metadata, or use
    --metadata=0.90
mdadm: size set to 2487168K
Continue creating array?
Continue creating array? (y/n) y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
root@ubuntu:~# mkdir /mnt/hoi
root@ubuntu:~# mount /dev/md0 /mnt/hoi
mount: /mnt/hoi: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.

As you can see I also tried mounting that /dev/md0 device but apparently that didn't work.

I'm a real linux newbie so I would love some help on this topic.

jefro 07-21-2021 03:21 PM

I think I'd go back to the Synology forums for this. There is more than linux going on here especially if you have an ARM device. In almost any case, moving disks to new hardware would be my last resort.
Synology has a huge following and answers should be there how to correct. You should be able to boot to a system that allows you to muddle though bringing up the arrays and inspecting/correcting data.

Not sure why it says this unless that is part of the OS/admin. "ext2fs" I'd think they would have moved to newer or other filesystem. Could it really be btrfs?

Not sure why or what you mean by manually install. Docker is mentioned as way.

syg00 07-21-2021 07:49 PM

Normally I wouldn't offer an opinion in such a case on a real drive, but I guess you still have the other 3 drives as fall-back.
Have you run the vgchange command ?
With the md0 array you created started, let's see this output.
Code:

lsblk -f
BTW, the reference to ext2fs is just a generic term used by the tools for any ext? filesystem.

devedse 07-22-2021 03:08 AM

I discussed this one with some other people and we came to the shared conclusion that I screwed up somewhere while trying the MDADM commands which probably overwrote some RAID things.

With that in mind and after 4 hours of frustration I decided to reinstall Synology DSM 7.0 which now fixed everything while leaving the data intact. I'll just have to do all configuration again.

syg00 07-22-2021 04:18 AM

Hopefully this will encourage you (all) to embrace the value of (external) backups. That's backups - plural.

RAID is not, and was never designed to be, backup.

devedse 07-22-2021 05:11 AM

Luckily I had backups :), so that wasn't the problem. It did learn me that I shouldn't copy files over to /bin and /lib folders though.

jefro 07-22-2021 02:59 PM

I see the ext2 is simply saying there is a filesystem.
https://forums.gentoo.org/viewtopic-...2-start-0.html


All times are GMT -5. The time now is 01:15 AM.