9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-22 19:57 cinap_lenrek
  2018-12-22 20:14 ` Stanley Lieber
  0 siblings, 1 reply; 16+ messages in thread
From: cinap_lenrek @ 2018-12-22 19:57 UTC (permalink / raw)
  To: 9front

ok, the following commit address the issue with 32 bit sectors:

changeset:   6968:6f3b45a79a84
tag:         tip
user:        cinap_lenrek@felloff.net
date:        Sat Dec 22 20:49:24 2018 +0100
summary:     dossrv: use 64 bit vlong for sectors

this might not fix your issue, but gets that one potential problem
out of the way.

what you can also do is try to rule out nudb/disk issues, by reading
the last sector (or some sector >= 2TB) with dd from openbsd and calculate
a checksum like md5 or sha1 (while having the fat unmounted on openbsd),
then do the same on plan9 and see if they differ.

that way we can rule out large device issues with nusb/disk.

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
  2018-12-22 19:57 [9front] can our tools handle very large usb gpt fat32 partitions? cinap_lenrek
@ 2018-12-22 20:14 ` Stanley Lieber
  0 siblings, 0 replies; 16+ messages in thread
From: Stanley Lieber @ 2018-12-22 20:14 UTC (permalink / raw)
  To: 9front

Thanks! I will try later today and report back.

sl


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2019-01-08  1:55 sl
  0 siblings, 0 replies; 16+ messages in thread
From: sl @ 2019-01-08  1:55 UTC (permalink / raw)
  To: 9front

belated update:

running latest code, our dossrv is able to handle the two GPT FAT32
1.8TB partitions on my USB drive without error.  I can read and write
the last block of both partitions.

sl


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-24  4:43 cinap_lenrek
  0 siblings, 0 replies; 16+ messages in thread
From: cinap_lenrek @ 2018-12-24  4:43 UTC (permalink / raw)
  To: 9front

excellent, thanks!

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
  2018-12-24  4:13 cinap_lenrek
@ 2018-12-24  4:42 ` Stanley Lieber
  0 siblings, 0 replies; 16+ messages in thread
From: Stanley Lieber @ 2018-12-24  4:42 UTC (permalink / raw)
  To: 9front

Latest code allows me to ls all the nested directories on the second partition that appeared empty before. I will test writing and reading the last block tomorrow when I’m able to use a real keyboard again.

Thanks!

sl


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-24  4:13 cinap_lenrek
  2018-12-24  4:42 ` Stanley Lieber
  0 siblings, 1 reply; 16+ messages in thread
From: cinap_lenrek @ 2018-12-24  4:13 UTC (permalink / raw)
  To: 9front

try latest commit of nusb/disk:

http://code.9front.org/hg/plan9front/rev/c908fd120133

(you might need to rebuild nusb/disk and then the kernel unless
you run the new nusb/disk manually after killing the running one)

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-24  2:48 cinap_lenrek
  0 siblings, 0 replies; 16+ messages in thread
From: cinap_lenrek @ 2018-12-24  2:48 UTC (permalink / raw)
  To: 9front

ok, i'll have to figure out how to implement 64 bit lba... i'll write
you back when i have some code.

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-24  2:34 cinap_lenrek
  0 siblings, 0 replies; 16+ messages in thread
From: cinap_lenrek @ 2018-12-24  2:34 UTC (permalink / raw)
  To: 9front

yeahhhhh.... found it. 32 bit lba -> 2TB max.

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-24  2:28 cinap_lenrek
  0 siblings, 0 replies; 16+ messages in thread
From: cinap_lenrek @ 2018-12-24  2:28 UTC (permalink / raw)
  To: 9front

ok.

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-24  2:19 sl
  0 siblings, 0 replies; 16+ messages in thread
From: sl @ 2018-12-24  2:19 UTC (permalink / raw)
  To: 9front

> do 512 byte reads at 1TB and 2TB ±512 byte and compare

Doing all this on an iPhone, so bear with me.

Note: Neither partition is full, so the last (many) GB of each
partition is nothing but zeroes.

To recap:

Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd1i      1.8T    914G    948G    49%    /n/no1
/dev/sd1j      1.8T    270G    1.6T    15%    /n/no2

I wrote 512 bytes (all ones) to the last block on each partition.
OpenBSD was able to read both back correctly.  9front was able to read
the last block of the first partition correctly, but could not read
the last block of the second partiton correctly.  Instead of all ones
I got garbage characters.

sl


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-23 21:05 cinap_lenrek
  0 siblings, 0 replies; 16+ messages in thread
From: cinap_lenrek @ 2018-12-23 21:05 UTC (permalink / raw)
  To: 9front

i woner if you could export the dos partition readonly over 9p. then
i could debug dossrv on it.

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-23 19:20 cinap_lenrek
  0 siblings, 0 replies; 16+ messages in thread
From: cinap_lenrek @ 2018-12-23 19:20 UTC (permalink / raw)
  To: 9front

lets rule out nusb/disk first.

do 512 byte reads at 1TB and 2TB ±512 byte and compare
with 9front.

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-23 19:17 sl
  0 siblings, 0 replies; 16+ messages in thread
From: sl @ 2018-12-23 19:17 UTC (permalink / raw)
  To: 9front

Under OpenBSD:

/dev/sd1i 1.8T 914G 948G 49% /n/no1 /dev/sd1j 1.8T 270G 1.6T 15%
/n/no2

So, I guess this makes sense.  All of the first partition is still
just under 1TB.

sl


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-23 19:15 sl
  0 siblings, 0 replies; 16+ messages in thread
From: sl @ 2018-12-23 19:15 UTC (permalink / raw)
  To: 9front

With the latest changes, I can now read the nested directories on the
first partition that previously I could not read.

The second partition still mounts, and I can see some top-level
directories, but some nested directories still appear to be empty, or
print garbage when I run ls:

deckard; ls Carver_County_Electronic_Records games movies deckard; cd
games deckard; ls fi���!.�'d character in file name: '% deckard; cd
../movies deckard; ls deckard;

Both games/ and movies/ contain many GB of files, and are accessible
under OpenBSD.

I'll try your other suggestion as I get time.

sl


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-22 18:15 cinap_lenrek
  0 siblings, 0 replies; 16+ messages in thread
From: cinap_lenrek @ 2018-12-22 18:15 UTC (permalink / raw)
  To: 9front

hmmm

dossrv uses signed long for sector numbers... i wonder if this is the problem.
according to my calculation, that would give you 1TB maximum filesystem size
instead of your 2TB.

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [9front] can our tools handle very large usb gpt fat32 partitions?
@ 2018-12-22 16:31 cinap_lenrek
  0 siblings, 0 replies; 16+ messages in thread
From: cinap_lenrek @ 2018-12-22 16:31 UTC (permalink / raw)
  To: 9front

hm... i'd try to put some debug prints into readdir() in dossrv.

especially the parsing of the Dosdir:

diff -r c605016cef86 sys/src/cmd/dossrv/dossubs.c
--- a/sys/src/cmd/dossrv/dossubs.c	Sat Dec 15 20:39:32 2018 +0100
+++ b/sys/src/cmd/dossrv/dossubs.c	Sat Dec 22 17:27:14 2018 +0100
@@ -704,6 +704,10 @@
 			return -1;
 		for(o=0; o<bp->sectsize; o+=DOSDIRSIZE){
 			d = (Dosdir *)&p->iobuf[o];
+if(chatty){
+	fmtinstall('H', encodefmt);
+	fprint(2, "readdir addr=%d isect=%d o=%d d=%.*H\n", addr, isect, o, DOSDIRSIZE, d);
+}
 			if(d->name[0] == 0x00){
 				putsect(p);
 				return rcnt;

then invoke dossrv manually like:

dossrv -v -f /dev/sdUX/dos dosdebug >[2]/tmp/dosdebug.log
mount /srv/dosdebug /n/d
ls /n/d/path/to/strange/dir

then check out /tmp/dosdebug.log

--
cinap


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-01-08  1:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-22 19:57 [9front] can our tools handle very large usb gpt fat32 partitions? cinap_lenrek
2018-12-22 20:14 ` Stanley Lieber
  -- strict thread matches above, loose matches on Subject: below --
2019-01-08  1:55 sl
2018-12-24  4:43 cinap_lenrek
2018-12-24  4:13 cinap_lenrek
2018-12-24  4:42 ` Stanley Lieber
2018-12-24  2:48 cinap_lenrek
2018-12-24  2:34 cinap_lenrek
2018-12-24  2:28 cinap_lenrek
2018-12-24  2:19 sl
2018-12-23 21:05 cinap_lenrek
2018-12-23 19:20 cinap_lenrek
2018-12-23 19:17 sl
2018-12-23 19:15 sl
2018-12-22 18:15 cinap_lenrek
2018-12-22 16:31 cinap_lenrek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).