removing a drive with snapraid+mergerfs

  • hi everyone, first of all i'm a linux newbee, so i've done most things from the GUI, but i am able to connect to terminal with PuTTY



    so im trying to remove a drive called Data3Blue, which is empty, but if i uncheck DATA from the snapraid gui then a check command will return:


    Code
    Disk 'Data3blue' with uuid 'a93e6233-9ecb-4659-8e31-d33f3817d9db' not present in the configuration file!
    If you have removed it from the configuration file, please restore it


    the same applies if i try to do anything else to take the drive off:
    Delete Samba/CIF shares

    Delete the Shared folders

    Unmount and Delete the file system from file systems tab ( shows "referenced : no' )

    and turn S.M.A.R.T monitoring off for the physical disk(s), then turn S.M.A.R.T off completely
    Delete the drive from SNAPRAID tab .


    so i do know the FAQ says


    Quote

    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:
      Code
      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


    but as a noob, this raises more questions than it answers too, so the way i understood it,


    from terminal, logged as root, i tried mkdir /home/empty/ to crate an empty folder called empty because i'm cheeky

    then, assuming the configuration file mentionned is indeed /etc/snapraid.conf, i tried to nano /etc/snapraid.conf


    so then my conf says :


    Code
    #####################################################################
    # OMV-Name: Data3blue Drive Label: 1toblue
    disk Data3blue /home/empty


    the sync goes on, and mentions replacing the drive's UUID, assuming it's normal, i'm supposed to remove the "disk" option from the conf but once this is done, if i try to run a sync, i get the error:

    Code
    Disk 'Data3blue' with uuid 'adf7648b-d022-4683-ab82-d660e6501d10' not present in the configuration file!
    If you have removed it from the configuration file, please restore it

    same error, new uuid though...

    so i suppose i can remove the drive now but i'm still stuck with that drive's occurence in that empty folder?!


    then i have found somewhere that i could put a file in the empty dir, then run a sync, then delete that file, then a sync gives me this:

    Code
    WARNING! All the files previously present in disk 'Data3blue' at dir '/home/empty/'
    are now missing or rewritten!
    This could happen when some disks are not mounted
    in the expected directory.
    If you want to 'sync' anyway, use 'snapraid --force-empty sync'.


    so again i run snapraid sync -E which worked , so i nano'd back into the conf, added a # before the disk line, and ran a sync again and it went fine....



    so, it seems that id did work, but,


    isn't it a lot of steps?
    did i do the proper thing there or is there a more straightforward method? i feel like i was fumbling around a LOT :| and it seems that the conf file has to be modified 3 times in total with this method?



    how could i have done better?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!