Bugzilla – Bug 119900
Improve default mount options
Last modified: 2010-01-08 15:24:27 UTC
Default mount options should contain: 1) "noatime" for slowly seeking and media with limited rewritability, if filesystem supports it If filesystem supports atime (e. g. UDF), noatime is a must. It speeds reading of large amounts of small files from CD/DVD up to 10 times! Not having noatime, CD-RW is wasted after few reading only sessions. Affected media types: DVD-RAM (big slow down of reading, waste if used for long time), flash RAM (if formatted for filesystems supporting atime and used for long time) Media wasting: CD-MRW, CD-RW packet mode, DVD-MRW, DVD-RW packet mode (if such mode exists) Due to media wasting and extreme slow-down, setting severity to major. 2) It would be nice to not have +x flag for files copied from vfat and dos* filesystems. Mount command lacks proper mount option, but for default umask, fmask=0133 can provide this. Note: Mount command uses umask of mount command process for default umask, so the proper value should be umask|0111.
Is this change really needed for 10.0? Need we really a YOU updated or is it for 10.1?
I would like to see YOU or at least SDB, but it depends on decision of Andreas. For those few users of packet writing and Mr. Rainier CD-RW it is a major issue, because their medium is wasted after reading (i. e. atime rewrites) of about 20 files from medium (OK, Mt. Rainier can remap burned-out / inode block several times). For many DVD-RAM user, 100000 reads (i. e. atime rewrites) limit does not hurt, but it also means significant speed-up, too (2x-8x depending on file sizes, file system, hierrarchy and software): And finally, VFAT umask is only a cosmetic issue. For example images from camera don't have +x flag. DVD-RAM example: hammer:~ # umount /media/dvdram hammer:~ # eject /dev/sr0 ; eject -t /dev/sr0 hammer:~ # mount /dev/sr0 /media/dvdram hammer:~ # time tar -c -f /dev/null /media/dvdram/linux-2.6.13-15 tar: Removing leading `/' from member names real 4m16.522s user 0m0.160s sys 0m0.836s hammer:~ # umount /media/dvdram # another 30 seconds of writing hammer:~ # eject /dev/sr0 ; eject -t /dev/sr0 hammer:~ # mount -onoatime /dev/sr0 /media/dvdram hammer:~ # time tar -c -f /dev/null /media/dvdram/linux-2.6.13-15 tar: Removing leading `/' from member names real 2m35.250s user 0m0.480s sys 0m0.976s
I take next week a look at this.
Maybe bug 119888 is related (but change in fstab to rw causes ro warning for non DVD-RAM media).
Not for 10.0 - and please discuss the default on the research mailing list first.
Mail to research mailing list sent: Subject: experiences and suggestions for removable media mounting and usage Date: Fri, 07 Oct 2005 13:13:28 +0200
Adding a new issue: 3) "sync" burns-out FAT or similar area of media with limited rewritability after some time and slows down write. This issue affects especially flash cards. Adding Kay Sievers to discuss this bug with.
The "burns out" thing is not really an issue on todays media, but sure, we should not write more often than needed. Here is a short analysis from a flash vendor: http://www.sandisk.com/pdf/oem/WPaperWearLevelv1.0.pdf
Yes, but noatime issue in 1) affects CD-RW, too. It has typically 50-1000 write cycles and for example packet mode CD-RW has no bad block mapping. And both 1) and 3) have significant impact on writing performance.
I reassign this to coolo, he plan to write a storage manager for 10.1. This issue should be fixed in this storage manager, the hal-subfs-mount helper should be then obsolete
vfat can have additionally "quiet" as default mount option. It improved behavior of some file managers (e. g. mc). And vfat "codepage=" can contain legacy encoding corresponding to locale. As a source you can use map from /etc/profile.d/glib2.sh. In past there was a standard conversion between ISO-Latin pages and IBM-Latin pages (e.g. ISO-8859-2 corresponds to CP852). I probably can prepare the map for you.
http://fy.chalmers.se/~appro/linux/DVD+RW/#udf decribes one another type of media wasting - dirty flag writing on each R/W mount. I don't know, whether it is still an issue with current kernel, but if it is, with the "help" of subfs, it can waste root node of a medium soon.
subfs is dropped and KDE does most of what you describe already - and is user configurable.
Reopening bug. At least "noatime" on DVD-RAM (and probably CD-MRW and packet CD-RW) is not yet fixed in SuSE Linux 10.1 beta8 with default mount options. I have not yet tested other. Please reassign to maintainers of programs, which should provide mount options in 10.1.
Reassigning to gnome-volume-manager maintainer - I have experienced it in GNOME. Not sure whether KDE shares defaults.
what filesystems do we want to add noatime as a mount option for?
There is a list of useful flags: 1) "noatime" for slowly seeking, slowly writing and media with limited rewritability, if filesystem supports it. For DVD-RAM and CD-MRW it means UDF in most cases. I am not sure, whether noatime issue affects also FAT32 flash ROM (some people report so). In general, it should not be a mistake to use "noatime" for any RW mount of CD, DVD, flash ROM. 2) FAT noexec "fmask=0133" (or better use current umask to create it) - see 2) in the report above. 3) "quiet" and "codepage=" for vfat/fat/msdos: comment #11. "quiet" has no problems, "codepage=" needs some locale dependent settings. Remaining issues: sync/async: I guess it was addressed by other bug reports. delayed dirty flag: Needs further research (comment #12).
I'm not so sure this is major. Everything works pretty good by default.
fixed in our packages
Reopening. The result still looks ugly. Photos from my camera are all-uppercase and marked as executable.
Created attachment 91800 [details] hal-vfat-methods.patch This patch seems to provide much better vfat mount options: - removes shortname=winnt - adds support for fmask and sets it to reasonable value Note that it would be much better to be able to set default mount options in gconf key or even on per-device basis.
Created attachment 91801 [details] hal-vfat-methods.patch Required fix of hal.
Please note, that there can be more differences between allowed mount options in storage-methods and in mount(8) man page.
Created attachment 91806 [details] gnome-volume-manager-vfat-flags.patch The right patch for the gnome-volume-manager.
Jeff, this is assigned to you. Are you taking care of this for 10.2?
yes, I've already got a patch along with some related fixes... just waiting to hear that they are working for a customer
In SuSE Linux 10.2, DVD-RAM is again mounted with atime. It slows down reading of small files by a factor of 5-10 by tons of obsolete seeks.
I don't see the patch Jeff is talking about in comment #26 in 10.2 nor in STABLE. I think we'll just go with Stanistav's patch, since that looks correct. Should I submit this as an update to 10.2 or just to STABLE?
It looks like the equivalent of Stanislac's patch is already in gnome-volume-manager 2.17.0, which is in 10.2 and STABLE. The noatime option should be added to gnome-mount's default gconf schemas for iso9660 and udf, I suppose. I'll look at doing that.
I entered Bugzilla exactly to *complain* about the missing shortname=winnt option when mounting vfat file systems. Without that option, names that fall into the DOS 8+3 pattern are automatically converted to lower case only. This can have effects ranging from the undesirable to the disastrous, as in the following case: Install a new SLED into a dual-boot scenario with a Windows D-drive that contains the (Windows) iFolder for the user. Novell IS&T don't recommend using the same iFolder for both operating systems, but we do recommend locally copying it, so that the iFolder client on the Linux side only needs to update its index files to initialise itself, rather than download the entire iFolder contents. However, if there is *any* name mangling in the mount option, this can have disastrous effects on the user's iFolder. In the best case, there is a phantastic waste of bandwidth as files get up and downloaded which are seen as different by Linux but not by Windows, in the worst case the user may lose them entirely. Please, give us that namespace=winnt back! > Created an attachment (id=91800) [edit] > hal-vfat-methods.patch > > This patch seems to provide much better vfat mount options: > > - removes shortname=winnt > - adds support for fmask and sets it to reasonable value > > Note that it would be much better to be able to set default mount options in > gconf key or even on per-device basis. >
In openSUSE 10.2 I see slightly different problems: noatime and nodiratime: Flags were moved to the d-bus default options enabled for all filesystems. Looking at g-v-m sources, it seems that it tries to set them, only if they are configured for defined filesystem. But it seems that g-v-m ignores globally enabled flags. Using noatime and nodiratime is a must for all devices with slow seek, slow speed and limited rewrite count. For example, DVD-RAM reading is nearly about 10 times faster when reading unpacked kernel sources with them! The main problem is the fact, that it tries to commit atime and diratime in half of reading of file. It causes obsolete seeks and it make things slower. Making things slower cause, that commit interval for this file will again expire during reading of one of next files and so on. About winnt flag: I don't understand technical background, but I definitely want to see pictures from my camera (using only 8+3 names) downloaded in lowercase. Well, ideally I would see my camera flash mounted as msdos, not vfat. My camera writes names uppercase. I am not sure, whether it is possible to fulfil both requirements, or specifically, wheter it is possible to discriminate between vfat-enabled and 8+3 volumes. And finally, the fmask/dmask stuff from upper mentioned patch should be configurable. Just now, it is OK to sed fmask -x for all files. But if we will use binfmt_misc for running Windows executables, we may want .exe, .com and .bat with +x. Setting +x for all files can have ugly consequences. But it would not be possible without kernel changes.
I have just discussed the winnt problem. Summary: - Devices using only 8+3 uppercase. We want them all-lowercase, no vfat records. I name these as msdos, but we can mount most of them as vfat, but with "lower" option without risk of file system breakage. - Devices using long filenames. We want "winnt" option and vfat records. It is not easy to discriminate between these cases. There are few ideas: - Guess: Check file system root. If there is no vfat item, guess as msdos, otherwise vfat. Will fail if file system root was created on vfat, but all files and directories were 8+3 all-uppercase. Will fail for just formatted card. - Guess + ask user: Guess. If there is no vfat entry, ask user "File system seems to use only 8+3 uppercase file names. Do you want to support long file names and/or use simple case conversion?" - Guess + ask user + remember: Remember USB ID or flash serial number and not as again. - USB ID list: If you are mounting USB device known to not support vfat (most cameras, some MP3 players,...), use msdos. - Camera DCIM list: Mount ro as vfat, look at DCIM/dcim, look at 100*, compare it with camera default names. If it is owned by 8+3 device, unmount and mount as msdos, otherwise remount rw. - Format stamp list: Check format stamp. If card was formatted on known 8+3 device, use msdos, otherwise vfat. - Optionally allow to store correct options on a (hidden) file in the file system root. There is one unwanted consequence of winnt flag: If you are copying a lowercase file from computer back to former MSDOS-only medium, it creates two entries in the file system structure - one uppercase MSDOS entry and one lowercase vfat entry. Some embedded systems may not accept it.
Folks, I see that you are trying very hard to come up with a technical solution that incorporates Stanislav's expressed wish "I definitely want to see pictures from my camera (using only 8+3 names) downloaded in lowercase". I am trying to argue from the position of an IT manager in a big corporation, the kind of customer we at Novell are trying to sell product to so that we all can continue to have a salary and feed our children. While this argument may not apply to OpenSuSE, it does apply to SLED. So: I don't care about the OpenSuSE release, but I don't want to see any file-name mangling in SLED. MS-DOS had uppercase-only 8+3 file names. People who didn't like it, didn't use MS-DOS (such as I, being an old UNIX hand). But that's the world we live in, and if today's digital cameras still use MS-DOS filenames, then the directories containing our photographs will have upper case file names. Tough! Changing the file names should and could be done with a tool (i.e. a 5-line shell script), but it should not be done transparently through the mount option of the file system. My 2 cents.
Splitting to more particular bugs.
In recent versions it's easy to preconfigure the default in GNOME (10.3 - gnome-volume-manager, 11.0 - nautilus) using gconf-editor. It provides an easy solution for change of of the default mount options for particular file systems. It decreases urgency of shortname= guessing nearly to zero - people can adjust their settings as they need. The rest remains valid. The default must be usable. In addition, being able to set mount options (and even filesystem) for particular medium would be very nice and easy to implement.
ping. Dose customer still wait for the request? As the whole architecture has been changed in both SLED11 and upstream.
There was no customer request. It was found during testing of removable media. At least major part of the complain - hardcoded mount options are fixed in SLE11. See comment 35. But the DVD-RAM & CD-MRW atime rewrite default was never changed: See bug 119900. Starting with openSUSE 11.2 it is broken again: Mount options are again not configurable. Now they are coded in DeviceKit-disks: DeviceKit-disks-007/src/devkit-disks-device.c: vfat_defaults. It is possible to pass custom mount options without root privileges e. g. by using devkit-disks utility, but I found no way to configure it in the GNOME auto mounting system. Well, I don't yet fully understand the new mechanism, but it seems to be mounted by nautilus->gvfs->gvfs-backends->gvfs-gdu-volume-monitor->libgdu0->DeviceKit-disks->udev. Starting with openSUSE 11.2 there is another mount problem - bad mtime - see bug 556979. But anything yet done is far from the ideal state: Make possible to user-configure mount defaults and make possible to remember mount options (or even file system) for particular medium.
(In reply to comment #37) > Starting with openSUSE 11.2 it is broken again: Mount options are again not > configurable. > > It is possible to pass custom mount options without root privileges e. g. by > using devkit-disks utility, but I found no way to configure it in the GNOME > auto mounting system. Right, there is no way to pass any custom mount options anymore. > Well, I don't yet fully understand the new mechanism, but it seems to be > mounted by > nautilus->gvfs->gvfs-backends->gvfs-gdu-volume-monitor->libgdu0->DeviceKit-disks->udev. Looks right, besides that udev is not involved in mounting, it's the dk-disks daemon. > But anything yet done is far from the ideal state: Make possible to > user-configure mount defaults and make possible to remember mount options (or > even file system) for particular medium. The upstream project does intentionally not support anything like that anymore. Any discussion about this should better be addressed to the freedesktop upstream project, and not in the Novell bugzilla.
Could this bug be closed.
hi all,could this bug be closed? Looking forword to your reply.
Well, it should be probably done in upstream.