In prepartaion for building one of those Raspberry Pi clusters for a demo, I was dumping the raspbian image to a 8GB class 10 SD card on my macbook pro. The write speed was abysmal…
laptop:~ user$ sudo dd if=./2015-11-21-raspbian-jessie.img of=/dev/disk2 bs=1m
Password:
3752+0 records in
3752+0 records out
3934257152 bytes transferred in 4278.617339 secs (919516 bytes/sec)
laptop:~ user$ diskutil eject /dev/disk2
laptop:~ user$
For those who care, that is roughly 73.5 minutes, to dump just shy of 4 GB of data.
That is unacceptable for any reasonable value of writing to a SD card, and I was sure I had done this much faster in the past. Apparently writing to the device rather than the raw device is not a good thing. I should have remembered this from writing to tape drives. You always dump to the raw tape device, /dev/rmtX, when backing up. Apparently this is also true for SD cards.
laptop:~ user$ sudo dd if=./2015-11-21-raspbian-jessie.img of=/dev/rdisk2 bs=1m
Password:
3752+0 records in
3752+0 records out
3934257152 bytes transferred in 366.896770 secs (10723063 bytes/sec)
laptop:~ user$ diskutil eject /dev/disk2
laptop:~ user$
This is approximately 6.1 minutes, a significant improvement.
As there are 6 cards to dump, I’ll take the under 40 minutes for all 6 instead of just over over 7.5 hours for all 6.