AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@lsi.com
RQ:
SSV:mhbs.lsil.com
NSV:
SSH:
R:<Patrick.Haverty@lsi.com>,<Brian.Stark@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	08A1E1BF683B9844B320294C380BF34C04256D58@cosmail03.lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Thu, 3 Dec 2009 13:16:00 -0800
From: Andrew Sharp <andy.sharp@lsi.com>
To: "Haverty, Patrick" <Patrick.Haverty@lsi.com>
Cc: "Stark, Brian" <Brian.Stark@lsi.com>
Subject: Re: Compact Flash
Message-ID: <20091203131600.31576ac6@ripper.onstor.net>
In-Reply-To: <08A1E1BF683B9844B320294C380BF34C04256D58@cosmail03.lsi.com>
References: <20091203120849.061fd3a4@ripper.onstor.net>
	<08A1E1BF683B9844B320294C380BF34C04256D58@cosmail03.lsi.com>
Organization: LSI
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Use the syntax exactly as I gave it to you.  Three types of
files in unix: regular files, directories, and devices.
Devices you open and close, read and write just as if they
were a regular file.  /dev/sd[ab]1 is a block device.

dd if=/dev/zero of=/dev/sda1

etc.

On Thu, 3 Dec 2009 13:17:19 -0700 "Haverty, Patrick"
<Patrick.Haverty@lsi.com> wrote:

> They don't have an answer for that question (in the spec at least).
> 
> BTW, the non-mount option does not seem to work.
> 
> pleasanton:~# mount
> /dev/sdb1 on / type ext3 (rw)
> tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
> proc on /proc type proc (rw,noexec,nosuid,nodev)
> sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
> udev on /dev type tmpfs (rw,mode=0755)
> tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
> devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
> /dev/sdb3 on /var type ext3 (rw)
> /dev/sdb4 on /onstor/conf type ext3 (rw)
> tmpfs on /tmp type tmpfs (rw,size=12m)
> 
> pleasanton:~# ll /dev/sda1
> brw-rw---- 1 root floppy 8, 1 Dec  3 11:16 /dev/sda1
> 
> pleasanton:~# time -p dd if=/dev/zero of=/dev/sda1/pjhtemp bs=64k
> count=10240 dd: opening `/dev/sda1/pjhtemp': Not a directory
> real 0.00
> user 0.00
> sys 0.00
> 
> pleasanton:~# time -p dd if=/dev/zero of=/dev/sda1/ bs=64k count=10240
> dd: opening `/dev/sda1/': Is a directory
> real 0.00
> user 0.00
> sys 0.00
> 
> pleasanton:~# time -p dd if=/dev/zero of=/dev/sda1/
> dd: opening `/dev/sda1/': Is a directory
> real 0.00
> user 0.00
> sys 0.00
> 
> pleasanton:~# ll /dev/sda1
> brw-rw---- 1 root floppy 8, 1 Dec  3 11:16 /dev/sda1
> 
> pleasanton:~# cd /dev/sda1
> -bash: cd: /dev/sda1: Not a directory
> 
> -----Original Message-----
> From: Andrew Sharp [mailto:andy.sharp@lsi.com]
> Sent: Thursday, December 03, 2009 12:09 PM
> To: Haverty, Patrick
> Cc: Stark, Brian
> Subject: Re: Compact Flash
> 
> On Thu, 3 Dec 2009 13:05:55 -0700 "Haverty, Patrick"
> <Patrick.Haverty@lsi.com> wrote:
> 
> > Thanks Andy.  I already tried the method with mounting.  I did not
> > know I could read/write directly without mount.  I'll try this out
> > now.
> >
> > BTW, the spec for Unigen states 8MB/s bursts for data transfer rate
> > to/from host.  We'll see what dd tells us.
> 
> 
> 8MB/s bursts for how long?  .25 seconds?  .1 seconds?
> 
> > -----Original Message-----
> > From: Andrew Sharp [mailto:andy.sharp@lsi.com]
> > Sent: Thursday, December 03, 2009 12:02 PM
> > To: Haverty, Patrick
> > Cc: Stark, Brian
> > Subject: Re: Compact Flash
> >
> > You actually don't want to mount it.
> >
> > Instead use dd but use
> >
> > dd if=/dev/sdb1 of=/dev/null    for read testing
> >
> > dd of=/dev/sdb1 if=/dev/zero    for write testing
> >
> > You will of course have to reformat the flash after doing write
> > testing.
> >
> > If you mount it, the filesystem and caching semantics will get in
> > the way of getting reliable numbers.
> >
> > Cheers,
> >
> > a
> >
> > On Thu, 3 Dec 2009 12:30:26 -0700 "Haverty, Patrick"
> > <Patrick.Haverty@lsi.com> wrote:
> >
> > > Cool, I'll give it a go.  Thanks.
> > >
> > > -----Original Message-----
> > > From: Stark, Brian
> > > Sent: Thursday, December 03, 2009 11:14 AM
> > > To: Haverty, Patrick; Sharp, Andy
> > > Subject: Re: Compact Flash
> > >
> > > To mount the secondary, do the following from the Linux prompt:
> > >
> > > mount /dev/sdb1 /mnt
> > >
> > > That assumes root is mounted on sda1, e.g. that's the flash you
> > > booted.  If you're actually booted from sdb1, then change the
> > > above to /dev/sda1.
> > >
> > > You can then cd to /mnt and see everything on the secondary.
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: Haverty, Patrick
> > > To: Stark, Brian; Sharp, Andy
> > > Sent: Thu Dec 03 11:58:07 2009
> > > Subject: RE: Compact Flash
> > >
> > > I tried to get an idea of throughput using dd.  First I make sure
> > > the file is erased.  Then I write it.  Then I read it.  Then I do
> > > it all over again.  Results below from one of the new Unigen CF
> > > modules. I'm running it from / so I'm assuming this is writing and
> > > reading from the primary CF module.
> > >
> > > If I knew how to mount the secondary flash I could probably run a
> > > larger file size and might end up with a little more accurate
> > > number. But maybe not.
> > >
> > > - Pat
> > >
> > > pleasanton:/# rm temppjh
> > > pleasanton:/# time -p dd if=/dev/zero of=/temppjh bs=128k
> > > count=256 256+0 records in
> > > 256+0 records out
> > > 33554432 bytes (34 MB) copied, 2.83429 seconds, 11.8 MB/s real
> > > 2.84 user 0.00 sys 1.01 pleasanton:/# time -p dd if=/temppjh
> > > of=/dev/null bs=128k count=256 256+0 records in 256+0 records out
> > > 33554432 bytes (34 MB) copied, 4.89549 seconds, 6.9 MB/s real 5.50
> > > user 0.00 sys 1.53 pleasanton:/# rm temppjh pleasanton:/# time -p
> > > dd if=/dev/zero of=/temppjh bs=128k count=256 256+0 records in
> > > 256+0 records out 33554432 bytes (34 MB) copied, 2.66415 seconds,
> > > 12.6 MB/s real 2.67 user 0.00 sys 0.83 pleasanton:/# time -p dd
> > > if=/temppjh of=/dev/null bs=128k count=256 256+0 records in 256+0
> > > records out 33554432 bytes (34 MB) copied, 4.88966 seconds, 6.9
> > > MB/s real 5.25 user 0.00 sys 1.82 pleasanton:/# rm temppjh
> > > pleasanton:/# time -p dd if=/dev/zero of=/temppjh bs=128k
> > > count=256 256+0 records in 256+0 records out 33554432 bytes (34
> > > MB) copied, 4.36816 seconds, 7.7 MB/s real 4.45 user 0.00 sys
> > > 1.58 pleasanton:/# time -p dd if=/temppjh of=/dev/null bs=128k
> > > count=256 256+0 records in 256+0 records out 33554432 bytes (34
> > > MB) copied, 3.98721 seconds, 8.4 MB/s real 4.41 user 0.00 sys
> > > 1.32 pleasanton:/# rm temppjh pleasanton:/# time -p dd
> > > if=/dev/zero of=/temppjh bs=128k count=256 256+0 records in 256+0
> > > records out 33554432 bytes (34 MB) copied, 4.69891 seconds, 7.1
> > > MB/s real 4.76 user 0.00 sys 1.57 pleasanton:/# time -p dd
> > > if=/temppjh of=/dev/null bs=128k count=256 256+0 records in 256+0
> > > records out 33554432 bytes (34 MB) copied, 6.46484 seconds, 5.2
> > > MB/s real 6.87 user 0.00 sys 1.46 pleasanton:/# rm temppjh
> > > pleasanton:/# time -p dd if=/dev/zero of=/temppjh bs=128k
> > > count=256 256+0 records in 256+0 records out 33554432 bytes (34
> > > MB) copied, 4.17214 seconds, 8.0 MB/s real 4.17 user 0.00 sys
> > > 1.45 pleasanton:/# time -p dd if=/temppjh of=/dev/null bs=128k
> > > count=256 256+0 records in 256+0 records out 33554432 bytes (34
> > > MB) copied, 2.25435 seconds, 14.9 MB/s real 2.56 user 0.00 sys
> > > 0.75
> > >
> > > -----Original Message-----
> > > From: Stark, Brian
> > > Sent: Wednesday, December 02, 2009 5:34 PM
> > > To: Sharp, Andy; Haverty, Patrick
> > > Subject: RE: Compact Flash
> > >
> > > One more thing...
> > >
> > > The code that checks the minimum size cannot be overridden.
> > > There's a strict check against CF_MIN_SIZE which is defined as
> > > 980MB for the Coog.
> > >
> > > So, if we want to use any of these flashes in the field, there
> > > must be a code change...
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Stark, Brian
> > > Sent: Wednesday, December 02, 2009 5:30 PM
> > > To: Sharp, Andy; Haverty, Patrick
> > > Subject: RE: Compact Flash
> > >
> > > We didn't pop out any secondary flashes that were mounted.
> > > Surely, I checked for that before doing anything.
> > >
> > > In looking at the code in ssc-nfxsh/cmd_flash.c, it looks like
> > > there's a minimum size requirement of 980MB.  The first question,
> > > of course, is why?
> > >
> > > Depending on the answer to that, should we consider changing it?
> > > We really need to get at least 2 more CF vendors qualified since
> > > we only have 1 right now.
> > >
> > > And what about the throughput question?
> > >
> > >
> > > -----Original Message-----
> > > From: Andrew Sharp [mailto:andy.sharp@lsi.com]
> > > Sent: Wednesday, December 02, 2009 4:33 PM
> > > To: Haverty, Patrick
> > > Cc: Stark, Brian
> > > Subject: Re: Compact Flash
> > >
> > > I can answer all your questions in one sentence.  Oops, no I
> > > can't.
> > >
> > > Anyway, the first series of errors is because you popped out/in CF
> > > card(s) in a bad way.  Bad Pattie.
> > > <slap-don't-slap-do-slap-that-slap-again-slap>
> > >
> > > Be nice to your kernel, and it will be nice to you ~:^)  Always
> > > make sure you unmount any mounted partitions *before* pulling a
> > > CF card. Ignore the LEDs, I've seen the code that controls those
> > > ~:^)
> > >
> > > As for the second message, yes, "system copy init" has a minimum
> > > size requirement.  That card is too small.  I think there's a
> > > secret hidden option to ignore that, but I don't remember.
> > > There's also flash-install.sh, which you should remember.  That's
> > > documented in the wiki somewhere.  And that doc is probably not
> > > more than 3 years out of date.  flash-install very likely has a
> > > way to override the min size limit, because I wrote it and that's
> > > the way I roll; it's a shell script, so it might be "easy" to
> > > look at it and see if you can figure out what the secret option
> > > is for that.
> > >
> > > I think that's it.  Good!  Time for my nap.
> > >
> > >
> > >
> > > On Wed, 2 Dec 2009 16:13:04 -0700 "Haverty, Patrick"
> > > <Patrick.Haverty@lsi.com> wrote:
> > >
> > > > And I meant to ask if you had a method to test the read/write
> > > > throughput of CF modules which I might use?
> > > >
> > > > Thanks,
> > > >
> > > > Pat
> > > >
> > > > ________________________________
> > > > From: Haverty, Patrick
> > > > Sent: Wednesday, December 02, 2009 2:51 PM
> > > > To: Sharp, Andy
> > > > Cc: Stark, Brian
> > > > Subject: Compact Flash
> > > >
> > > > Hello Andy,
> > > >
> > > > Brian and I are trying out some new Compact Flash modules to try
> > > > and find an alternate part.  Below I'll paste some of the
> > > > console messages seen when trying the new modules.  Do you know
> > > > if the size error could be caused by a mismatch between the CF
> > > > module configurations (different vendors in each slot), and if
> > > > so can you tell me how I can create a new CF rather than copy
> > > > an existing one?
> > > >
> > > > Brian could probably speak more intelligently about what we are
> > > > seeing, but he's tied up in a phone meeting right now.
> > > >
> > > > Thanks,
> > > >
> > > > Pat
> > > >
> > > > Stec CF Module
> > > >
> > > > (Insert module)
> > > >
> > > > ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
> > > > ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0
> > > > data 4096 in ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0
> > > > action 0x0 ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag
> > > > 0 cdb 0x0 data 4096 in ata3.00: exception Emask 0x0 SAct 0x0
> > > > SErr 0x0 action 0x0 ata3.00: cmd
> > > > c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
> > > > ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
> > > > ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0
> > > > data 4096 in ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0
> > > > action 0x0 ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag
> > > > 0 cdb 0x0 data 4096 in Buffer I/O error on device sdb, logical
> > > > block 0 ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
> > > > 0x0 ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb
> > > > 0x0 data 4096 in ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0
> > > > action 0x0 ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag
> > > > 0 cdb 0x0 data 4096 in ata3.00: exception Emask 0x0 SAct 0x0
> > > > SErr 0x0 action 0x0 ata3.00: cmd
> > > > c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
> > > > ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
> > > > ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0
> > > > data 4096 in ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0
> > > > action 0x0 ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag
> > > > 0 cdb 0x0 data 4096 in ata3.00: exception Emask 0x0 SAct 0x0
> > > > SErr 0x0 action 0x0 ata3.00: cmd
> > > > c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
> > > > Buffer I/O error on device sdb, logical block 0
> > > >
> > > >
> > > > (Try copy init)
> > > >
> > > > pleasanton diag> system copy init
> > > > ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
> > > > ata3.00: cmd c4/00:20:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0
> > > > data 16384 in ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0
> > > > action 0x0 ata3.00: cmd c4/00:20:00:00:00/00:00:00:00:00/e0 tag
> > > > 0 cdb 0x0 data 16384 in ata3.00: exception Emask 0x0 SAct 0x0
> > > > SErr 0x0 action 0x0 ata3.00: cmd
> > > > c4/00:20:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 16384 in
> > > > ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
> > > > ata3.00: cmd c4/00:20:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0
> > > > data 16384 in ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0
> > > > action 0x0 ata3.00: cmd c4/00:20:00:00:00/00:00:00:00:00/e0 tag
> > > > 0 cdb 0x0 data 16384 in ata3.00: exception Emask 0x0 SAct 0x0
> > > > SErr 0x0 action 0x0 ata3.00: cmd
> > > > c4/00:20:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 16384 in
> > > > Buffer I/O error on device sdb, logical block 0 Buffer I/O
> > > > error on device sdb, logical block 1 Buffer I/O error on device
> > > > sdb, logical block 2 Buffer I/O error on device sdb, logical
> > > > block 3 ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
> > > > 0x0 ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb
> > > > 0x0 data 4096 in ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0
> > > > action 0x0 ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag
> > > > 0 cdb 0x0 data 4096 in ata3.00: exception Emask 0x0 SAct 0x0
> > > > SErr 0x0 action 0x0 ata3.00: cmd
> > > > c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
> > > > ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
> > > > ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0
> > > > data 4096 in ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0
> > > > action 0x0 ata3.00: cmd c4/00:08:00:00:00/00:00:00:00:00/e0 tag
> > > > 0 cdb 0x0 data 4096 in ata3.00: exception Emask 0x0 SAct 0x0
> > > > SErr 0x0 action 0x0 ata3.00: cmd
> > > > c4/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
> > > > Buffer I/O error on device sdb, logical block 0 Secondary CF
> > > > card is 977 MiB Disk size 1024966656 bytes is not supported
> > > > Problem initializing CF card /dev/sdb % Command failure.
> > > > ******************
> > > >
> > > > Unmarked CF Module
> > > >
> > > > (No console messages upon insertion)
> > > >
> > > > (Try copy init)
> > > >
> > > > pleasanton diag> system copy init
> > > > Secondary CF card is 977 MiB
> > > > Disk size 1024966656 bytes is not supported Problem initializing
> > > > CF card /dev/sdb % Command failure.
> > > >
> > > > ******************
> > > >
> > > > Viking CF Module
> > > >
> > > > (No console messages upon insertion)
> > > >
> > > > (Try copy init)
> > > >
> > > >
> > > > pleasanton diag> system copy init
> > > > Secondary CF card is 955 MiB
> > > > Disk size 1002258432 bytes is not supported Problem initializing
> > > > CF card /dev/sdb % Command failure.
> > > >
