Newb in need of some help removing disks with snapraid and mergerfs

  • Gallery of settings for reference


    I discovered 2 of my old smaller drives are pretty bad off according to snapraid's SMART report. I built my first server with snapraid and mergerfs to pool a bunch of old drives. Then I added a new pair of 8tb drives after scouring Best Buy, one for storage and one for the new parity. Now I want to remove the 2 risky drives (device names sdd and sdb) permanently by copying their data to the sdc disk (still an old smaller disk but in good shape).


    Since I pooled the disks and made a snapraid array, I have no idea how to copy data from individual disks before removing them. Any suggestions?

  • Interesting that your drives have 0 errors and yet a high failure %. Almost all my drives have a handful of errors and yet the largest failure % is 10%.


    Anyway, I'd ssh into the box and copy the files using good ole cp as root. You could install midnight commander or use x11 port forwarding and a gui filemanager like Thunar. The options are many.


    Once the files are copied over, you can remove the drives from snapraid using the plugin gui and then resync.
    snapraid diff
    snapraid -h sync
    snapraid scrub

  • Since I pooled the disks and made a snapraid array, I have no idea how to copy data from individual disks before removing them. Any suggestions?

    in OMV you can share the pool that mergerFS do with all disk , but you can share disk individually too ( in fact only can share folders inside the disk, but can be enought).


    EG: You have 3 disk in a mergerFS pool to share the folder "Video", this mean that you have a folder named "Video" in each disk, that you can share by SMB to copy to other (new) disk.


    Sorry if this is not true en SnapRaid (I talk about MergerFS only)

  • When I try this, I get a content error that says I am missing the disk that I deleted from the Snapraid setup


    Code
    Loading state from /srv/dev-disk-by-label-VOLUME2/snapraid.content...
    Decoding error in '/srv/dev-disk-by-label-VOLUME2/snapraid.content' at offset 89
    The file CRC is correct!
    Disk 'Data1' with uuid '04897033-cee2-4d9b-a4a2-fc4334d076b4' not present in the configuration file!
    If you have removed it from the configuration file, please restore it
  • Here's what the snapraid FAQ says about removing a disk:
    http://www.snapraid.it/faq#remdatadisk

    Zitat

    How can I remove a data disk from an existing array?


    To remove a data disk from the array do:

    • Change in the configuration file the related "disk" option to point to an empty directory
    • Remove from the configuration file any "content" option pointing to such disk
    • Run a "sync" command with the "-E, --force-empty" option:

      • snapraid sync -E
      • The "-E" option tells at SnapRAID to proceed even when detecting an empty disk.
    • When the "sync" command terminates, remove the "disk" option from the configuration file.

    Your array is now without any reference to the removed disk.


    So I'm not sure how that jives with using the plugin since the plugin edits the config file.

  • Here's what the snapraid FAQ says about removing a disk:
    http://www.snapraid.it/faq#remdatadisk

    So I'm not sure how that jives with using the plugin since the plugin edits the config file.

    Yeah, that is where I get lost because I have done everything via the GUI plugin. If I knew how to get to the content files on the disks, I could just delete them and start new, but I have no idea. I only really know how to create a shared drive to access on windows later. I am not worried about having to rebuild the sync.

  • The content files are listed in snapraid.conf which you can see from the plugin gui. In order to do what you want to do, you need to be able to ssh to the box and perform some tasks on the remote terminal.

    OK, I have only tested the ssh once when I set it up but i think i know how to run it again. I was looking at something like WinSCP as well to find the content files.

  • You'll definitely need access to the local file system to delete the content and parity files if you want to start over. I'd try the snapraid recommended method first though.
    You'll run the snapraid sync -E from the terminal.

  • OK, I used WinSCP to access the content files on each disk and delete them. Then the snapraid sync -E finally ran. I had to run normal sync again to get the content files to reappear. The 2nd sync didn't actually do anything but create those content files. Only took a few seconds. I suppose the parity drive didn't repeat those files I copied over right? I didn't wipe the parity disk before redoing the sync

  • I just did something similar, except I was replacing old small drives with newer, large drives. These are the relevant steps from my process and it seems to have worked so far:


    • Remove references to the "bad" drives in both SnapRAID and MergerFS (through the GUI to make sure no data is being written to these drives)
    • rsync -avxHAWX --numeric-ids --info=progress2 /srv/olddiskpartition /srv/newdiskpartition
    • Run a SnapRAID diff (or check to be extra careful) to ensure all files are present
    • When you're sure that all data has transferred successfully without corruption, etc, run a sync with your new SnapRAID config (old drives gone)
    • Unmount the old drives in the Filesystem GUI





    My process was a bit longer because I was adding new drives, not using one already present on my server, but I think this should be simple enough. Either run the rsync locally or make sure to use screen if via SSH.

  • I guess I could have looked at the official FAQ before starting my process:


Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!