Subject: followup to ATA flash newfs problem (WAS: newfs problem: "cg 0: bad magic number")
To: <>
From: Tad Hunt <tad@entrisphere.com>
List: tech-kern
Date: 07/11/2002 12:55:27
Turns out that the new flash disk was bad right out of the box.
I tried formatting it on a windows box, and it failed there too.

If you're in the marked for PC Card ATA flash disk, I do not
recommend the Delkin Devices "eFilm PC Card ATA Type I".
I think the part number I've got is DDA1FLS2-512 (512MB)

1) The eFilm card is extremely slow.  It only does PIO mode 1, and
   the write speed seems to be just over 150KB/sec.  Contrast this
   to the "SMART Modular technologies ATA PC Card", which does PIO
   Mode 4, and seems to top out just over 800KB/sec.

2) Out of the box, one of two of these disks failed to work.  The
   other seems to be working fine.

3) For longevity, mount the flash disks with the "noatime" and
   "nodevmtime" mount options.  I've already had one of the SMART
   flash disks go bad, I think because a bit wore out.

On a related note, does NetBSD have a "flash friendly" filesystem?

-Tad

I last said:
;
;I forgot to mention, when I run newfs on partition "a", I get the
;same warning, but I don't get the same error.  As you can see from the
;disklabel, both partitions are the same size, so I don't understand what
;might be happening.
;
;-Tad
;
;------------------------------------------------------------------------------
;sh$ newfs /dev/rwd0a
;pcmcia0: card irq established func 0x101e04 arg 0xe022faa0
;Warning: inode blocks/cyl group (84) >= data blocks (28) in last
;    cylinder group. This implies 456 sector(s) cannot be allocated.
;/dev/rwd0a:     438480 sectors in 464 cylinders of 15 tracks, 63 sectors
;        214.1MB in 29 cyl groups (16 c/g, 7.38MB/g, 1792 i/g)
;super-block backups (for fsck -b #) at:
;     32,  15216,  30400,  45584,  60768,  75952,  91136, 106320, 121504,
; 136688, 151872, 167056, 182240, 197424, 212608, 227792, 241952, 257136,
; 272320, 287504, 302688, 317872, 333056, 348240, 363424, 378608, 393792,
; 408976, 424160,
;pcmcia0: card irq disestablished
;sh$ 
;------------------------------------------------------------------------------
;
;I previously said:
;;
;;System: NetBSD 1.5, powerpc
;;
;;I attempted to run newfs on the "c" partition of the
;;following disk, and it spit out "cg 0: bad magic number".
;;It also printed a warning about inodes and cylinder groups,
;;which I assumed that it adjusted for.  Am I mistaken, or is
;;this a bug?
;;
;;-Tad
;;
;;------------------------------------------------------------------------------
;;
;;sh$ disklabel wd0
;;type: ESDI
;;disk: DELKIN DEVICES I
;;label: N20020708170926
;;flags:
;;bytes/sector: 512
;;sectors/track: 63
;;tracks/cylinder: 15
;;sectors/cylinder: 945
;;cylinders: 1059
;;total sectors: 1000755
;;rpm: 3600
;;interleave: 1
;;trackskew: 0
;;cylinderskew: 0
;;headswitch: 0           # microseconds
;;track-to-track seek: 0  # microseconds
;;drivedata: 0 
;;
;;8 partitions:
;;#        size   offset     fstype   [fsize bsize   cpg]
;;  a:   438937        1     4.2BSD     1024  8192    16   # (Cyl.    0*- 464*)
;;  c:   438937   438938     4.2BSD     1024  8192    16   # (Cyl.  464*- 928*)
;;  d:  1000755        0     unused        0     0         # (Cyl.    0 - 1058)
;;  e:   122880   877875     4.2BSD     1024  8192    16   # (Cyl.  928*- 1058)
;;disklabel: boot block size 0
;;
;;------------------------------------------------------------------------------
;;
;;
;;sh$ newfs /dev/rwd0c
;;Warning: inode blocks/cyl group (84) >= data blocks (28) in last
;;    cylinder group. This implies 456 sector(s) cannot be allocated.
;;/dev/rwd0c:     438480 sectors in 464 cylinders of 15 tracks, 63 sectors
;;        214.1MB in 29 cyl groups (16 c/g, 7.38MB/g, 1792 i/g)
;;super-block backups (for fsck -b #) at:
;;     32,  15216,  30400,  45584,  60768,  75952,  91136, 106320, 121504,
;; 136688, 151872, 167056, 182240, 197424, 212608, 227792, 241952, 257136,
;; 272320, 287504, 302688, 317872, 333056, 348240, 363424, 378608, 393792,
;; 408976, 424160,
;;cg 0: bad magic number
;;cg 0: bad magic number
;;sh$
;;
;;------------------------------------------------------------------------------
;;