Hey guys, I want to clone the contents of an old SSD to my openmediavault array, but I'm but sure how to do it. I could use clonezilla on a separate machine, but then I'll be limited to gigabit transfer speeds.
If I plugged the SSD directly into the server, is there a way to clone the contents to the array from within openmediavault?
If you just want to make an image then you could use dd. The command would be something like dd if=/dev/sdx of=/path/to/image.img status=progress where /dev/sdx is the ssd and /path/to/image.img is where you want to store the image file.
I was hoping to do a full on clone, but maybe I'm not sure what I need. Basically, my old OS drive got corrupted by AVG, and I want to back up everything on the drive before I go digging and try to remove AVG. I have irreplaceable data that was on the drive, and this was before I could afford redundancy so this is the only copy of that data.
From what I understand, I can't access the individual files if I create an image, correct? So if I fail to fix the corrupted SSD, I guess I could just restore the image to the drive and try again?
You can mount the image in linux (and probably windows too) and access the files that way. If you just want to copy the file then you can plug the ssd in and copy the files over. An image will allow you to restore the whole disk as it is, including the boot manager to the SSD or a new disk.
dd will do a full clone, it is the same thing that clonezilla does.
Alright, that sounds like what I need to do. I'm a noob to command line, so could you tell me how I list the drives so I can confirm which drive letter the SSD gets, as well as how I list the directory for the array so I can find my destination folder?
you can run lsblk and blkid and look for something which matches the size and format of your SSD, it will probably be the only thing that uses NTFS format. For example if you see an ntfs partition at /dev/sdc1 or something then run dd using /dev/sdc, that will clone the whole disk and not just the partition.
I'm not sure where OMV mounts it's storage, it's probably in /media but I'm not sure. If you run cat /etc/mtab that will list everything that is currently mounted and you should be able to find it in there.
/dev/md0 is a block device, not the mount point, you need to find where that device is mounted. run grep /dev/md0 /etc/mtab you should get a line where the first bit is /dev/md0 and the next bit is the mount point.
Also, you need to be really careful when using dd, it will wipe your array if you choose the wrong output. make sure that where you are pointing it is actually a file in a directory and not the block device.
YAAAAYYY!!!!!!!!! Man that was stressful, but finally with your help I've learned a few things about Linux and finally got it imaging! I'll post again if I run into any issues, but as far as I can tell everything is running smooth. Thanks so much for the help!
Well, now it seems I've gotten to the next hurdle... The image that I created is corrupted since the disk it came from was corrupted. The files that are corrupted are part of the actual Windows 7 OS that was on the SSD, not my data as far as I am aware. While I'd love to make it bootable again, my main goal is just to save my data. Do you have any ideas for what I should do? The SSD shows up as two local discs when I plug it in to my Windows 10 machine, but they don't show labels or sizes, and Recuva, EaseUS, and Disk Management will all not load with this drive attached.
You don't have to use rsync with an -ah it means archive and human readable. --compress-level=0 will really push the transfer through, and --progress is just that. These are optional, but I typed them as force of habit. Glad you recovered your stuff.
So with the path to the SSD set to /dev/sda2 I get skipping non-regular file "sda2" so I tried /dev/sda/sda2 and I get rsync: change_dir "/dev/sda" failed: Not a directory (20) What am I doing wrong here? Edit: So I guess the SSD is recognized, but not "mounted"? How do I mount it but make sure I don't format it in the process?
And thank you for your help by the way, this is so cool to finally be getting all my stuff back!