[Gllug] dd and iotop weirdness

Richard Jones rich at annexia.org
Mon Nov 29 21:35:06 UTC 2010


On Mon, Nov 29, 2010 at 07:05:52PM +0000, general_email at technicalbloke.com wrote:
> I wanted to zerofill 2 drives, both SATA2 1.5TB from the same batch, so 
> I put them both in a spare box and booted to an Ubuntu 9.04 live CD 
> (10.04 wouldn't start properly on it). If listed the drives with fdisk 
> -lu and saw they were /dev/sda and /dev/sdb respectively. To zero each 
> disk I issued the command 'sudo dd if=/dev/zero of=/dev/sdX bs=1M &' for 
> each of them. I then, in 2 separate terminals issued 'sudo watch -n 5 
> kill -USR1 <PID>' so I could see how far they had got. The two watch 
> commands seemed to want to both output the the same terminal which was 
> messy (no carriage returns) but I could make out that /dev/sdb was being 
> written at +80MB/s and /dev/sda was only averaging ~15MB/s. Both disks 
> are identical samsungs. I installed iotop to confirm these speeds and 
> saw the same thing.

It's been a very long time since I looked at (P-)ATA but if those were
IDE drives then they'd be sharing the same physical bus and
controller.  SATA is a bit different because the pseudo-SCSI driver
used in the kernel will allocate /dev/sdX device names sequentially no
matter what the physical arrangement.

You can probably tease out the physical arrangement of drives, buses
and controllers by looking at 'dmesg' and/or the contents of
/sys/block/sd*  It might have a bearing on the problem.

Rich.

-- 
Richard Jones
Red Hat
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list