Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Sep 2015 11:10:40 -0453.75
From:      "William A. Mahaffey III" <wam@hiwaay.net>
To:        FreeBSD Questions !!!! <freebsd-questions@freebsd.org>
Subject:   Re: dd question
Message-ID:  <5606C236.5060703@hiwaay.net>
In-Reply-To: <5606A7A4.5000301@hiwaay.net>
References:  <5606A4FF.4090105@hiwaay.net> <5606A7A4.5000301@hiwaay.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 09/26/15 09:16, William A. Mahaffey III wrote:
> On 09/26/15 09:05, William A. Mahaffey III wrote:
>>
>>
>> I am preparing a USB stick for use to install FreeBSD 9.3R on 2 new 
>> boxen I am bringing online. I already had the FreeBSD 9.3R img dd'ed 
>> to that stick last year when I provisioned this box, but for some 
>> reason, when I plugged the stick into my USB port today to copy some 
>> additional files to it (scripts to be used during installs to 
>> partition & slice up HDD's), I got errors in my syslog file & 
>> couldn't mount the drive for the copies. No problema, I'll just re-dd 
>> the image to the device & start over, all I would lose is output from 
>> the previous install (this box, last year this time). However, I 
>> notice the dd is proceeding *VERY* slowly:
>>
>>
>> [root@kabini1, /etc, 8:47:59am] 508 % ll /dev/da0*
>> crw-r-----  1 root  operator  0xd2 Sep 26 08:29 /dev/da0
>> crw-r-----  1 root  operator  0xcd Sep 26 08:29 /dev/da0a
>> [root@kabini1, /etc, 8:48:09am] 509 % ll 
>> /net/q6600/home/ISOs/BSDs/FreeBSD/9.3/
>> total 1530556
>> -rw-r--r--  1 wam  users  178749440 Jul 26  2014 
>> FreeBSD-9.3-RELEASE-amd64-bootonly.iso
>> -rw-r--r--  1 wam  users  671152128 Jul 26  2014 
>> FreeBSD-9.3-RELEASE-amd64-disc1.iso
>> -rw-r--r--  1 wam  users  717373440 Jul 26  2014 
>> FreeBSD-9.3-RELEASE-amd64-memstick.img
>> -rw-------  1 wam  users        811 Jul 26  2014 checksum.MD5.txt
>> [root@kabini1, /etc, 8:48:19am] 510 % dd 
>> if=/net/q6600/home/ISOs/BSDs/FreeBSD/9.3/FreeBSD-9.3-RELEASE-amd64-memstick.img 
>> of=/dev/da0
>> 94834+0 records in
>> 94834+0 records out
>> 48555008 bytes transferred in 542.035379 secs (89579 bytes/sec)
>> 101599+0 records in
>> 101599+0 records out
>> 52018688 bytes transferred in 580.466607 secs (89615 bytes/sec)
>>
>> I got that output by sending the SIGINFO signal to the dd process 
>> from another shell window. My question is: Why so slow (89-ish KB/s) 
>> ? I have gigabit switched LAN (125 MB/s theoretical speed), & most 
>> other file copies or rsyncs across the LAN go at about 1/3 - 1/2 of 
>> theoretical speeds, which is AOK by me. Any ideas ? TIA & have a nice 
>> weekend.
>
>
> Update: I got tired of waiting & just copied the img files over from 
> the other box to do the dd in case the interaction of dd & NFS were a 
> problem:
>
> [root@kabini1, /etc, 9:12:23am] 511 % cp 
> /net/q6600/home/ISOs/BSDs/FreeBSD/9.3/FreeBSD-9.3-RELEASE-amd64-memstick.img 
> .
> [root@kabini1, /etc, 9:12:39am] 512 % dd 
> if=FreeBSD-9.3-RELEASE-amd64-memstick.img of=/dev/da0
> 3049+0 records in
> 3049+0 records out
> 1561088 bytes transferred in 17.511796 secs (89145 bytes/sec)
> ^C9584+0 records in
> 9583+0 records out
> 4906496 bytes transferred in 54.403733 secs (90187 bytes/sec)
> [root@kabini1, /etc, 9:13:51am] 513 %
> [root@kabini1, /etc, 9:13:51am] 513 %
> [root@kabini1, /etc, 9:13:52am] 513 %
> [root@kabini1, /etc, 9:13:52am] 513 % uname -a
> FreeBSD kabini1.local 9.3-RELEASE-p24 FreeBSD 9.3-RELEASE-p24 #0: Sat 
> Aug 22 01:54:44 UTC 2015 
> root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
> [root@kabini1, /etc, 9:13:55am] 514 %
>
>
> Note that the cp happened pretty quick, 717-ish MiB in about 15 sec., 
> or around 45-ish MB/s, about 1/3 of max, quite acceptable to me. 
> Obviously, the dd is still excruciatingly slow .... What gives ? TIA & 
> have a nice weekend ....
>

Well, I got tired of waiting (again) & moved the process to my last 
remaining Linux box & did the dd there. It completed OK & for grins I 
inserted it back into this (FreeBSD 9.3R-p24) box. It created 2 devices:

[root@kabini1, /etc, 11:04:30am] 529 % lltr /dev/da0* ; date
crw-r-----  1 root  operator  0xd1 Sep 26 11:01 /dev/da0a
crw-r-----  1 root  operator  0xd0 Sep 26 11:01 /dev/da0
Sat Sep 26 11:06:37 MCDT 2015
[root@kabini1, /etc, 11:06:37am] 530 %

It used to create /dev/da0s1, but no matter, I manually mounted the da0a 
partition & I can see stuff there, although it reports a bad FS size:

[root@kabini1, /etc, 11:07:53am] 530 % df -h ; w ; pstat -hms ; uname -a 
; hwclock -r ; date
Filesystem            Type         Size    Used   Avail Capacity Mounted on
/dev/ada0p3           ufs           19G     11G    6.2G    65%    /
devfs                 devfs        1.0k    1.0k      0B   100% /dev
/dev/stripe/usr_str   ufs           58G     10G     43G    19% /usr
/dev/stripe/home_str  ufs          3.4T    209G      3T     6% /home
procfs                procfs       4.0k    4.0k      0B   100% /proc
tmpfs                 tmpfs        8.0G     32k      8G     0% /tmp
linprocfs             linprocfs    4.0k    4.0k      0B   100% 
/compat/linux/proc
fdescfs               fdescfs      1.0k    1.0k      0B   100% /dev/fd
/dev/da0a             ufs          682M    636M   -8.8M   101% /media/sd
11:07AM  up 12 days, 18:34, 7 users, load averages: 0.10, 0.28, 0.31
USER       TTY      FROM                      LOGIN@  IDLE WHAT
wam        v0       -                        13Sep15 12days xinit 
/home/wam/.xinitrc -- /usr/local/bin/X :0 -auth /home/wam/.serverauth.1133
wam        pts/5    :0                       13Sep15 6days ssh -2 -X -l 
wam 4256ee1
wam        pts/3    :0                       13Sep15  3:36 ssh -2 -X -l 
wam 4256ee1
wam        pts/0    :0                       13Sep15 3days ssh -2 -X -l 
wam 4256ee1
wam        pts/2    :0                       13Sep15 4days ssh -2 -X -l 
wam 4256ee1
wam        pts/4    :0                       13Sep15 23:52 ssh -2 -X -l 
wam rpib+
wam        pts/1    :0                       13Sep15    21 ssh -2 -X -l 
wam rpib+
Device          1M-blocks     Used    Avail Capacity
/dev/ada0p2          4096     1.7M       4G     0%
/dev/ada1p2          4096     1.8M       4G     0%
/dev/ada2p2          4096       2M       4G     0%
/dev/ada3p2          4096     2.2M       4G     0%
Total               16384     7.6M      16G     0%
FreeBSD kabini1.local 9.3-RELEASE-p24 FreeBSD 9.3-RELEASE-p24 #0: Sat 
Aug 22 01:54:44 UTC 2015 
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
hwclock: Command not found.
Sat Sep 26 11:07:56 MCDT 2015
[root@kabini1, /etc, 11:07:56am] 531 % ll /media/sd/ ; date
total 723
-rw-r--r--   2 root  wheel     965 Jul 10  2014 .cshrc
-rw-r--r--   2 root  wheel     253 Jul 10  2014 .profile
-r--r--r--   1 root  wheel    6197 Jul 10  2014 COPYRIGHT
-r--r--r--   1 root  wheel    8553 Jul 10  2014 ERRATA.HTM
-r--r--r--   1 root  wheel    3698 Jul 10  2014 ERRATA.TXT
-r--r--r--   1 root  wheel  395727 Jul 10  2014 HARDWARE.HTM
-r--r--r--   1 root  wheel  122420 Jul 10  2014 HARDWARE.TXT
-r--r--r--   1 root  wheel   26579 Jul 10  2014 README.HTM
-r--r--r--   1 root  wheel   12965 Jul 10  2014 README.TXT
-r--r--r--   1 root  wheel   84828 Jul 10  2014 RELNOTES.HTM
-r--r--r--   1 root  wheel   24075 Jul 10  2014 RELNOTES.TXT
drwxr-xr-x   2 root  wheel    1024 Jul 10  2014 bin/
drwxr-xr-x   7 root  wheel    1024 Jul 10  2014 boot/
-rw-r--r--   1 root  wheel      39 Jul 10  2014 cdrom.inf
dr-xr-xr-x   2 root  wheel     512 Jul 10  2014 dev/
-r--r--r--   1 root  wheel    6593 Jul 10  2014 docbook.css
drwxr-xr-x  21 root  wheel    2048 Jul 10  2014 etc/
drwxr-xr-x   3 root  wheel    1536 Jul 10  2014 lib/
drwxr-xr-x   3 root  wheel     512 Jul 10  2014 libexec/
drwxr-xr-x   2 root  wheel     512 Jul 10  2014 media/
drwxr-xr-x   2 root  wheel     512 Jul 10  2014 mnt/
dr-xr-xr-x   2 root  wheel     512 Jul 10  2014 proc/
drwxr-xr-x   2 root  wheel     512 Jul 10  2014 rescue/
drwxr-xr-x   2 root  wheel     512 Jul 10  2014 root/
drwxr-xr-x   2 root  wheel    2560 Jul 10  2014 sbin/
lrwxr-xr-x   1 root  wheel      11 Jul 10  2014 sys@ -> usr/src/sys
drwxrwxrwt   2 root  wheel     512 Jul 10  2014 tmp/
drwxr-xr-x  15 root  wheel     512 Jul 10  2014 usr/
drwxr-xr-x  24 root  wheel     512 Jul 10  2014 var/
Sat Sep 26 11:07:59 MCDT 2015
[root@kabini1, /etc, 11:07:59am] 532 %


The USB drive is a 4 GB Mushkin unit. Did the naming convention for 
devices change at some point in the various kernel upgrades since last 
summer ? ISTR that it used to create a da0s1 device for that drive, 
that's what I have in my fstab file to mount that drive manually w/o the 
full mount command naming FS-type & mount point or device. Thanks for 
everything so far & TIA for any more clues ....

-- 

	William A. Mahaffey III

  ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                            -- Gen. George S. Patton Jr.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5606C236.5060703>