Neither field is required. 'Free Space' in fsinfo can be -1 or just wrong,
and 'Next Free Cluster' is a  hint only. Hence in either case you can fix
them up, or ignore their incorrectness and the filesystem is still
considered ok.

And since they are not required I guess newfs never bothered to fill them
out correctly.

.... Ken






On Sun, Oct 20, 2013 at 2:13 PM, David Vasek <[email protected]> wrote:

> Hello,
>
> a filesystem created by newfs_msdos(8) is reported as faulty by
> fsck_msdos(8). And it is indeed. Repeatable. There must be something wrong.
> The media itself (a USB flash drive) doesn't have any issues.
>
> # newfs -t msdos /dev/rsd4i /dev/rsd4i: 31224352 sectors in 3903044 FAT32
> clusters (4096 bytes/cluster)
> bps=512 spc=8 res=32 nft=2 mid=0xf8 spt=63 hds=255 hid=8064 bsec=31285376
> bspf=30493 rdcl=2 infs=1 bkbs=2
>
> # fsck -n /dev/rsd4i
> ** /dev/rsd4i (NO WRITE)
> ** Phase 1 - Read and Compare FATs
> ** Phase 2 - Check Cluster Chains
> ** Phase 3 - Check Directories
> ** Phase 4 - Check for Lost Files
> Free space in FSInfo block (-1) not correct (3903043)
> fix? no
> Next free cluster in FSInfo block (2) not free
> fix? no
> 1 files, 3029260 free (3903043 clusters)
>
> # fsck /dev/rsd4i
> ** /dev/rsd4i
> ** Phase 1 - Read and Compare FATs
> ** Phase 2 - Check Cluster Chains
> ** Phase 3 - Check Directories
> ** Phase 4 - Check for Lost Files
> Free space in FSInfo block (-1) not correct (3903043)
> fix? [Fyn] y
> Next free cluster in FSInfo block (2) not free
> fix? [Fyn] y
> 1 files, 3029260 free (3903043 clusters)
>
> # fsck /dev/rsd4i ** /dev/rsd4i
> ** Phase 1 - Read and Compare FATs
> ** Phase 2 - Check Cluster Chains
> ** Phase 3 - Check Directories
> ** Phase 4 - Check for Lost Files
> 1 files, 3029260 free (3903043 clusters)
>
>
> OpenBSD 5.3 (GENERIC.MP) #53: Fri Mar  1 09:34:37 MST 2013
>     
> [email protected]:/usr/**src/sys/arch/i386/compile/GENE**RIC.MP<http://GENERIC.MP>
>
> umass1 at uhub0 port 4 configuration 1 interface 0 "Kingston DT 101 G2"
> rev 2.00/1.00 addr 3
> umass1: using SCSI over Bulk-Only
> scsibus4 at umass1: 2 targets, initiator 0
> sd4 at scsibus4 targ 1 lun 0: <Kingston, DT 101 G2, PMAP> SCSI0 0/direct
> removable serial.09511642BC81D71A0189
> sd4: 15280MB, 512 bytes/sector, 31293440 sectors
>
> # fdisk sd4
> Disk: sd4       geometry: 1947/255/63 [31293440 Sectors]
> Offset: 0       Signature: 0xAA55
>             Starting         Ending         LBA Info:
>  #: id      C   H   S -      C   H   S [       start:        size ]
> ------------------------------**------------------------------**
> -------------------
> *0: 0C      0 128   1 -   1947 236  17 [        8064:    31285376 ] Win95
> FAT32L
>  1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
>  2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
>  3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
>
> # disklabel sd4
> # /dev/rsd4c:
> type: SCSI
> disk: SCSI disk
> label: DT 101 G2 duid: 0000000000000000
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 1947
> total sectors: 31293440
> boundstart: 0
> boundend: 31293440
> drivedata: 0
>
> 16 partitions:
> #                size           offset  fstype [fsize bsize  cpg]
>   c:         31293440                0  unused
>   i:         31285376             8064   MSDOS
>
> Regards,
> David

Reply via email to