Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Apr 2018 07:46:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        fs@FreeBSD.org
Subject:   [Bug 205154] newfs_msdos issue
Message-ID:  <bug-205154-3630-XChf5wpYYz@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-205154-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-205154-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205154

Damjan Jovanovic <damjan.jov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |damjan.jov@gmail.com

--- Comment #4 from Damjan Jovanovic <damjan.jov@gmail.com> ---
Both 80GiB and 150GiB files seem to work within FreeBSD CURRENT:


# dd if=3D/dev/zero of=3D80G seek=3D$((80*1024*1024*1024-1)) count=3D1 bs=
=3D1
# newfs_msdos -F 32 -O android -c 8 ./80G
newfs_msdos: warning, ./80G is not a character device
./80G: 167445080 sectors in 20930635 FAT32 clusters (4096 bytes/cluster)
BytesPerSec=3D512 SecPerClust=3D8 ResSectors=3D32 FATs=3D2 Media=3D0xf0 Sec=
PerTrack=3D63
Heads=3D255 HiddenSecs=3D0 HugeSectors=3D167772160 FATsecs=3D163521 RootClu=
ster=3D2
FSInfo=3D1 Backup=3D2
# file 80G
80G: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "android ",
sectors/cluster 8, sectors/track 63, heads 255, FAT (32 bit), sectors/FAT
163521, serial number 0x432c1018, unlabeled
# fsck_msdosfs ./80G=20
** ./80G
** Phase 1 - Read and Compare FATs
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
** Phase 4 - Checking for Lost Files
1 files, 4030760 free (20930634 clusters)
# mdconfig -a -f 80G
md0
# mount -t msdosfs /dev/md0 /mnt/test
(seems to work, can write and read a file)


# dd if=3D/dev/zero of=3D150G seek=3D$((150*1024*1024*1024-1)) count=3D1 bs=
=3D1
# newfs_msdos -F 32 -O android -c 8 ./150G=20
newfs_msdos: warning, ./150G is not a character device
./150G: 313959560 sectors in 39244945 FAT32 clusters (4096 bytes/cluster)
BytesPerSec=3D512 SecPerClust=3D8 ResSectors=3D32 FATs=3D2 Media=3D0xf0 Sec=
PerTrack=3D63
Heads=3D255 HiddenSecs=3D0 HugeSectors=3D314572800 FATsecs=3D306602 RootClu=
ster=3D2
FSInfo=3D1 Backup=3D2
# file ./150G=20
./150G: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "android ",
sectors/cluster 8, sectors/track 63, heads 255, FAT (32 bit), sectors/FAT
306602, serial number 0x3b941109, unlabeled
# fsck_msdosfs ./150G
** ./150G
** Phase 1 - Read and Compare FATs
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
** Phase 4 - Checking for Lost Files
1 files, 1790528 free (39244944 clusters)
# mdconfig -a -f 150G=20
md0
# mount -t msdosfs /dev/md0 /mnt/test
(seems to work, can write and read a file)


Where didn't this storage work? In your Android device? Maybe forcing secto=
rs
per cluster to be 8 is an issue for other FAT32 implementations? When I lea=
ve
the "-c 8" out, sectors per cluster goes up to 64:

# newfs_msdos -F 32 -O android ./150G=20
newfs_msdos: warning, ./150G is not a character device
./150G: 314495936 sectors in 4913999 FAT32 clusters (32768 bytes/cluster)
BytesPerSec=3D512 SecPerClust=3D64 ResSectors=3D32 FATs=3D2 Media=3D0xf0 Se=
cPerTrack=3D63
Heads=3D255 HiddenSecs=3D0 HugeSectors=3D314572800 FATsecs=3D38391 RootClus=
ter=3D2
FSInfo=3D1 Backup=3D2

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-205154-3630-XChf5wpYYz>