BTRFS replace

  • So I was playing around with btrfs as I detailed in a previous post and today I decided to test the replace feature of btrfs.

    Its not available via OMV so I was playing in the CLI and it actually worked perfectly fine, the disk was replaced and unmounted with the new disk showing as mounted on the same mounted directly


    e.g.

    This was the drive mount originally as shown by `df -h`

    Code
    /dev/vdc 15G 2.1G 13G 14% /srv/dev-disk-by-uuid-8515e0f0-05e3-4a51-8e27-e0e6d490d4b7


    after running this btrfs command the disk replacement started and completes successfully:

    Code
    btrfs replace start 1 -f /dev/vdb /srv/dev-disk-by-uuid-8515e0f0-05e3-4a51-8e27-e0e6d490d4b7

    This is the resultant output:

    Code
    /dev/vdb 15G 2.1G 13G 14% /srv/dev-disk-by-uuid-8515e0f0-05e3-4a51-8e27-e0e6d490d4b7


    The only real downside is that its a CLI task and as such OMV GUI doesnt know about it.

    The GUI shows a missing disk (/dev/vdc) which cant be unmounted (meaning it stays in fstab which could bork any reboot without manually removing it before hand).

    It doesnt show the newly added disk either which is fair enough as it has no knowledge of it but the 2 subVols created via OMV both show fine because the actual mount path never changed just the underlying disk.


    That actually works well because I didnt take mergerfs offline and it uses those sharedFolders as part of its setup and snapraid diff/sync both had nothing to do afterwards meaning snapraid was also happy with the change (snapraid config is set to use the subVols created in OMV not the disks themselves).


    Its not an ideal scenario but if you end up in a situation with a btrfs formatted disk needing replaced this was very very easy to do and at least gives you time to find an alternative while maintain your data.


    CH

  • ryecoaaron

    Hat das Thema freigeschaltet.

Jetzt mitmachen!

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