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=205154

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=/dev/zero of=80G seek=$((80*1024*1024*1024-1)) count=1 bs=1
# 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=512 SecPerClust=8 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63
Heads=255 HiddenSecs=0 HugeSectors=167772160 FATsecs=163521 RootCluster=2
FSInfo=1 Backup=2
# 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 
** ./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=/dev/zero of=150G seek=$((150*1024*1024*1024-1)) count=1 bs=1
# newfs_msdos -F 32 -O android -c 8 ./150G 
newfs_msdos: warning, ./150G is not a character device
./150G: 313959560 sectors in 39244945 FAT32 clusters (4096 bytes/cluster)
BytesPerSec=512 SecPerClust=8 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63
Heads=255 HiddenSecs=0 HugeSectors=314572800 FATsecs=306602 RootCluster=2
FSInfo=1 Backup=2
# file ./150G 
./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 
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 sectors
per cluster to be 8 is an issue for other FAT32 implementations? When I leave
the "-c 8" out, sectors per cluster goes up to 64:

# newfs_msdos -F 32 -O android ./150G 
newfs_msdos: warning, ./150G is not a character device
./150G: 314495936 sectors in 4913999 FAT32 clusters (32768 bytes/cluster)
BytesPerSec=512 SecPerClust=64 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63
Heads=255 HiddenSecs=0 HugeSectors=314572800 FATsecs=38391 RootCluster=2
FSInfo=1 Backup=2

-- 
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>