Mergerfs Pool of Drives - How to replace a Drive in the Pool

  • Hi All


    I have a 4 Bay HP Proliant MicroServer Gen 8. I have all the bays populated with a 4Tb, 2x 12Tb and 1x 14Tb drives in a MergerFS Pool. I have got a WD EasyStore 14Tb drive that I want to Shuck but I need a way to format the drive and transfer the data from the 4Tb drive already installed.


    I have ready some forum posts but would rather some help with step by step instructions to follow so that this runs smoothly. First problem I can see is how to get the new drive formatted. The HP Gen 8 has a spare Ethernet Port and 4x USB ports free at the back - 2x USB 3 which would work with the new WD Drive to connect but can this be done? Then if so what guide would I need to follow to format the new drive and then I might be able to use rSync or MC to transfer all the data thats on the 4Tb drive?


    I hope this all makes sense to someone and I can get the help needed


    Thanks in advance :P

  • I do this every time I need to add more space to my server but all the drive bays are full. So the only way to grow is to replace small, old drives with big new drives.


    I use a fairly straight forward procedure. Consult the man pages for how to use these programs.


    1) Clone the old small disk to the new large disk. I use dd. *

    2) Then on the new cloned disk, expand the partition to fill the entire disk using growpart.

    3) Then on the new cloned disk, expand the filesystem to fill the entire partition using resize2fs. You may be asked to check the disk first, use e2fsck.


    If you can use GParted, all of the above can be done within the one program on a single machine.


    Once you have done this, your new 14TB disk will be a bit for bit exact clone of the old 4TB disk. You can just replace the old one with the new one and not need to make any other changes to anything. However, you can't use both disks in the same machine until you format the old disk.


    * I run the dd clone operation over the network between two machines on an ssh connection. If you need those instructions ask. Hopefully you can plug your new 14TB disk into a USB port on your Proliant to do the clone, then shuck it.


    Good luck.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    Einmal editiert, zuletzt von gderf ()

    • Offizieller Beitrag

    I have just over 12Tb left in the mergerfs pool

    Another option, using only the OMV GUI. Since you have enough space in the pool to accommodate the existing data on the 4TB drive, you can do the following:


    - Remove the 4TB drive from the pool from the plugin GUI.

    - Copy existing data on 4TB drive to existing pool, rsync is a suitable tool for this.

    - Replace the 4TB disk with the 14TB disk.

    - Add the 14TB disk to the pool.

  • I do like the Good Luck at the end :) Ill need it!!!


    So to do this can I just ssh into the server and run the programs to do this?

    1) Clone the old small disk to the new large disk. I use dd. *

    2) Then on the new cloned disk, expand the partition to fill the entire disk using growpart.

    3) Then on the new cloned disk, expand the filesystem to fill the entire partition using resize2fs. You may be asked to check the disk first, use e2fsck.

    Regarding how to do this - would I attach the 14Tb new drive to the Proliant via the USB 3 and look to then run the programs you suggested whilst its connected?

  • - Remove the 4TB drive from the pool from the plugin GUI.

    - Copy existing data on 4TB drive to existing pool, rsync is a suitable tool for this.

    - Replace the 4TB disk with the 14TB disk.

    - Add the 14TB disk to the pool.

    So remove the 4Tb from the mergerfs pool using GUI - then using command line run rSync to copy the 7% on the 4Tb to the mergerfs pool. After this shut down the server and remove the 4Tb and replace with 14Tb drive. Do I format the 14Tb drive or just add it to the mergerfs pool?


    Sry if I sound like a beginner but I had a lot of help to set this up when I first got it and started using OMV. Not really had to do something like this so dont want to lose my data or basically screw things up

  • Sure, if you can attach the 14TB disk (either to am available SATA port or USB port) then it can all be done on the same machine and OMV already has the programs or they are installable.


    Just be very careful with dd and GParted. They destructively write to the destination device, so if you pick the wrong drive that data will be lost.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • I might try chente option first as it seems a little easier - with the knowledge that I have

    che

    Sure, that'll work, but you have changes to make and keep track of, and reverse.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    What changes would be made? From the sounds of it all that will happen is the files will be moved to another disc? Am I wrong?

    Yes, that would be the movement. There are several ways to do it, like everything in Linux. I would use rsync, preferably from the OMV GUI. But for that you must previously create a shared folder pointing to the 4TB disk and its contents once you have removed it from the pool.

    If you feel comfortable with the command line it will be faster.

    Important. If you create an rsync task to do this make sure to uncheck the Delete option. If you leave it checked you will lose all your data.

  • What changes would be made? From the sounds of it all that will happen is the files will be moved to another disc? Am I wrong?


    Im looking for the simplest easiest way for a novice to get the new drive in

    You have to remove the old disk from the pool, add the new disk to the system, format the new disk, add the new disk to the pool, copy the data from the old disk to the pool, and remove the old disk. There may be other things to fool with such as dealing with any shares related to the old disk, and any shares you may want on the new disk. Compare to typing three or four short commands in the CLI.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Could you walk me through what I need to do? Or for the 1st step is there a guide or a video tutorial - I dont want to get this wrong and lose my data. Also if Im given the correct commands for rSync Im sure I can put them in and get them to run correctly.


    Was easier just adding a drive to a spare bay :P

  • Compare to typing three or four short commands in the CLI.

    So could u walk me through the commands


    So the process wud be


    - Remove old disc from pool and remove from server

    - Add new disc, format and add to pool

    - How do I copy and add data from old disc to pool?


    OR


    Typing 3 or 4 commands


    As I said I need a walk through - Step by Step as I dont wanna screw this up - if thats possible?

  • chente suggested first method above, so he can walk you thru it and answer any questions.


    The commands in the shell for the way I suggested would be:


    Code
    Perform the disk clone using dd. Exact devices used in the command are to be determined, but here are samples.
    
    Source disk to Target disk on the same machine in a root shell:
    
    dd if=/dev/sdX of=/dev/sdY bs=1M status=progress
    Code
    Perform the clone over ssh connection between two different machines on a network. Device identifiers to be determined.
    Source disk on omv machine to Target disk on another machine in a root shell:
    
    root@omv:~# dd bs=1M if=/dev/sdX | ssh root@192.168.1.50 "dd status=progress bs=1M of=/dev/sdY"


    Shut the machine(s) down. Remove old small disk from OMV server and replace it with new larger cloned disk. Boot the server and verify that everything is just like it was. The cloned disk will still appear to be the same size as the old disk, but this will be fixed next.

    Done.


    If you can boot the machine with a Live Gparted disk, all of the above could be done that way somewhat easier. OMV offers a bootable GParted option, but you need a machine that has a keyboard and monitor. If you have the hardware you can figure this out yourself. The documentation is good and there are plenty of online HOWTOs and videos.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    chente suggested first method above, so he can walk you thru it and answer any questions.

    Could you walk me through what I need to do? Or for the 1st step is there a guide or a video tutorial - I dont want to get this wrong and lose my data. Also if Im given the correct commands for rSync Im sure I can put them in and get them to run correctly.

    To copy the data from the 4TB disk to the existing pool, after removing the disk from the pool, do the following:

    1. Create a shared folder with whatever name you want, for example old_data, pointing to the mount folder of that disk.

    2. Create an rsync task in the GUI to copy from the old_data folder to the mergerfs pool. This task must have the delete option disabled. Execute that task. If you want to make sure, select the test option and see what the job is going to be executed. If everything is correct, disable the test option and run the task again.

    Now you have all the data in the pool. You can delete the old_data shared folder and replace the disk. Then add the new disk to the pool.

  • Sorry for the delayed reply - Work and Family.

    To copy the data from the 4TB disk to the existing pool, after removing the disk from the pool, do the following

    So this is done in Storage - mergerfs

    1. Create a shared folder with whatever name you want, for example old_data, pointing to the mount folder of that disk

    This wud be in Shared Folders and point to /dev/sdc disk

    2. Create an rsync task in the GUI to copy from the old_data folder to the mergerfs pool. This task must have the delete option disabled. Execute that task. If you want to make sure, select the test option and see what the job is going to be executed. If everything is correct, disable the test option and run the task again.

    Regarding this - Ive never done it before but below is what I have wen I start to create one. If I have the above correct what wud I do for the stuff in here

    • Offizieller Beitrag

    This wud be in Shared Folders and point to /dev/sdc disk

    The assembly route is not that. It has to have a UUID.

    Regarding this - Ive never done it before but below is what I have wen I start to create one. If I have the above correct what wud I do for the stuff in here

    Fill in the second and third fields with the appropriate values and check the Trial run option.

Jetzt mitmachen!

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