Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sending -USR1 via kill to dd does NOT result in progress
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
jmckey
n00b
n00b


Joined: 28 May 2019
Posts: 2

PostPosted: Tue May 28, 2019 2:31 pm    Post subject: sending -USR1 via kill to dd does NOT result in progress Reply with quote

I'm running CentOS 7 (I heard y'all are cool even with non Gentoo stuff, hope I understood that correctly) and ran dd to close a whole 1.8 TB drive that just has 1 partition taking up almost the whole drive. However, it's been running for 6 days now when based on my math it should have been done in 6 hours (slower read speed of the 5400 rpm drive is 88 mB/s according to reviews for sequential reads). I tried doing 'sudo kill -USR1 40100' from a different terminal window but it did not pop-up any progress on the original window. I also tried killall. Here's the original dd syntax I used:

dd if=/dev/sdd of=/dev/sdc

Knowing what I know now, I should have added the progress switch... live and learn the hard ass way I guess.

dd --version reveals I've got: dd (coreutils) 8.22 (written by Paul Rubin, et al)

Also, dd --help does reveal that -USR1 is a supported switch signal (via the kill command) to get progress on the copy operation.

The input/read drive is from a ddrescue of a customer's external Seagate Slim disk drive that went bad (this was a backup drive, but they don't have a backup of the backup). So I'm sort of doing a dd of a prior ddrescue if that makes sense. Basically the data is not currently addressable but as I understand how dd works that shouldn't matter to it's functionality. It just copies the bits/blocks from start to end of the disk. I wanted to mention this in case that might be what is making dd behave weird. I am seeing constant light activity on both the read drive and the write drive and it feels like the read drive is working but the write drive seems awfully quiet (it is a hybrid WD black though, my first to have sitting in this Nexstar external drive mount so i'm not sure what to expect from it compared to other 3.5" drives I usually have in it).
_________________
CentOS, Debian, & Fedora installed at home but will use whatever is right for whatever need. Unfortunately for work I spend most of my time in Microsoft Windows.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10304
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue May 28, 2019 4:14 pm    Post subject: Reply with quote

Moved from Other Things Gentoo to Unsupported Software. Not about Gentoo so it fits better here.

This has worked for me in the past. Edit: Works for me now.

Note that you can send signals to your own processes. No need for sudo (although that works too). Try just:
Code:
kill -s USR1 {process-id}
- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43599
Location: 56N 3W

PostPosted: Tue May 28, 2019 5:22 pm    Post subject: Reply with quote

jmckey,

Welcome to the Gentoo forums.

Code:
dd if=/dev/sdd of=/dev/sdc
is going to be slow. It does one input block at a time.
If you are really unluckly and the input block size is 512b and the output block size is 4096b, you are going to get eight output read/modify/write for every eight read blocks.

bs=1M is a good addition to any dd command.

Your 5400 rpm drive will do about 88 MB/s with continuous reads on the outside of the platter. It will be zoned to get the data density up so will be under half that close to the spindle.
You are not doing continuous reads, or even close. Your dd command reads one sector, writes one sector.

These is no progress popup. dd spits out the progress in the running dd window.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jmckey
n00b
n00b


Joined: 28 May 2019
Posts: 2

PostPosted: Tue May 28, 2019 7:31 pm    Post subject: Reply with quote

Neddy,

Ok, it sounds like I should then just kill the dd with a -9 and start over. When I do that what else should I do to tweak the copy/clone process? There is about 7% of the 2 TB unused I believe so would it be faster to force it to not try to copy every empty/zero block (sparse switch?) or does it handle that intelligently on it's own? Also, would it be better to create the partition first (also just about 1.8 TB minus maybe 1.5 MB and then do a dd of the actual partition rather than the whole disk?

Obviously this time I need to add the 1mb buffer you suggested and the progress switch. Any other switches?
_________________
CentOS, Debian, & Fedora installed at home but will use whatever is right for whatever need. Unfortunately for work I spend most of my time in Microsoft Windows.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1753

PostPosted: Tue May 28, 2019 8:10 pm    Post subject: Reply with quote

Quote:
The input/read drive is from a ddrescue of a customer's external Seagate Slim disk drive that went bad

I think the signals are only processed between blocks. I've launched a bunch of DDs over network one day, and they were very slow to respond and always reported even numbers. I like big block sizes.
I wonder if your DD got stuck on some bad block. Or are you trying to write a new disk from an already recovered image file?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43599
Location: 56N 3W

PostPosted: Tue May 28, 2019 9:26 pm    Post subject: Reply with quote

jmckey,

dd is dumb. It has no knowledge of any filesystems that may be contained in the raw blocks its copying.
It doesn't stall or slow down on errors, it just aborts.

Use ddrescue if you need error recovery.

As you are dd'ing a ddrescued image on what we hope to be a good drive, that image may have holes in, where ddrescue could not recover the data from the original drive.
Whats in the holes depends on what you told ddrescue to do. Its either zeros or the junk that was there. The important point is that the whatever is there, you won't get a read error.

If you kill dd, it will tell you how much its done. Telling dd not to do this again is left as as exercise for the reader.
Hint
Code:
man dd
skip and seek.

-- edit --

sparse does not do what you think in does.
Its quite valid for an input file to contain a block of nulls.
Its also valid for the output location to be full of junk.
sparse will throw away the nulls you wanted to copy and leave the junk. You probably won't like that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum