You are not logged in.

#1 2020-02-22 23:49:50

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Clone half SSD with dd

Hi,
I have an SSD 1TB (which has a few errors), want to send it back to amazon ASAP, and I need to back it up completely, so I can recover files at a later time.

Question 1:
Since SSD is plugged into USB 3.0, and read speeds are fast, is it possible to split DD operation into 2?
As in, first half of SSD onto HDD1, and second half SSD onto HDD2

Question 2:
If not possible, how can I speed up dd? (does compression make it faster?)

Extra info:
I have HDD1 of 1.5 TB, 7200rpm, seagate, external.
HDD2 500GB, unknown.
I'd rather have dd output into file, and not a whole partition, hdds have files on them.
Do I need some sort of compression such as gzip? I have enough space, I just need it to be quick.
And before you ask, yes, I have been doing my research, but I have way too many options to consider, very quickly, and I don't want to mess it up.

Basically:
New SSD became corrupted, photorec did not work, had to be reformatted. PhotoRec can recover data this way, and I was able to recover aprox half of the SSD, but since I can't resume photorec (error) I want to do a hard copy now, return the SSD, and do photorec later.

Really appreciate help with this.


Don't forget to mark as [SOLVED].

Offline

#2 2020-02-23 00:21:06

frostschutz
Member
Registered: 2013-11-15
Posts: 1,657

Re: Clone half SSD with dd

dd has seek skip count (count_bytes) fullblock and more options so yes sure it's possible - somehow

but If the target drive has a Linux filesystem (supports sparse files) and you used fstrim and the SSD was not full of data, this might work great for you:

ddrescue --sparse --min-read-rate=10M /dev/brokenssd /mnt/external/brokenssd.img /mnt/external/brokenssd.ddrescue

this will create a full image but not occupy space for free areas (if they've been fstrim'd, zero'd or never ever written to).

if you run out of space with that you can resume, and maybe moving some of the other files away will then be easier than trying to join 2 HDDs with LVM or similar.

gzip is an option of course but its slow and probably only worth it for easy-to-compress data anyway, so gzip --fast (lowest ratio) if you want to go for that. gzipped files can not be loop mounted.

for gzip to be really effective you'd also need a lot of free (zeroed) space, and/or data that can be easily compressed so not movies etc.

there is also the literal `split` command for splitting files up (and `cat` to join them back together) in a pipe but it's hard to tell split to put one on this and the other on that HDD, so you'd have to start moving files around yourself

Last edited by frostschutz (2020-02-23 00:23:24)

Offline

#3 2020-02-23 01:06:43

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Re: Clone half SSD with dd

Hi, really appreciate your help.
Before you wrote I had set up this comand, it's going for an hour or so.

sudo ddrescue -f -n /dev/sdd2 /run/media/ubunchu/HDD1/ddrescue.img /home/ubunchu/rescue.log
GNU ddrescue 1.24
Press Ctrl-C to interrupt
Initial status (read from mapfile)
(sizes limited to domain 0 B to 1023999787008 B of 1024209543168 B)
rescued: 211484 kB, tried: 196608 B, bad-sector: 0 B, bad areas: 0

Current status
     ipos:   23178 MB, non-trimmed:   294912 B,  current rate:   7733 kB/s
     opos:   23178 MB, non-scraped:        0 B,  average rate:   6782 kB/s
non-tried:    1000 GB,  bad-sector:        0 B,    error rate:       0 B/s
  rescued:   23137 MB,   bad areas:        0,        run time:     56m 20s
pct rescued:    2.25%, read errors:        2,  remaining time:  1d 13h  6m
                              time since last successful read:          0s
Copying non-tried blocks... Pass 1 (forwards)

Thing is destination is NTFS (which is not ideal any way).
What do you suggest, should I try and format it to ext4 and do your code? Would it be faster than what I set up?
Keep in mind the SSD has been formatted to exFAT, so there is really no data visible.


Don't forget to mark as [SOLVED].

Offline

Board footer

Powered by FluxBB