GNOME Bugzilla – Bug 505690
Can't move files between different NFS mounts
Last modified: 2010-01-05 16:38:42 UTC
Please describe the problem: I have several NFS shares mounted via autofs. When trying to move files from one share to another, Nautilus shows an error dialog stating "Error "Not on the same file system" while moving "some_file". Would you like to continue? [Cancel] [Retry]" (see attached screenshot). Steps to reproduce: 1. Select a file on an NFS share. 2. Try to move it to a different NFS share (drag & drop, cut & paste, ...). 3. Scratch your head at the error dialog, thinking "Yeah ... so what?". Actual results: The error dialog pops up. Expected results: The files should simply be moved from one NFS share to the other. Does this happen every time? Yes. Other information: Copying the files works fine, moving doesn't. Using either drag & drop or cut & paste doesn't make a difference. Moving a file from the local disk to the destination NFS share works, as does moving it back from the NFS share to the local disk. While the "error" message is correct (yes, source and destination *are* on different file systems), I can't see how this would possibly prevent Nautilus from still moving the files over. I have no idea what exactly Nautilus is actually trying to do under the hood here, but as it obviously fails, why not fall back to a simple 'mv' operation? Just for the record, moving the same files from the same source to the same destination works fine as expected with ROX-Filer, Midnight Commander, and even a simple 'mv' on the command line. Looks like Nautilus is trying to do something special (what, exactly, and why? it's a simple move operation, after all!) and fails. Here's a (partial) list of my NFS mounts: [zlatko@disclosure]:~$ mount -t nfs airframe:/mnt/storage/tmp on /mnt/auto/nfs/airframe/tmp type nfs (rw,noexec,nosuid,nodev,rsize=16384,wsize=16384,soft,intr,addr=192.168.1.3) airframe:/mnt/storage/media on /mnt/auto/nfs/airframe/media type nfs (rw,noexec,nosuid,nodev,rsize=16384,wsize=16384,soft,intr,addr=192.168.1.3) airframe:/mnt/storage/transfer on /mnt/auto/nfs/airframe/transfer type nfs (rw,noexec,nosuid,nodev,rsize=16384,wsize=16384,soft,intr,addr=192.168.1.3)
Created attachment 101613 [details] Nautilus error dialog
As seen from ./libnautilus-private/nautilus-dnd.c void nautilus_drag_default_drop_action_for_icons (GdkDragContext *context, const char *target_uri_string, const GList *items, int *action) { ... if (dropped_uri != NULL) { gnome_vfs_check_same_fs_uris (dropped_uri, target_uri, &same_fs); target_is_source_parent = gnome_vfs_uri_is_parent (target_uri, dropped_uri, FALSE); gnome_vfs_uri_unref (dropped_uri); } gnome_vfs_uri_unref (target_uri); if (same_fs || target_is_source_parent) { if (actions & GDK_ACTION_MOVE) { *action = GDK_ACTION_MOVE; } else { *action = context->suggested_action; } } else { if (actions & GDK_ACTION_COPY) { *action = GDK_ACTION_COPY; } else { *action = context->suggested_action; } } } The error lies in gnome_vfs_check_same_fs_uris. We need to check, if the files both lie on nfs share.
With nautilus 2.22 Operation Source Destination --------------------------------------------- Copy local nfs share. Move nfs share local Move nfs share nfs share something needs to be done about check_same_fs reference - http://svn.gnome.org/viewvc/nautilus/trunk/libnautilus-private/nautilus-dnd.c?view=markup From - http://library.gnome.org/devel/gio/unstable/GFileInfo.html#G-FILE-ATTRIBUTE-ID-FILESYSTEM:CAPS "An example use would be during drag and drop to see if the source and target are on the same filesystem (default to move) or not (default to copy)."
Part one of the problem - The default selection should be copy, rather than move when dnd, when dragging and dropping a file from one nfs share to another. This applies to both upstream and 2.20.x series. Part two of the problem - check_same_fs ( nautilus 2.22.x) does not handle remote file system correctly ? Part three of the problem wrt nauytilus 2.20.x gnome-vfs does not handle move correctly. #5 0x0072b6e6 in handle_error (result=0xb7d2d05c, progress=0xb7d2d1b0, error_mode=0xb7d2d14c, skip=0xb7d2d058) at gnome-vfs-xfer.c:303
+ Trace 192710
move_item fails in gnome-vfs. $ gnomevfs-mv /nfs/share/1/file /nfs/share/2 move `file:///nfs/share/1/file' `file:///nfs/share/2/': Not on the same file system
Just for the record, moving files between different NFS shares works fine for me now with nautilus-2.22.0.
nautilus 2.22 uses gio, and not gnome-vfs.
this is fixed with new version of nautilus, were nautilus checks for id::filesystem attribute. Is there any reason to use gnome-vfs ?
Closing as OBSOLETE as per comment #5.