6

I am copying huge file from NFS mount using dd:

dd if=/mnt/nfs/image.img of=/dev/sda 

I need to limit the speed of reading from NFS. How can I achieve it? The only precondition is to use some easy compilable utility in order to put into my custom ram-only live linux distro.

2
  • 1
    Forget about dd. It would be simpler, less error-prone and faster to run cat /mnt/nfs/image.img >/dev/sda Commented Aug 25, 2015 at 23:48
  • Still I need to limit the speed becauseI have around 40 similar boxes copying from NFS and image is 2GB, thus killing NFS box and network. Commented Aug 26, 2015 at 5:58

1 Answer 1

6

You could use pv:

</mnt/nfs/image.img pv -L 5m >/dev/sda 

The -L flag limits the throughput to 5 megabytes per second. pv also writes to the stdout so you have to redirect to the target with >.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.