Re: Something hosing my msdos/FAT32 file system

2005-11-28 Thread Ted Unangst
On 11/27/05, frantisek holop [EMAIL PROTECTED] wrote:
  it shouldn't.  you might get files landing in the wrong directory (i'm
  not really sure this is possible either, but it's probably the worst
  that could happen), but there shouldn't be any real disk corruption.


 i had files not showing up on the fat partition right after moving
 them over from ffs.  windows chkdsk found them as lost clusters
 so apart losing their names, they were ok ;-)

that would be a different problem.  when did it happen?



Re: Something hosing my msdos/FAT32 file system

2005-11-28 Thread Tan Dang
On 11/28/05, Ted Unangst [EMAIL PROTECTED] wrote:
 On 11/27/05, frantisek holop [EMAIL PROTECTED] wrote:
   it shouldn't.  you might get files landing in the wrong directory (i'm
   not really sure this is possible either, but it's probably the worst
   that could happen), but there shouldn't be any real disk corruption.
 
 
  i had files not showing up on the fat partition right after moving
  them over from ffs.  windows chkdsk found them as lost clusters
  so apart losing their names, they were ok ;-)

 that would be a different problem.  when did it happen?




I have had this problem of files not showing up on the fat partition
after moving the files over from ffs also.  I dual boot OpenBSD 3.8
and Windows XP on my laptop.  Both os's share a fat partition.  For my
particular case, I put Windows XP into hibernation mode and booted to
OpenBSD.  I copied some ogg files from the ffs partition to the fat
partition.  I was able to play the ogg files from the fat partition
with mplayer fine.  On a boot to Windows XP, I was unable to see the
directories that held my ogg files.  I rebooted back to OpenBSD and
the files were now not seen from OpenBSD.

When I shutdown Windows cleanly and move the files to the fat
partition from OpenBSD, then Windows seems to see the files fines.



Re: Something hosing my msdos/FAT32 file system

2005-11-28 Thread Josh Grosse
On Mon, Nov 28, 2005 at 09:47:25PM -0600, Tan Dang wrote:
 I dual boot OpenBSD 3.8
 and Windows XP on my laptop.  Both os's share a fat partition.  For my
 particular case, I put Windows XP into hibernation mode and booted to
 OpenBSD.  I copied some ogg files from the ffs partition to the fat
 partition.  I was able to play the ogg files from the fat partition
 with mplayer fine.  On a boot to Windows XP, I was unable to see the
 directories that held my ogg files.  I rebooted back to OpenBSD and
 the files were now not seen from OpenBSD.
 
 When I shutdown Windows cleanly and move the files to the fat
 partition from OpenBSD, then Windows seems to see the files fines.
 
This is operator error.  Each operating system expects exclusive write access
to a logical disk device -- in this case, the FAT partition.  What you did 
was to have a mounted partition on Windows, that you wrote upon with OpenBSD,
and Windows was never aware of.  Any changes you made to the magnetic media
was without the knowledge of Windows.  Windows, like any operating system,
keeps structure information in memory, and expects exclusive access.



Re: Something hosing my msdos/FAT32 file system

2005-11-28 Thread Damien Miller

On Mon, 28 Nov 2005, Tan Dang wrote:


I have had this problem of files not showing up on the fat partition
after moving the files over from ffs also.  I dual boot OpenBSD 3.8
and Windows XP on my laptop.  Both os's share a fat partition.  For my
particular case, I put Windows XP into hibernation mode and booted to
OpenBSD.  I copied some ogg files from the ffs partition to the fat
partition.  I was able to play the ogg files from the fat partition
with mplayer fine.  On a boot to Windows XP, I was unable to see the
directories that held my ogg files.  I rebooted back to OpenBSD and
the files were now not seen from OpenBSD.

When I shutdown Windows cleanly and move the files to the fat
partition from OpenBSD, then Windows seems to see the files fines.


You are asking for trouble if you are doing this - it is likely that 
Windows is caching filesystem metadata and not refreshing it when it 
resumes from suspend.


Don't fiddle with an (effectively) mounted device.

-d



Re: Something hosing my msdos/FAT32 file system

2005-11-28 Thread Ted Unangst
On 11/28/05, Tan Dang [EMAIL PROTECTED] wrote:
 I have had this problem of files not showing up on the fat partition
 after moving the files over from ffs also.  I dual boot OpenBSD 3.8
 and Windows XP on my laptop.  Both os's share a fat partition.  For my
 particular case, I put Windows XP into hibernation mode and booted to
 OpenBSD.  I copied some ogg files from the ffs partition to the fat
 partition.  I was able to play the ogg files from the fat partition
 with mplayer fine.  On a boot to Windows XP, I was unable to see the
 directories that held my ogg files.  I rebooted back to OpenBSD and
 the files were now not seen from OpenBSD.

i would never under any circumstances ever do this.



Re: Something hosing my msdos/FAT32 file system

2005-11-27 Thread Ted Unangst
On 11/27/05, Alexander Hall [EMAIL PROTECTED] wrote:
 I was wondering if this could cause a lot of other errors, like
 corrupted files and such. I am thinking about if I dare to mount and use
 msdos filesystems r/w again... But then again, if noone dares to do it,
 we'll never know if it works as it is supposed to, so maybe it's better
 to just backup regularly and go for it! :-)

it shouldn't.  you might get files landing in the wrong directory (i'm
not really sure this is possible either, but it's probably the worst
that could happen), but there shouldn't be any real disk corruption.



Re: Something hosing my msdos/FAT32 file system

2005-11-26 Thread Ted Unangst
On 11/25/05, Alexander Hall [EMAIL PROTECTED] wrote:
 $ mkdir a aa ab
 $ find .
 .
 ./a
 ./aa
 ./ab
 $ mv aa ab a
 $ find .
 .
 ./a
 ./a/aa
 $ ll a
 total 16
 drwxrwxrwx  1 root  wheel  4096 Nov 26 00:52 aa/
 drwxrwxrwx  1 root  wheel  4096 Nov 26 00:52 ab/
 $ find -L .
 .
 ./a
 ./a/aa
 ./a/ab

there may be a missing cache_purge in msdosfs_rename.



Re: Something hosing my msdos/FAT32 file system

2005-11-26 Thread Pedro Martelletto
On Sat, Nov 26, 2005 at 01:45:47AM -0800, Ted Unangst wrote:
 there may be a missing cache_purge in msdosfs_rename.

I've looked at the code and yes, you're correct. There was a missing
cache_purge() in msdosfs_rename(), and that fixed the issue for me.

Alexander, can you confirm the problem is gone?

-p.

Index: msdosfs_vnops.c
===
RCS file: /cvs/src/sys/msdosfs/msdosfs_vnops.c,v
retrieving revision 1.55
diff -u -r1.55 msdosfs_vnops.c
--- msdosfs_vnops.c 19 Nov 2005 02:18:01 -  1.55
+++ msdosfs_vnops.c 26 Nov 2005 14:27:32 -
@@ -1151,6 +1151,9 @@
VOP_UNLOCK(fdvp, 0, p);
goto bad;
}
+
+   cache_purge(fvp);
+
if (!doingdirectory) {
error = pcbmap(dp, de_cluster(pmp, to_diroffset), 0,
   ip-de_dirclust, 0);



Re: Something hosing my msdos/FAT32 file system

2005-11-25 Thread Alexander Hall

A long time ago, Pedro Martelletto wrote:


Alexander, can you please try to build a test-case that rules out NFS,
if at all possible?


I ran into this just this week while moving stuff like crazy. Succeeded 
to boil stuff down to a very limited set of operations that fscks things 
up. I run tests on a (disposable :) vnd device but I got the same 
results on an ordinary partition (wd0n).


Upgraded to snapshot from Nov 25 to make sure this wasn't fixed since I 
noticed some changes but no better luck there.


Maybe you, or anyone else, can do somthing of it. Fails like a charm 
every time for me.


/Alexander


$ dd if=/dev/zero of=msdos_fs bs=1024 count=1024
1024+0 records in
1024+0 records out
1048576 bytes transferred in 0.014 secs (70148247 bytes/sec)
$ sudo vnconfig vnd0 msdos_fs
$ sudo newfs_msdos /dev/rvnd0c
/dev/rvnd0c: 2008 sectors in 251 FAT12 clusters (4096 bytes/cluster)
bps=512 spc=8 res=1 nft=2 rde=512 sec=2048 mid=0xf0 spf=1 spt=63 hds=1 hid=0
$ sudo mount_msdos -m 777 -l /dev/vnd0c /mnt/test/
$ cd /mnt/test
$ mkdir a aa ab
$ find .
.
./a
./aa
./ab
$ mv aa ab a
$ find .
.
./a
./a/aa
$ ll a
total 16
drwxrwxrwx  1 root  wheel  4096 Nov 26 00:52 aa/
drwxrwxrwx  1 root  wheel  4096 Nov 26 00:52 ab/
$ find -L .
.
./a
./a/aa
./a/ab



Re: Something hosing my msdos/FAT32 file system

2005-11-25 Thread Pedro Martelletto
On Sat, Nov 26, 2005 at 12:57:06AM +0100, Alexander Hall wrote:
 $ dd if=/dev/zero of=msdos_fs bs=1024 count=1024
 $ sudo vnconfig vnd0 msdos_fs
 $ sudo newfs_msdos /dev/rvnd0c
 $ sudo mount_msdos -m 777 -l /dev/vnd0c /mnt/test/
 $ cd /mnt/test
 $ mkdir a aa ab

 $ find .
 .
 ./a
 ./aa
 ./ab

Interesting. If you don't do this preliminary 'find', then all is fine.

 $ mv aa ab a
 $ find .
 .
 ./a
 ./a/aa
 $ ll a
 total 16
 drwxrwxrwx  1 root  wheel  4096 Nov 26 00:52 aa/
 drwxrwxrwx  1 root  wheel  4096 Nov 26 00:52 ab/
 $ find -L .
 .
 ./a
 ./a/aa
 ./a/ab

And if you try 'rm -rf a' now, you're likely to get:

rm: fts_read: No such file or directory

-p.



Re: Something hosing my msdos/FAT32 file system

2005-11-25 Thread Alexander Hall

Pedro Martelletto wrote:

On Sat, Nov 26, 2005 at 12:57:06AM +0100, Alexander Hall wrote:


$ dd if=/dev/zero of=msdos_fs bs=1024 count=1024
$ sudo vnconfig vnd0 msdos_fs
$ sudo newfs_msdos /dev/rvnd0c
$ sudo mount_msdos -m 777 -l /dev/vnd0c /mnt/test/
$ cd /mnt/test
$ mkdir a aa ab



$ find .
.
./a
./aa
./ab


Interesting. If you don't do this preliminary 'find', then all is fine.


Yes I noticed that, too. :)


$ mv aa ab a


If I do ``mv aa a; mv ab a'', all is fine, too. AFAICT, this should 
require the exact same syscalls to perform as ``mv aa ab a''; one for 
each file to move. It seems that if things happen too fast things go bad.


Thinking of it, since the first find is required to get bad results, I 
get the feeling that some caches/vnodes/... are populated with corrupted 
values, (but I don't know much about this, so I maybe just better stop 
guessing). What I mean is that if so, the error must not be within rename.



$ find .
.
./a
./a/aa
$ ll a
total 16
drwxrwxrwx  1 root  wheel  4096 Nov 26 00:52 aa/
drwxrwxrwx  1 root  wheel  4096 Nov 26 00:52 ab/
$ find -L .
.
./a
./a/aa
./a/ab


This one is funny. Don't ask me how come I tested it. Symlinks on 
msdosfs? And what are they linking to? :)



And if you try 'rm -rf a' now, you're likely to get:

rm: fts_read: No such file or directory


Actually, after testing copying aa and ab separately, I cannot reproduce 
the previous errors again. Maybe a reboot will help.


FWIW, I think that unmounting and mounting the fs again restored the 
order (or so it seemed).


Please let me know if there is anything else I can do to help you.

/Alexander



Re: Something hosing my msdos/FAT32 file system

2005-11-25 Thread Pedro Martelletto
On Sat, Nov 26, 2005 at 03:05:30AM +0100, Alexander Hall wrote:
 Actually, after testing copying aa and ab separately, I cannot reproduce 
 the previous errors again. Maybe a reboot will help.
 
 FWIW, I think that unmounting and mounting the fs again restored the 
 order (or so it seemed).
 
 Please let me know if there is anything else I can do to help you.
 
 /Alexander

On a side note, I'm fairly convinced it has someting to do with the
FTS_PHYSICAL option being passed to fts_open(3).

That's why 'find -L' works.

-p.



Re: Something hosing my msdos/FAT32 file system

2005-10-08 Thread Tom Cosgrove
 frantisek holop 29-Sep-05 01:23 

 hmm, on Wed, Sep 28, 2005 at 07:55:26PM -0300, Pedro Martelletto said that
  No, I don't, but that's simply not needed. Just a note saying I was
  running OpenBSD version X, kernel dated Y, on an environment Z, and
  suddenly everything was gone would be a start.

 so which part of the referenced mail you don't understand?
 (http://marc.theaimsgroup.com/?l=openbsd-miscm=110488032901414w=2)
 let me see:
 openbsd version:  check
 kernel dated: check
 environment: check
 instructions to repeat (even though somewhat vague,
 what can you do, it's the nature of the bug): check

And which bit of send bug reports to bugs@, or use sendbug(1) didn't
you understand?

Few developers read [EMAIL PROTECTED]  It is not the place to report bugs.  Bugs
reported here will often go unnoticed.  Bugs filed using sendbug will
be looked at again and again.

Tom



Re: Something hosing my msdos/FAT32 file system

2005-10-08 Thread Tom Cosgrove
Guys

Thanks for taking the trouble to send something more concrete about
how to reproduce the problem.

I have found the bug, and just committed the fix.  The next snapshots
will have it in, so please test, and help us make sure there are no
side effects!

Finally, to the person who said there are plenty of reference
implementations, it seems that NetBSD has the same bug.  There will
always be bugs.  With good bug reports (ideally to the right places!)
we can track things down and fix them.

Tom



Re: Something hosing my msdos/FAT32 file system

2005-10-08 Thread Andreas Bihlmaier
 Guys
 
 Thanks for taking the trouble to send something more concrete about
 how to reproduce the problem.
 
 I have found the bug, and just committed the fix.  The next snapshots
 will have it in, so please test, and help us make sure there are no
 side effects!
 
Thank you so much! Hosing (seemingly) supported file systems is really
something that can turn you into a wild boar...

I will definitly download the next snapshot ASAP!

From my point of view I can understand why people rather send their bugs to 
misc
rather than use sendbug. It is the response or feedback they want to get before
submitting plain out dumb bug reports. Most of the time (that is NOT only for
OpenBSD) they are right to do that because it is THEIR fault.

I want to submit a bug report since quite a while about my onboard skc card not
being detected correctly (getting attached and detached right after that in
dmesg). (no I don't want to high jack this thread, just an example)
On the other hand I really love OpenBSD and don't want to blame developers for
unsupported hardware.

Now what should I do about my network card?
Send describtion of problem
1.) to misc@ ?
2.) use sendbug ?
3.) to tech@ ?


This is a thing in general not being clear to me.

Regards,
ahb



Re: Something hosing my msdos/FAT32 file system

2005-10-08 Thread Tom Cosgrove
 Andreas Bihlmaier 8-Oct-05 15:20 

 From my point of view I can understand why people rather send their
 bugs to misc rather than use sendbug. It is the response or feedback
 they want to get before submitting plain out dumb bug reports. Most
 of the time (that is NOT only for OpenBSD) they are right to do that
 because it is THEIR fault.

 I want to submit a bug report since quite a while about my onboard skc
 card not being detected correctly (getting attached and detached right
 after that in dmesg). (no I don't want to high jack this thread, just
 an example) On the other hand I really love OpenBSD and don't want to
 blame developers for unsupported hardware.

 Now what should I do about my network card?
 Send describtion of problem
 1.) to misc@ ?
 2.) use sendbug ?
 3.) to tech@ ?

Plenty of bug reports start out as threads on [EMAIL PROTECTED]  If you're not
sure, ask on [EMAIL PROTECTED]  If it appears that there's a genuine problem,
use sendbug(1) (preferred) or post to [EMAIL PROTECTED]

As a rule of thumb, don't post to tech@ unless you are including a
diff to fix/add something.  Even the developers post to tech@ from
time to time, to get a wider testing audience.

Thanks

Tom



Re: Something hosing my msdos/FAT32 file system

2005-10-08 Thread Nick Holland
Tom Cosgrove wrote:
 Andreas Bihlmaier 8-Oct-05 15:20 
...
 Now what should I do about my network card?
 Send describtion of problem
 1.) to misc@ ?
 2.) use sendbug ?
 3.) to tech@ ?
 
 Plenty of bug reports start out as threads on [EMAIL PROTECTED]  If you're not
 sure, ask on [EMAIL PROTECTED]  If it appears that there's a genuine problem,
 use sendbug(1) (preferred) or post to [EMAIL PROTECTED]
 
 As a rule of thumb, don't post to tech@ unless you are including a
 diff to fix/add something.  Even the developers post to tech@ from
 time to time, to get a wider testing audience.

heh.
That's the nice way of saying what I was just saying.  'cept I had a
line of all caps on the don't post to tech@ part. :)

Nick.
(nowhere near as nice and civil as Tom)



Re: Something hosing my msdos/FAT32 file system

2005-10-08 Thread frantisek holop
hmm, on Sat, Oct 08, 2005 at 10:50:01AM +0100, Tom Cosgrove said that
  frantisek holop 29-Sep-05 01:23 
 
  hmm, on Wed, Sep 28, 2005 at 07:55:26PM -0300, Pedro Martelletto said that
   No, I don't, but that's simply not needed. Just a note saying I was
   running OpenBSD version X, kernel dated Y, on an environment Z, and
   suddenly everything was gone would be a start.
 
  so which part of the referenced mail you don't understand?
  (http://marc.theaimsgroup.com/?l=openbsd-miscm=110488032901414w=2)
  let me see:
  openbsd version:  check
  kernel dated: check
  environment: check
  instructions to repeat (even though somewhat vague,
  what can you do, it's the nature of the bug): check
 
 And which bit of send bug reports to bugs@, or use sendbug(1) didn't
 you understand?
 
 Few developers read [EMAIL PROTECTED]  It is not the place to report bugs.  
 Bugs
 reported here will often go unnoticed.  Bugs filed using sendbug will
 be looked at again and again.

it was not just _me_ who thought that the information which
could be provided is too vague for a proper bug report...

it was everyone...


but let me be one of the first who thank you for your effort.

-f
-- 
senility means never having to drink just to forget.



Re: Something hosing my msdos/FAT32 file system

2005-09-30 Thread Reid Nichol
I can confirm this behaviour.  But, I can still mount
and use the partition.  I'm using 3.7.

What I get is:

1) say /mnt/ms/ directory contains 1, 2, 3 directories
with a bunch of stuff in them.

2) cd /mnt/ms/; mkdir 4; mv * 4

3) cd 4

4) ls and 1, 2, 3 gets listed.

But, if I cd into any of these directories I get:
ls: .: No such file or directory

Still able to mount it and everything.  And the
filesystem still tells me the space is used.  Just
can't see any of it.

I was waiting till I was able to form a proper report
(ie upgrade to 3.8 at least) on this, but since we're
talking about it already thought I'd add in my
report.


best regards,
Reid Nichol

--- Andreas Bihlmaier [EMAIL PROTECTED]
wrote:

 I don't want to heat up this discussion even
 further, BUT
 
 mount a FAT32 partition somewhere and
 cp /some_folder /mnt/fat
 
 There should be files (the more the better) in the
 directory (they should NOT be
 empty).
 
 Now use cmp or diff to compare the directories.
 Everything still correct ?
 Good because it should be!
 
 BUT NOW move that directory INSIDE the FAT32
 Partition, something a long the
 lines of
 mkdir -p /mnt/fat/foo/bar/foobar/
 mv /mnt/fat/some_folder/ /mnt/fat/foo/bar/foobar/
 
 NOW use diff again. Should be hosed up like hell.
 
 At least that is what I get/got 1 week ago on i386
 AND amd64.
 With a 1 week old snapshot.
 
 Had the same issue with 3.7 stable.
 
 Don't have a FAT parition anymore since!
 
 Was this information helpful ? try to reproduce it.
 
 Greetz,
 ahb



Re: Something hosing my msdos/FAT32 file system

2005-09-29 Thread Jan Johansson
frantisek holop [EMAIL PROTECTED] wrote:
 i am sorry to see that solid fat32 support is just not a
 priority for openbsd.  i can understand that, i don't imagine
 Theo has a dual boot fat32 shared partition on any of his
 machines.

Oh, come on. He is trying to fix the problem and there have been
plenty of commits to FAT in the last year. And for me it has been
rock solid.

Let me then tell you how Windows XP flushed my USB drive to
bitheaven because i used fdisk to make a normal partition table
on it.

 ps. and it's really a _shame_ that i can access my openbsd
 partition without a hiccup even from xp.
 http://ffsdrv.sourceforge.net/ heart paining shame.

And let me continue to tell you how ffsdrv blew my OpenBSD
partition to bitheaven.

Happy happy joy this was on my experiment machine and even that
I had backed up.



Re: Something hosing my msdos/FAT32 file system

2005-09-29 Thread Shane J Pearson

Hi Jan,

On 29/09/2005, at 4:14 PM, Jan Johansson wrote:


Let me then tell you how Windows XP flushed my USB drive to
bitheaven because i used fdisk to make a normal partition table
on it.


XP has stuffed me up too on occasion. I try to stay well away from
2000/XP Disk Manager. (Is that what it's called?)

From memory, if your partitions are not in sequential order (2,1,3,4  
for

example) and you then run Disk Manager, it fixes the situation, but
what you end up with is Windows partitions that are okay, but any non
MS partitions are hosed. Why they can't just leave a working config
alone is beyond me.

Another thing that has annoyed me in the past, is that the boot loader
for XP at least (I think possibly also 2k), does not count partition
numbers from what the partition table states, but actually where they
appear on disk. If I have a blank area reserved as a future partition 2
at the beginning of the disk and Windows has partition 1 after that, if
I later use the blank area say for OpenBSD as partition 2, I think I am
safe because the partition number for Windows has not changed. Think
again, Windows no longer boots. So I have to fix it by changing the
boot.ini entry. Then one day if I accidentally run the disastrous
Disk Manager, I am stuffed once again.

Also, I always safely remove my USB storage devices and wait for the
access light to go out and every now and then I suffer from lost files
or sometimes even entire file systems. MS provides some crazy
situations with their own systems.

I agree that MS is hardly a role model for this sort of stuff.

BTW, I have not noticed any problems with -t msdos. Maybe I don't use
it often enough.

Bye for now,


Shane J Pearson



Re: Something hosing my msdos/FAT32 file system

2005-09-29 Thread Andreas Bihlmaier
I don't want to heat up this discussion even further, BUT

mount a FAT32 partition somewhere and
cp /some_folder /mnt/fat

There should be files (the more the better) in the directory (they should NOT be
empty).

Now use cmp or diff to compare the directories. Everything still correct ?
Good because it should be!

BUT NOW move that directory INSIDE the FAT32 Partition, something a long the
lines of
mkdir -p /mnt/fat/foo/bar/foobar/
mv /mnt/fat/some_folder/ /mnt/fat/foo/bar/foobar/

NOW use diff again. Should be hosed up like hell.

At least that is what I get/got 1 week ago on i386 AND amd64.
With a 1 week old snapshot.

Had the same issue with 3.7 stable.

Don't have a FAT parition anymore since!

Was this information helpful ? try to reproduce it.

Greetz,
ahb



Re: Something hosing my msdos/FAT32 file system

2005-09-29 Thread Whyzzi
Oh Cool! I happen to be unlucky enough to have such a setup. Just for
fun I copied my /usr/local (bad idea, too big) to my fat32 partition
as provided by the instructions far below. I took a quick look around
the file structure and then immediately unmounted it, and gave it an
fsck.

=-=-=-=-=-=-=-=-=-=-=-=-
# mount
/dev/wd1a on / type ffs (local, softdep)
/dev/wd0j on /mnt/wd0j type msdos (local)
# df -h
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/wd1a 12.8G1.7G   10.5G14%/
/dev/wd0j 19.5G4.7G   14.8G24%/mnt/wd0j

# disklabel wd0
disklabel: warning, DOS partition table with no valid OpenBSD partition
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: ST380011A
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 156301488
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0   # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
16 partitions:
# sizeoffset  fstype [fsize bsize  cpg]
  c: 156301488 0  unused  0 0  # Cyl 0 -155060
  i:  8191537263 unknown   # Cyl 0*- 81265*
  j:  40965687  81915498   MSDOS   # Cyl 81265*-121905*
# mkdir /mnt/wd0j/hosed
# cp -R /usr/local/* /mnt/wd0j/hosed
cp: symlink: isoinfo.1: Operation not supported

!- blah blah symlink blah blah blah -!

cp: symlink: bzmore: Operation not supported
# diff /usr/local/ /mnt/wd0j/hosed
Common subdirectories: /usr/local/bin and /mnt/wd0j/hosed/bin
Common subdirectories: /usr/local/include and /mnt/wd0j/hosed/include
Common subdirectories: /usr/local/info and /mnt/wd0j/hosed/info
Common subdirectories: /usr/local/lib and /mnt/wd0j/hosed/lib
Common subdirectories: /usr/local/libdata and /mnt/wd0j/hosed/libdata
Common subdirectories: /usr/local/libexec and /mnt/wd0j/hosed/libexec
Common subdirectories: /usr/local/man and /mnt/wd0j/hosed/man
Common subdirectories: /usr/local/mozilla-firefox and
/mnt/wd0j/hosed/mozilla-firefox
Common subdirectories: /usr/local/sbin and /mnt/wd0j/hosed/sbin
Common subdirectories: /usr/local/share and /mnt/wd0j/hosed/share
# mkdir /mnt/wd0j/now_hosed
# mv /mnt/wd0j/hosed /mnt/wd0j/now_hosed
# diff /usr/local /mnt/wd0j/now_hosed
Only in /usr/local: bin
Only in /mnt/wd0j/now_hosed: hosed
Only in /usr/local: include
Only in /usr/local: info
Only in /usr/local: lib
... !- etc -!
# cd now_hosed
# ls
hosed
# cd hosed
# pwd
/mnt/wd0j/now_hosed/hosed/hosed/hosed
# cd /
# umount /mnt/wd0j
# fsck -t msdos /mnt/wd0j
** /dev/rwd0j
** Phase 1 - Read and Compare FATs
** Phase 2 - Check Cluster Chains
** Phase 3 - Check Directories
`.' entry in /now_hosed/hosed has incorrect start cluster
Correct? [yn] y
** Phase 4 - Check for Lost Files
7764 files, 2589184 free (948256 clusters)

* FILE SYSTEM WAS MODIFIED *
=-=-=-=-=-=-=-=-=-=-=-=-
Then like the idiot I am, I rm -f'd the directory tree instead of
looking around to see how much was recovered. Well, I figure that is
enough info for now if anyone wants me to do more testing just email
me back. I would like to point out though the rest of my directories
on the fat32 partition look to be unaffected...

Cheers!


On 29/09/05, Andreas Bihlmaier [EMAIL PROTECTED] wrote:
 I don't want to heat up this discussion even further, BUT

 mount a FAT32 partition somewhere and
 cp /some_folder /mnt/fat

 There should be files (the more the better) in the directory (they should NOT 
 be
 empty).

 Now use cmp or diff to compare the directories. Everything still correct ?
 Good because it should be!

 BUT NOW move that directory INSIDE the FAT32 Partition, something a long the
 lines of
 mkdir -p /mnt/fat/foo/bar/foobar/
 mv /mnt/fat/some_folder/ /mnt/fat/foo/bar/foobar/

 NOW use diff again. Should be hosed up like hell.

 At least that is what I get/got 1 week ago on i386 AND amd64.
 With a 1 week old snapshot.

 Had the same issue with 3.7 stable.

 Don't have a FAT parition anymore since!

 Was this information helpful ? try to reproduce it.

 Greetz,
 ahb




--
I know too much and yet not enough



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread frantisek holop
hmm, on Thu, Sep 15, 2005 at 12:02:42PM +0200, Alexander Hall said that
 Ted Unangst wrote:
 On Wed, 14 Sep 2005, Alexander Hall wrote:
 
 
 I think that bad stuff happens when I move directories around. Windows
 checkdisk (at boot time) once complained about a lot of . and .. 
 directory
 entried that were invalid. I cannot recall if this was done remotely using
 shlight or nfs, or local.
 
 
 there are some issues with msdos, particularly in the directory writing 
 code.  making or moving directories tends to result in badness.
 
 Oh, that's bad. I have never heard of that before. So running windows on 
 the machine and remotely mounting the disk using shlight should be the 
 preferred way?
 
 (I realize the preferred way would be to not use windows at all and 
 mount_nfs a remote ffs file system but that is not my setup right now)
 
 Maybe a warning in in mount_msdos about mounting MS-DOS file systems 
 read-write, like the one in mount_ntfs, would be in order?

i think mount_msdos should be disabled as of now.
it is/was causing me too much grief...  i don't understand
how can be the quality of the vfat file system so bad in openbsd.
it does not go hand in hand with the great quality and stability
of the system.  if nobody cares to fix it, disable it like mount_null.

i also don't understand how is it possible that operations on this
primitive file system tends to result in badness.
especially when so much reference implementations are floating
around (all the other bsd's, linux, embedded devices).

fix it or disable it.  it is giving openbsd a bad name.



forgive me my bitterness.  i am mourning my lost files.

-f
-- 
the best defense against laser is to polish your ship.



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread Alexander Hall

frantisek holop wrote:

i think mount_msdos should be disabled as of now.
it is/was causing me too much grief...  i don't understand
how can be the quality of the vfat file system so bad in openbsd.
it does not go hand in hand with the great quality and stability
of the system.  if nobody cares to fix it, disable it like mount_null.

i also don't understand how is it possible that operations on this
primitive file system tends to result in badness.
especially when so much reference implementations are floating
around (all the other bsd's, linux, embedded devices).

fix it or disable it.  it is giving openbsd a bad name.



forgive me my bitterness.  i am mourning my lost files.


Interesting to hear more people having issues with mount_msdos. Before I 
brought the subject up on the list, I had not heard anything about this. 
Since I now heard about the status of mount_msdos, I only mount msdos 
partitions read-only. I hope not to have any issues with that.


My first complication led to most of my digital camera images were 
unreachable. Thanks to decent fragmentation status of the disk and two 
somewhat decent hacks, most of them were saved though. The programs were 
actually first used for my brother after he reinstalling windows without 
first moving the images away from ``C:\Program Files\Canon...''. It's 
such an excellent default storage place for your images, don't you think?


For the archives: Feel free to email me if you need to extract .jpg's or 
.avi's from a disk (or it's ripped image file). The hacks are in local 
CVS. :-)


/Alexander



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread Spruell, Darren-Perot
From: frantisek holop [mailto:[EMAIL PROTECTED]
 i also don't understand how is it possible that operations on this
 primitive file system tends to result in badness.
 especially when so much reference implementations are floating
 around (all the other bsd's, linux, embedded devices).
 
 fix it or disable it.  it is giving openbsd a bad name.

No it isn't. Consider the number of people that actually *use* the
antiquated piece of garbage file system. Now compare that to those using
OpenBSD. Probably a small portion, no?

Want it fixed? Submit patches. Use your wide array of reference
implementations to fix it, since it's such a hot item on your plate.
 
 forgive me my bitterness.  i am mourning my lost files.

And consequently whining like a little bitch. Ever heard of backups?

DS



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread Pedro Martelletto
Alexander and Frantisek,

It should be of no surprise that if you don't step up and report an
issue, it won't get fixed. Sending a description of the problem to misc@
is not the correct way of submitting a report. Doing so is more or less
like whispering on a large avenue that your car is broken and expecting
the car repairman 3 or 4 blocks away to hear it.

bugs@ is the right place to go, preferably with a (filled) formal PR
like the ones sendbug(1) generates for you. Having two separate lists is
the only way we have to differentiate between the usual amount of
discussions that this list is meant for, and punctual bug reports that
could be worked on.

That said, let's get on what actually matters:

Alexander, can you please try to build a test-case that rules out NFS,
if at all possible? It certainly looks like the culprit. Also, are you
still running 3.7, or have you tried a more recent version of OpenBSD?
If you have, were you still able to reproduce the same problems?
Finally, please don't say you have cool diffs to make things work, and
that if people want to do X or Y under OpenBSD, they should go talk to
you. Submit them for review. This is not Linux.

Frantisek, I unfortunately have no idea as to what kind of issues you
were running into. Could you please send me the details of the problem
you had, or point me anywhere I could find them?

Anyway, please reply to me privately, or even better, submit PRs through
sendbug(1), and I will get back to you.

-p.



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread Pedro Martelletto
http://www.openbsd.org/report.html is also an excellent source of
information on how to report issues, so they can get fixed.

-p.



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread frantisek holop
hmm, on Wed, Sep 28, 2005 at 05:25:11PM -0300, Pedro Martelletto said that
 bugs@ is the right place to go, preferably with a (filled) formal PR
 like the ones sendbug(1) generates for you. Having two separate lists is
 the only way we have to differentiate between the usual amount of
 discussions that this list is meant for, and punctual bug reports that
 could be worked on.

i know very well how to report bugs thank you very much.
been on the list for quite some time now.  to use your car
repairsman example: do you expect me to wreck my car AGAIN
so just i can report you what went wrong?  i am sorry but
my files are not rabbits to conduct experiments on.

this is the biggest problem with file system bug reports.
i don't have 40 systems lying around like Theo does.


regarding my other issues, because you had the courtesy
of lecturing me, let me sink that low and ask you:
have you searched the archives?

http://marc.theaimsgroup.com/?l=openbsd-miscm=110488032901414w=2
http://marc.theaimsgroup.com/?l=openbsd-miscm=110246291210267w=2


look, i am really not a rude person.  not at all.  and being
an openbsd otaku since 2.6 i have never sunk that low
as to rant about openbsd.  this is the system of my choice
since 2.6 and i help when i can.

and i know how it goes around here, because i am not willing
to/and simply can't sacrifice my files perhaps the dev's will
tell me to piss off w/o a proper bug report.  suits me fine,
what could they do?  sacrifice _their_ files?

i am sorry to see that solid fat32 support is just not
a priority for openbsd.  i can understand that, i don't
imagine Theo has a dual boot fat32 shared partition on
any of his machines.

in any case, i expect the devs to do the same they always do
with an underperforming subsystem: disable until fixed.
that's the openbsd way.

-f
ps. and it's really a _shame_ that i can access my openbsd
partition without a hiccup even from xp.  http://ffsdrv.sourceforge.net/
heart paining shame.
-- 
the smallest handcuff in the world is a wedding ring.



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread frantisek holop
hmm, on Wed, Sep 28, 2005 at 11:30:50AM -0700, Spruell, Darren-Perot said that
 No it isn't. Consider the number of people that actually *use* the
 antiquated piece of garbage file system. Now compare that to those using
 OpenBSD. Probably a small portion, no?

consider the number of people who are trying hard to make
openbsd also a desktop system so we don't have to install
linux or some such thingy just to access the goddamn primitive
fat partition.  cause guess what: i don't care about vfat
on my firewalls.

 Want it fixed? Submit patches. Use your wide array of reference
 implementations to fix it, since it's such a hot item on your plate.
  
  forgive me my bitterness.  i am mourning my lost files.
 
 And consequently whining like a little bitch. Ever heard of backups?

oh, send patches says the man whose name turns up 0 bug reports
in gnats.  but as i look at your posts, you are more of the
philospher type, aren't you?

sorry, you are not on my list of people who have the right
to say send patches.  who are you anyway?  where are _your_ patches?

i say it again so you can get it into your head:
i cannot send a patch (yeah i am a loser) but if it
doesnt work realiable TURN IT OFF just as aac(4) is a goner.



your post contributed exactly nill to this discussion.
just as this one, unfortunately.  what a day.

-f
ps. at least you could use a mail client which can reply to threads.
-- 
courage is fear that has said its prayers.



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread Pedro Martelletto
On Wed, Sep 28, 2005 at 11:44:31PM +0200, frantisek holop wrote:
 i know very well how to report bugs thank you very much.

So why didn't you?

 been on the list for quite some time now.  to use your car
 repairsman example: do you expect me to wreck my car AGAIN
 so just i can report you what went wrong?

No, I don't, but that's simply not needed. Just a note saying I was
running OpenBSD version X, kernel dated Y, on an environment Z, and
suddenly everything was gone would be a start.

And you seem to be able to send mail...

What is a totally pathetic posture is to stay in silence and hope your
problems are going to get fixed magically. Or do you believe in
miracles? Or did you light up a candle and sang kumbaya, danced naked
in a circle or...? Because no divinity appeared to me (yet) saying I
should fix your problem. Perhaps you should try harder?

 i am sorry but my files are not rabbits to conduct experiments on.

Like your files are more important than anyone else's. Like your files
are more important than my files. Give me a break.

 regarding my other issues, because you had the courtesy
 of lecturing me, let me sink that low and ask you:
 have you searched the archives?

Heh, yeah, right. So now, besides not having the issues reported where
they should be, developers should have to search every single mailing
list out there looking for issues to fix?

Before I have the courtesy of fixing your problems, could you please
leave your ego for a second, and realize you're just plain wrong?

 http://marc.theaimsgroup.com/?l=openbsd-miscm=110488032901414w=2
 http://marc.theaimsgroup.com/?l=openbsd-miscm=110246291210267w=2

Oh, right. You can mail misc@, but you can't mail bugs@ -- and yet you
do know how to send bug reports. I guess you do make a lot of sense as
well?

 and i know how it goes around here, because i am not willing
 to/and simply can't sacrifice my files perhaps the dev's will
 tell me to piss off w/o a proper bug report.  suits me fine,
 what could they do?  sacrifice _their_ files?

That's what just happened, dude.

-p.



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread Alexander Hall

Pedro Martelletto wrote:

It should be of no surprise that if you don't step up and report an
issue, it won't get fixed.


As I did not know if it was an issue or if I had done something stupid 
myself, I never filed a report. I have never claimed I did so. I was 
wondering what hosed my filesystem, and tedu confirmed that msdosfs very 
well could be the bad guy. If I were to file a report, it would be more 
step-by-step and, at best, even repeatable.



That said, let's get on what actually matters:


Yup.


Alexander, can you please try to build a test-case that rules out NFS,
if at all possible? It certainly looks like the culprit.


Would that mean no NFS at all on the computer, both mounts and exports, 
or would it be sufficient with no NFS concerning the msdos partition and 
the sharing thereof?



Also, are you
still running 3.7, or have you tried a more recent version of OpenBSD?


At the time I was running 3.7 on one computer and 3.6 on the other. 
Since a few days ago, 3.6 is no more since I upgraded to an available 
snapshot (Sep  2 02:40). That would be on my laptop, where (if I recall 
correctly) the problems last appeared.



If you have, were you still able to reproduce the same problems?


No, but as I now mount msdos r/o, I would be surprised if I would have 
been. :d



Finally, please don't say you have cool diffs to make things work, and
that if people want to do X or Y under OpenBSD, they should go talk to
you. Submit them for review. This is not Linux.


Ah, well, they are not diffs. They are more like quick-and-dirty .c 
programs that scan the disk for things that look like avi's and/or 
.jpg's. I get what you mean, but I'm simply not THAT proud of them, and 
I don't think they will contribute much to this list.


Anyway, I am in a position quite like Frantisek, i.e. where my wish is 
_not_ to repeat the problem, since I like to keep my images and data 
intact. What I _could_ do is to free up some space for a new partition 
and try to reproduce the problems there. msdosfs should not be able to 
fsck something up outside of its wdXX now, should it?
The coming week/weeks I will be quite occupied, but as this is an issue 
I would like to have solved, I hope to be able to produce some decent 
problem reports later on.


/Alexander



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread Spruell, Darren-Perot
From: frantisek holop [mailto:[EMAIL PROTECTED]
  Want it fixed? Submit patches. Use your wide array of reference
  implementations to fix it, since it's such a hot item on 
 your plate.
   
   forgive me my bitterness.  i am mourning my lost files.
  
  And consequently whining like a little bitch. Ever heard of backups?
 
 oh, send patches says the man whose name turns up 0 bug reports
 in gnats.  but as i look at your posts, you are more of the
 philospher type, aren't you? 
 sorry, you are not on my list of people who have the right
 to say send patches.  who are you anyway?  where are _your_ patches?

I'm with you. I can't send patches. I don't have the skillz.

But I don't have your problems either. And unlike you, I *am* capable of
sending a bug report if there is something that needs fixed. You, on the
other hand, would rather revert to the maturity of an angry teenager and
start yelling at people to fix their shit because you lost some files. I
forget, did they not back up your data, or was that your responsibility?

You've made your point, something is broken, but you're failing to follow
through on it. Disabling aac(4) is the right thing to do because it cannot
move forward, regardless if more bug reports come in. Disabling msdos
because the relatively few users who do use it can't be bothered to submit
meaningful bug reports, but just want it fixed by someone else, won't solve
anything. Guess what - you have the most valuable information right now that
will help in getting it fixed. Sticking your thumb back in your ass and not
chipping in also means your post contributed exactly nill to this
discussion.

Soon as something doesn't work for me, you'll see me submitting bugs if its
not fixed by the time I try to debug it.

 ps. at least you could use a mail client which can reply to threads.

Contact me off list if you want to take that up with my employer. 

DS



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread frantisek holop
hmm, on Wed, Sep 28, 2005 at 07:55:26PM -0300, Pedro Martelletto said that
 No, I don't, but that's simply not needed. Just a note saying I was
 running OpenBSD version X, kernel dated Y, on an environment Z, and
 suddenly everything was gone would be a start.

so which part of the referenced mail you don't understand?
(http://marc.theaimsgroup.com/?l=openbsd-miscm=110488032901414w=2)
let me see:
openbsd version:  check
kernel dated: check
environment: check
instructions to repeat (even though somewhat vague,
what can you do, it's the nature of the bug): check


 And you seem to be able to send mail...
 
 What is a totally pathetic posture is to stay in silence and hope your
 problems are going to get fixed magically. Or do you believe in
 miracles? Or did you light up a candle and sang kumbaya, danced naked
 in a circle or...? Because no divinity appeared to me (yet) saying I
 should fix your problem. Perhaps you should try harder?

silence?  the fat32 implementation gets mails every once in a while.
it is certainly not something you have to look for with extra
effort in every single mailing list.

and yes, silence it is, because every time someone brings up
hey, something is wrong with fa32, ted says, oh yes, might
result in badness.  well, what CAN you do?  wiser people than
me tried to pinpoint the problem and failed.
so yes, it is silence after a while.  especially where shut
up and code is the motto.

 Like your files are more important than anyone else's. Like your files
 are more important than my files. Give me a break.

my files are certainly much more important for me than to you,
or your files at all for that matter.  give me a break.
and i have like nothing else to do but backup my x gigs every
day because fat32 in openbsd might hose my files on a file system
which is more than 20 years old and looked down upon as primitive.
great.

 Before I have the courtesy of fixing your problems, could you please
 leave your ego for a second, and realize you're just plain wrong?

look, your first mail was really friendly, and i know i reacted
improperly.  it was not against your person and i hope you didn't
take it personally, i certainly didn't mean it.

one word: frustration.
it's just that it's the foul year of our lord 2005 and fat32
is not mature in openbsd.

 Oh, right. You can mail misc@, but you can't mail bugs@ -- and yet you
 do know how to send bug reports. I guess you do make a lot of sense as
 well?

the reason why i didn't send that particular mail (or any other mail
about fat32) to bugs@ is simple.  even though i tried to give as
much info as i could i still did not think it was a proper bug
report.  and it seems, many devs read misc/tech and it's happened
a lot of times that they get heads up about an issue on the mailing
list, and maybe later a proper bug report is filed.  the subtle
nature of these sometimes difficult to reproduce bugs was the sole
reason i posted only to [EMAIL PROTECTED]



-f
-- 
to refuse to decide is a decision.



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread frantisek holop
hmm, on Wed, Sep 28, 2005 at 05:28:09PM -0700, Spruell, Darren-Perot said that
 I'm with you. I can't send patches. I don't have the skillz.

but

 But I don't have your problems either. And unlike you, I *am* capable of
 sending a bug report if there is something that needs fixed. You, on the

so you don't have the skills to code but you have the skils to send
good bug reports.  as i am always willing to learn, please tell me,
how would do you file detailed bug reports about this particular issue?

just imagine: here we are, a nice peaceful day, you playing away
in the nice openbsd world and then you notice something funny:
your TODO list which is popped up with xmessage when you login
in xdm to yer blackbox shows binary gargabe.  the TODO file
happened to be a simple ascii text file on your fat32 partition
mounted to /fat.  you vaguely seem to recall that you edited the
file some days ago from openbsd.  but everything seemed to be ok.

so how would you squeze something MEANINGFUL out from this
particular situation a coder w/the skillz can do something with?
as a programmer myself, i know what kind of info a coder needs
to locate the offending part.  you don't have previous states
which you could compare to, you don't have reference points.
you have nothing.  especially when you are not prepared
because the man page says nothing about possible hosings.



and while we are at it, and hopefully some truly skilled person
is reading this, how do you send a meaningful report about
file system anomalies?


 Contact me off list if you want to take that up with my employer. 

i couldn't care less what mail client u use at work and why
are you replying to misc@ mails in your work time.

-f
-- 
nothing's impossible to those that don't have to do it.



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread Pedro Martelletto
Okay, whatever.

-p.



Re: Something hosing my msdos/FAT32 file system

2005-09-28 Thread Theo de Raadt
 so which part of the referenced mail you don't understand?
 (http://marc.theaimsgroup.com/?l=openbsd-miscm=110488032901414w=2)
 let me see:
 openbsd version:  check
 kernel dated: check
 environment: check
 instructions to repeat (even though somewhat vague,
 what can you do, it's the nature of the bug): check

you have been an asshole for a couple of hours now.  i would not
expect anyone to correspond with you further, at this point.

you've made your point.  you win.  now we don't want to talk
to you.



Re: Something hosing my msdos/FAT32 file system

2005-09-15 Thread Alexander Hall

Ted Unangst wrote:

On Wed, 14 Sep 2005, Alexander Hall wrote:



I think that bad stuff happens when I move directories around. Windows
checkdisk (at boot time) once complained about a lot of . and .. directory
entried that were invalid. I cannot recall if this was done remotely using
shlight or nfs, or local.



there are some issues with msdos, particularly in the directory writing 
code.  making or moving directories tends to result in badness.


Oh, that's bad. I have never heard of that before. So running windows on 
the machine and remotely mounting the disk using shlight should be the 
preferred way?


(I realize the preferred way would be to not use windows at all and 
mount_nfs a remote ffs file system but that is not my setup right now)


Maybe a warning in in mount_msdos about mounting MS-DOS file systems 
read-write, like the one in mount_ntfs, would be in order?


/Alexander