Need help: complete hard drive swap

  • I have a ~28TB mergefs partition that I've cobbled together from a lot of small disks. However, I'm starting to worry about hard drive performance, because these disks are 4-5 years old at this point. I want to swap them out to a set of 4 10TB hard drives I just bought, but what is the most economical way to clone my existing mergefs partition so that I don't have to rebuild my entire OMV system from scratch? I have about ~21TB of data.

  • Like, let's say my mergefs partition is called "media," because it is. And it has as subfolders /Music, /TV, /Movies, /Comics, etc.

    Can I mount a new partition, call it media2, and then just use rsync or whatever to transfer /media/Music to /media2/Music, etc., and then, when I've transferred everything, umount /media, take the system down, swap out the disks, and remount /media2 as the new /media in OMV?

  • mergerfs is not a partition or a block device. It sits above your drives and creates a common point where the merged contents of drives in the pool can be accessed. (It just appears to be one drive.) You have justification for being concerned. Without protection from a failed drive, with something like SNAPRAID, data loss from a dead or dying drive is just a matter of time.

    So what do you have in mind? Do you want to copy data off of old drives to a new larger drives, until all the old drives are replaced? mergerfs will allow this.

    What is your storage policy and, are you familiar with the command line?

  • Thanks for the advice. I want to set up SnapRAID too, but I don't know how.

    So on the merged drive I have: my raw media files and my plex database (nothing else). All of my docker containers and OMV system are on a SSD. What I want to do is copy all of my media and my Plex database to the new, larger drives.

    I don't know what a "storage policy" is (I suppose "retain everything" fits) and yes, I am familiar with the command line.

  • Thanks for the advice. I want to set up SnapRAID too, but I don't know how.

    There's a -> thread that explains it. There are a couple of SNAPRAID threads that are a bit more simplified, -> here. Just note that, the parity disk must be the same size as the largest disk in the group, or larger. (If you're setting something up for the first time, check out the guides section of the forum.)

    This is what I was talking about, when I said storage policy.


    You said "several drives" earlier. Do you have a server chassis? How many slots are available for new drives?

    A couple tools that might make this easier are WinSCP and mc. The links to them and how to set them up are in this -> doc, on page 55 (this version).

  • Existing path, most free space. Didn't change from the default.

    I have a regular tower chassis, but it's pretty big. I don't have any free slots for drives, which is why I was hooking things up with a USB3 docking station.

    Is there something with WinSCP that I can do that I can't do with my Samba shares or SSH into my OMV machine from PuTTY?

  • Houston,, we have a problem....

    At least one new drive needs a local connection, for the purpose of copying data for an old drive to a new drive.
    (Otherwise, getting what you want done will be "interesting".)

    Do you have an external drive dock?

    How much free space is remaining on the (mergered) UnionFS drive?

    (BTW: Setting up SNAPRAID requires the use use of one drive for parity, the largest.)

  • Can anyone give me some more advice on this? I really need to migrate everything over to the new drives but am afraid I don't know how.

    Here's the current setup:

    OMV Box (The Vault): 10 disks of various size, totaling 28TB, 22TB used. In a Cooler Master mid-tower chassis. No free SATA ports on motherboard. Two disks in a USB3 docking station (with a spare bay). OMV system is on a SSD. 10 other disks are in a mergefs pool.

    What I want to do: swap old 10 disks to 4 new disks, growing my mergefs pool to 40TB. I will add more disks later to do a Snapraid but right now I just want my data on new disks.

    What I have: 4-bay USB3 docking station, time, middling know-how. Not afraid of CLI, rsync, or anything like that. I have a windows PC nearby and a dedicated screen for the NAS.

  • The first thing that's needed is a one-for-one clone (or a copy) of a smaller capacity drive onto one of the new 10TB drives.

    1rst option
    - Label the drives (with labels, stickers, etc.) that are currently in the USB dock, so you'll know which slots they were in, and set them aside so you can use the dock.
    - Shutdown, remove one of the drives you want to replace, from inside of the OMV server.
    - Take the USB dock to the windows machine, with the drive that's the source (the existing smaller drive) and the new (larger) drive that's going to be the destination.
    - With the two drives in the dock, and the dock connected to the Windows machine, boot up on clonezilla . (Using a bootable CD or USB thumbdrive.)
    - Clone the small drive to the larger drive. **Note this is going to take time.**
    - Install the new drive using the same connection as the older drive, inside the server.
    - Reconnect the USB dock, reinstalled the dock's drives in their original slots, bootup and check things out.
    - Repeat until all four of the new, larger drives are in.

    This is probably the safest route, with lower chance of a mistake.

    **It's possible to boot clonezilla on your OMV server. Using the last open slot of the USB dock for one of the new 10TB drives, an existing drive could be cloned onto a new 10TB drive - but, you'd need to positively identify both drives before each operation. This is probably the easiest route to get what you want done, but if a mistake is made, data could be lost. **
    If you clone drives using the OMV server, when you shut down clonzilla, be sure to remove the old drive before booting OMV. Otherwise, booting OMV with 2 functionally identical clones installed will cause some odd problems.


    2nd option

    Using the last slot in the USB dock and a new drive, you could do a drive-to-drive Rsycn job, using a process similar to what's in this guide, on page 61, in this version. (I'd recommend one change to the rsync command; leave the switch --delete out of the command line.)

    Note that the destination drive (the new 10TB drive), in this process is a "copy", not an clone.

    - When it's added to OMV, a new 10TB drive would need it's own label (10TBDATA1 ?), to function on OMV with the older drive it will be replacing. You'd need to wipe the 10TB drive, label it, and format it in the OMV GUI.
    - Setup and run the rsycn command you constructed, from the guide, ensuring that the smaller drive is the source, on the left side of the command line, and the larger 10TB drive is on the right. **This is going to take a long time.** The only way to be sure that the job is complete is to run the command line again and note, from the rsync dialog box, that nothing is transferred. (Both are the same.)
    - In the GUI; remove the old smaller drive from the mergerfs pool, then add the new larger drive to the mergerfs pool.
    - Shutdown. Physically remove the old drive, set it aside, and install the 10TB drive in it's place.
    - Bootup and check that all is well.
    (Repeat until all four drives are in.)

    Look over the above, and think it through. While it's the most labor intensive, I believe the 1rst option (cloning on a separate machine - using the dock), has the lowest risk of data loss. In any case, take your time so mistakes are not made.

    If all goes well, you'll have 4 new drives (40TB) installed, + the additional drives that are still part of the mergerfs pool. At this point, you'd have the extra storage room you're looking.

    Before talking about moving data, you'll need to supply the mergerfs policy that's in use.
    (Hopefully, it's "Existing Path, Most free space".)

  • Existing path, most free space. Didn't change from the default.

    I have a regular tower chassis, but it's pretty big. I don't have any free slots for drives, which is why I was hooking things up with a USB3 docking station.

    Is there something with WinSCP that I can do that I can't do with my Samba shares or SSH into my OMV machine from PuTTY?

    I'm not that familiar with snapraid/mergerfs... but if you were to say, boot all those drives on another OMV install, is it just as simple as mounting the merged drives on the new system.. as it is with singular drives?

    I ask (and assuming mounting a merged filesystem would be that easy, like it would be w/ singular drives)... Could you take something cheap (maybe an sbc you have around)... put OMV 4 on an SDCcard, set up your new drives on the sbc.. rsync all your data from the old drives on the old system, to the new drives on the sbc. This will probably take a while w/ that much data, but hopefully you have an sbc that supports gigabit ethernet

    When it's done, remove old drives from old system, put them on the new system. with singular drives, or even a traditional RAID, it would be that easy.

    Biggest disadvantage I can see here (other than maybe you not having an SBC) is you'll have a mess on your hands on the installed system as you'll probably have to go back and add all your system shares back, etc. It might be easier once your data is successfully migrated to the new drives, to just make notes of plugin settings, etc.. and do a clean install of OMV 4 and set everything up again (that's what I would do, but I've been told I do things ass backwards plenty of times.. :) )

    Just a thought.

  • The only way to be sure that the job is complete is to run the command line again and note, from the rsync dialog box, that nothing is transferred. (Both are the same.)

    Running rsync -a again is only suitable to catch outstanding changes on the source but to verify whether the previous transfer really resulted in all the data being copied 1:1 --checksum combined with --itemize-changes could be used to check for data integrity.

    Mentioning data integrity... this would be my greatest concern with this whole setup especially with some multi-bay USB drive dock (with SATA there's at least a primitive CRC mechanism in place resulting in corrupted data on the wire being retransmitted almost always... with USB it's gambling :) )

  • Another idea... (albeit more work but maybe the best course of action given what you listed you had on hand earlier)...

    You said you had a Windows PC... does it have 4 sata ports for the 10tb drives? You'll need two flash drives

    1. Download the OMV ISO and use Etcher to put it on a flash drive.
    2. Disconnect all drives on your windows system
    3. Boot the install USB, and install OMV to the 2nd flash drive.
    4. Shutdown and connect your blank data drives
    5. Format/Set them up as you desire.
    6. Set up rsync and sync the data from your old NAS, to your "New" NAS.
    7. Once you're done, move your drives to the old NAS, then reconnect all drives, etc. on your PC and boot Windows.

    Air Conditioners are a lot like PC's... They work great until you open Windows.

    Edited once, last by KM0201: clarity ().

  • Set up rsync and sync the data from your old NAS, to your "New" NAS

    In such a situation you should also think about not just setting up rsync but also rsyncd (since with the rsync daemon approach no enryption needs to happen which can otherwise bottleneck the whole process if one or both involved hosts perform poorly wrt encryption -- it's single threaded and if not hardware accelerated older CPUs can bottleneck the whole transfer rate significantly)

    And then it's about the transfer rate. Assuming 50 MB/s with 22TB will end up with over 5 full days for data transfer if everything works as expected (22 * 1024 * 1024 / 50 / 3600 / 24)

  • I probably wouldn't just set "one" job, fire it up and let it sync 20+tb over the days. Maybe set up a series of smaller jobs (break it down into 5tb jobs for example) but that's just me.

    Only other option I can think of, assuming OP's current NAS has an available PCIe slot... is pick up an inexpensive, linux compatible 4 port sata card. Hook new drives up to sata card and sync all your data from the old mergerfs, to the new one. When it's all done, shut down, remove all the old drives and properly mount the new ones.... If you've got some longish power and sata cables, you could just sit the drives on top of the case. You could then move your new drives to your internal sata ports if you wanted, or leave them on the sata card (of course you'd have to update all your shared folders still, dockers, etc.).

    Assuming the OP is in the states, this one is @ $30 bucks shipped.…rt-_-15-124-159-_-Product

    Several reviews say it works fine w/ Linux.

    I still think once all the data is moved, depending on how many shares he has, etc.. it might be easier to just reinstall the OS. If he's only using a couple of large shares.. then it wouldn't be to bad... but if we are talking 10, 15, 20 shares... to me.. that would just be to tedious to make sure all the plugins are disabled, delete the old shares, create new shares, add them back to your plugins, then turn all your plugins back on.

    It'd be easier to just take notes on all your settings and start new.

  • @lh1983:
    You're in an unfortunate situation where drives have been continually added, up to and including, using USB drive dock slots. At this point, there are few easy options and none that are truly fast. When the quantity of data is considered (enormous), any copy or clone operation is going to take a long time.

    The only option, I can think of, that will not take down your server for an extended period of time is, the Rsync drive-to-drive copy option.

    Of the two switches mentioned in this thread; you could add the -i switch (--itemize-changes), but if you're not familiar with grep command lines, search terms, etc., the log file created might not do you much good.

    The -c switch (--checksum) for data integrity, is definitely worth considering but it will slow the copy process down and work your CPU. I'm guessing, based on the size of your data store, that video files are the vast majority of your storage. If that's the case and an error or two creeps into a file transfer, it's unlikely to be noticed when a video file is spooled to a player.
    On the other hand, since your server will be up and running during the Rsync operation, time is not a crucial consideration. If a copy takes days, sobiet. Either way, your call.

    - If you're interested data integrity and itemized logging, this is an example command line, that could be used in conjunction with the guide, and notes above.
    rsync -ci/srv/dev-disk-by-label-DATA1//srv/dev-disk-by-label-10TBDATA1/

    - Alternately, the following command line could be used without checksums and the copy will go faster.
    rsync -av /srv/dev-disk-by-label-DATA1//srv/dev-disk-by-label-10TBDATA1/

    In either case, run the last command line again, and verify that nothing is transferred. You'd want to see something like the following, with no files transferred, to be sure that all files were transferred and that you have a 1 to 1 copy.


    On the 2nd run, if you see something like the following, which has a file listing, you'd want to run the command line at least one more time, just to be sure.
    Again, you want to see a dialog with no files listed. Run the command line as many times as is necessary to get that result.



    Remember, drive identification is crucial. You'll want to know that the drive you just finished copying, is the same drive you're physically removing and replacing with a new 10TB drive. Under Storage, File systems, the mount point can be matched to the device name. Under Storage, Disks, the device name is associated with the drive's serial number. It's best to write the serial number down, from the GUI, to be compared with the serial number on the drive's label when it's physically removed and replaced with a 10TB drive.

    And there is the approach of adding a controller (if needed) to the Windows PC, per @KM0201 's post. If it has some age on it and it will house 4 drives, you might even consider converting the Windows box into a backup OMV server. Give it some thought. With the time and effort you've investing in collecting all of that data, and with 40TB of new hard drives in hand, backing it all up to a 2nd server is an excellent idea. (Even if it's not critical data, losing all or part of 21TB would be painful. Without backup data loss is a very real risk.)

    With at least a few viable options to consider, the ball is in your court.

Participate now!

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