After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 505690 - Can't move files between different NFS mounts
Can't move files between different NFS mounts
Status: RESOLVED OBSOLETE
Product: gnome-vfs
Classification: Deprecated
Component: File operations
2.20.x
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-26 08:54 UTC by Thomas Zajic
Modified: 2010-01-05 16:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Nautilus error dialog (14.30 KB, image/png)
2007-12-26 08:56 UTC, Thomas Zajic
Details

Description Thomas Zajic 2007-12-26 08:54:54 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)
Comment 1 Thomas Zajic 2007-12-26 08:56:06 UTC
Created attachment 101613 [details]
Nautilus error dialog
Comment 2 Ritesh Khadgaray ( irc:ritz) 2008-03-17 15:29:43 UTC
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.
Comment 3 Ritesh Khadgaray ( irc:ritz) 2008-03-17 15:43:30 UTC
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)."
Comment 4 Ritesh Khadgaray ( irc:ritz) 2008-03-17 18:03:55 UTC
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
  • #6 move_items
    at gnome-vfs-xfer.c line 1985

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
Comment 5 Thomas Zajic 2008-03-18 21:10:33 UTC
Just for the record, moving files between different NFS shares works fine for me now with nautilus-2.22.0.
Comment 6 Ritesh Khadgaray ( irc:ritz) 2008-03-19 07:36:34 UTC
nautilus 2.22 uses gio, and not gnome-vfs.
Comment 7 Ritesh Khadgaray ( irc:ritz) 2009-04-07 19:42:36 UTC
this is fixed with new version of nautilus, were nautilus checks for id::filesystem attribute.

Is there any reason to use gnome-vfs ?
Comment 8 Tobias Mueller 2010-01-05 16:38:42 UTC
Closing as OBSOLETE as per comment #5.