OMV 7 - Disk Clone Destination

  • I wanted to try using the Disk Clone plugin to backup my SD Card on my RPI4 and ran into an issue where the Destination does not show any File Systems or Shares under the Destination line.


    The share is there, I can see it on any system through SMB. There are other drives present as well but none are showing up when clicking on the pulldown for the destination. They are all present when I click on the Source.



    Is there something obvious I am overlooking?

    7.4.16-1 (Sandworm)

    Raspberry Pi 4 Model B Rev 1.5

    Linux 6.6.62+rpt-rpi-v8

  • Disk clone is for disk-to-disk.

    What you want is the backup plugin.


    On the CM4, I used a cmd line on a scheduled job.


    Later I can post it here.

    On phone now.

  • I would appreciate that Soma, thank you!

    These are the commands.


    Make sure the OUTPUT (of=) point's to where you want it to.(use a proper external PATH of your system)


    The INPUT if=/dev/mmcblk0 is the SDcard (on the CM, is the eMMC)

    If using a USB stick, the dev is sdX (where X is a specific letter that might change on boot/reboot)


    I installed PRIOR pigz (sudo apt install pigz) since it can use the 4 cores of the Pi/CM4 when compressing the previous created image.


    Code
    #Pi/CM Full backup command when on SDcard/eMMC
    sudo dd bs=4M if=/dev/mmcblk0 of=/srv/dev-disk-by-uuid-xxxx-yyyy-zzzzz/OS-Backup/piOS-`date +%y-%m-%d`.img conv=fsync status=progress
    
    #Compress img with pigz
    sudo pigz -vk /srv/dev-disk-by-uuid-xxxx-yyyy-zzzzz/OS-Backup/piOS-`date +%y-%m-%d`.img
    
    #Delete uncompressed images
    sudo rm -f /srv/dev-disk-by-uuid-xxxx-yyyy-zzzzz/OS-Backup/piOS-*.img


    In order to be sure that the image work's, flash it to a same/bigger size media (SDcard/USB stick) and boot the Pi with it.

    See if all is like it was with the old media.


    If you have questions, ask, ;)

    • Official Post

    I wanted to try using the Disk Clone plugin to backup my SD Card on my RPI4 and ran into an issue where the Destination does not show any File Systems or Shares under the Destination line.

    As far as I know, this plugin is used to clone the system disk from the GUI. So I think you need to connect an empty disk/SD card/USB pendrive to be able to clone, that's why the GUI is not showing you possible destinations of the cloned disk. Try it by connecting an empty disk.

    Keep in mind that once cloned you must disconnect the second disk. Both will have the same uuid and if you reboot with both drives connected at the same time you will have problems.

  • As far as I know, this plugin is used to clone the system disk from the GUI. So I think you need to connect an empty disk/SD card/USB pendrive to be able to clone,.....

    Oh, yes the destination has stuff on it and I assumed (doh!) that the cloning would simply overwrite everything with the same format and content.

    7.4.16-1 (Sandworm)

    Raspberry Pi 4 Model B Rev 1.5

    Linux 6.6.62+rpt-rpi-v8

  • Jumping in to this as I want to clone a data disk to another disk. Both disks are correct and seen by OMV, the destination being completely empty. When I enter Service/Disk Clone, I can select the source drive, but when I click on destination, nothing happens. No popup from which to select the destination, even though it is all in red saying it is required.


    So something is screwy. Is it possibly that it requires the destination to be exactly the same size as the source? In my case it is only half the size, but still 3 times larger than the data actually on the source.


    I could manually set up rsync, but an easy to use OMV plugin seemed the obvious way to do it. Why is it failing so spectacularly in not allowing me to specify a destination?

    • Official Post

    So something is screwy. Is it possibly that it requires the destination to be exactly the same size as the source? In my case it is only half the size, but still 3 times larger than the data actually on the source.

    You need to wipe the destination disk (can do that in the Physical Disks tab or wipefs -a from the command line). The diskclone plugin is not copying files.

    Why is it failing so spectacularly in not allowing me to specify a destination?

    It isn't failing at all. The plugin expects a wiped disk as a safeguard so that you don't accidentally overwrite a disk with data on it.

    omv 8.0-11 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.1 | compose 8.0.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks, yes understand that, but the intended destination had just been erased in preparation for this. However, I also created an XFS file system on it and that is what prevents the disk appearing in the destinations pop up. Wiping it again allowed it to appear and cloning now proceeds.


    However, the entire process is not clear. I get the need for safeguards to prevent inadvertent loss of data and once one knows, it seems clear enough, but when first presented with a disk copying procedure that lists no possible Destination it is rather obscure and could so easily have been made more understandable with some basic explanation on screen.


    Thanks anyway for prompting me to realise having a filesystem on the disc was the problem.

    • Official Post

    However, the entire process is not clear. I get the need for safeguards to prevent inadvertent loss of data and once one knows, it seems clear enough, but when first presented with a disk copying procedure that lists no possible Destination it is rather obscure and could so easily have been made more understandable with some basic explanation on screen.

    The destination is populated with the same code that populates the Filesystem creation dropdown in OMV itself. That dialog does not say it requires a wiped disk either. That said, it doesn't say create a filesystem either. It is cloning the entire disk not copying it. Copying in my opinion would sound like a file-based procedure.


    I get it that more documentation is needed but I do not have time to do that nor am I good at writing docs for noobs. I rely on the community to write those docs. Those docs can be linked to in the plugin but the documentation will not be put in the plugin (which would effectively force me to maintain it).

    omv 8.0-11 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.1 | compose 8.0.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks for qualifying me as a noob when I was dealing with Unix possibly before you were born, but I'm not a mind reader and cannot second guess what a 'developer' meant or intended. Terminology is often inconsistent and e.g. 'cloning' actually means making an identical copy. It does not specify the means of doing that and in fact is often used in the context of computer drives to describe the process of copying FILES to a different disc.


    I did also ask about disk sizes as dd cannot directly clone to a smaller disk. In the absence of any response to the contrary, I tried it anyway to see if this plugin gracefully deals with that, but after many hours I can confirm that no, this plugin does not overcome that limitation, provides no warning of this and simply produces an unusable disk.


    No matter, I wanted to confirm either way and will now use a different method of copying the drive to another and this thread will hopefully prove useful to others attempting to fathom the operation of this plugin.


    None of this means I don't appreciate the work put in to make OMV what it is. Sometimes though, digging out little nuggets of important information is more painful than it needs to be.

    • Official Post

    Thanks for qualifying me as a noob

    I definitely did not qualify you as a noob. I believe all docs should be written for noobs and I am not good at it. Sorry if you thought I was.


    when I was dealing with Unix possibly before you were born

    I have been dealing with Linux for 27 years, Unix for 33 years, and programming for 44 years. I don't think I am the youngin that you think I am.

    I did also ask about disk sizes as dd cannot directly clone to a smaller disk. In the absence of any response to the contrary, I tried it anyway to see if this plugin gracefully deals with that, but after many hours I can confirm that no, this plugin does not overcome that limitation, provides no warning of this and simply produces an unusable disk.

    You are correct. This plugin was written quickly and is not used by many. So, it hasn't been improved. I don't use it myself. It likely won't be ported to OMV8. I usually tell people to use clonezilla myself. And sorry I forgot to answer that question.

    Sometimes though, digging out little nuggets of important information is more painful than it needs to be.

    There are two people working on OMV - Volker on core OMV and me on omv-extras plugins. Both of us have families with kids in the home and are volunteering our limited time. If we don't put our time into writing code, features won't exist and bugs won't get fixed. If the docs aren't good, it is because we need help.

    omv 8.0-11 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.1 | compose 8.0.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Ha, ok so we're both oldies with similar ages of experience. :)


    I agree docs should be written for noobs to understand and I accept that was not aimed at me.


    I'll say again, I am truly appreciative of the work you do. OMV is fantastic and enormously useful. So kudos to you both. :thumbup:


    Doesn't mean it won't frustrate me occasionally though. ^^

Participate now!

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