Maurilio Longo wrote: > Hi all, > > since I've got a problem with CIFS server which stops me from using it and > I've found that samba is slooooow if a folder has a few thousands files, > because it has to do case insensitive matches on a case sensitive filesystem > which is done reading the full directory and then doing a case insensitive > match for every file, I decided to do the following test. > > First, I've created a zfs filesystem with casesensitivity property set to > 'insensitive' and then I've shared this filesystem via samba telling samba to > treat it as a sensitive filesystem, that is, inside /etc/sfw/smb.conf I have > > [MYSHARE] > path /myzfs_caseinsensitive/filesys/ > case sensitive = Yes > > This is fast, even with 10 thousands files, because samba just does a stat() > on the filename and zfs handles the case insensitivity issue, but, there is > still one problem: I cannot change a file name from "foo" to "Foo", it always > keeps the case it had when it was created. > > BTW, from a console, a > > mv "foo" "Foo" > > fails as well with the error that 'foo' and 'Foo' are the same file. > > I think that zfs, here, is a little bit too strict in its > caseinsensitivity-ness :) > ZFS specifically supports this renaming. It is 'mv' and the CIFS server that are causing you grief here.
spidey% zfs create -o casesensitivity=insensitive tank/timh/ins spidey% cd /tank/timh/ins spidey% echo 'this is a file' > myfile spidey% ls myfile spidey% mv myfile Myfile mv: myfile and Myfile are identical spidey% ~/rename myfile Myfile spidey% ls Myfile The rename program used here is a simple utility that calls rename(2). mv(1) does lookups on the file names provided and if it gets the same answer for both it decides it has nothing to do. This is of course, sort of wanting your cake and wanting to eat it, too. [1] This is case-insensitivity except when it is inconvenient. :-) Presumably the CIFS server *could* special case this behavior. -tim [1] http://en.wikipedia.org/wiki/Have_your_cake_and_eat_it_too if you are unfamiliar with the idiom > Creating a filesystem with casesensitivity=mixed does not work either, > because, while the mv test succeeds and I can rename 'foo' to 'Foo', if, for > example, a program looks for (from the samba share) a file named 'MAGA.CDX', > but it does so using 'MAGA.cdx' as its name, it does not find it and this > breakes nearly every DOS/WIN program that I have. > > So, the question is: is the casesensitivity=insensitive behaviour of zfs with > regards to the mv foo Foo example correct or do I have to wait for the CIFS > server to reach samba in terms of compatibility with the microsoft world? :) > > Best regards. > > Maurilio. > > PS. Maybe I just stretched samba a little too much, but, for example, Mac OS > X, which is the only other 'unix' derivative (I don't know how to express > this better in english and I hope I'm not upsetting anyone here :) ) which > has a case insensitive but case preservative filesystem can do a mv foo Foo > and it works as 'expected' (by me, at least :) ) > > > This message posted from opensolaris.org > _______________________________________________ > storage-discuss mailing list > [email protected] > http://mail.opensolaris.org/mailman/listinfo/storage-discuss _______________________________________________ storage-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/storage-discuss
