Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

O.K I am trying to do the following very simple command and it is failing as follows...

mv '/home/admin/Downloads/folder1' '/home/admin/MyLibrary/MyVideos/TV/folder1/'
mv: cannot move `/home/admin/Downloads/folder1' to a subdirectory of itself,     `/home/admin/MyLibrary/MyVideos/TV/folder1/'

The destination is NOT a subfolder of the source - why is it giving me this error?? Linux version is a custom version of Red Hat on a NAS box. Thanks

edit:

In case my filesystem is incorrect added output of df -h

-bash-3.2$ df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                212M  156M   56M  74% /
ubi0:rootfs           212M  156M   56M  74% /
none                   62M   40K   62M   1% /dev
nodev                  62M   28K   62M   1% /var/log
nodev                  62M  1.1M   61M   2% /mnt/tmpfs
nodev                  62M     0   62M   0% /var/lib/php/session
nodev                 3.7T  932G  2.8T  25% /tmp
nodev                  62M  1.1M   61M   2% /var/run
nodev                  62M  1.1M   61M   2% /var/cache
nodev                  62M  1.1M   61M   2% /var/lib/axentra_sync
df: `/var/lib/oe-admin/minions': Permission denied
df: `/var/lib/oe-admin/actions': Permission denied
nodev                  62M  1.1M   61M   2% /var/lib/oe-update-checker
nodev                  62M  1.1M   61M   2% /etc/blkid
nodev                  62M  1.1M   61M   2% /var/lib/dbus
nodev                  62M  1.1M   61M   2% /var/lib/dhclient
nodev                  62M  1.1M   61M   2% /var/lock
nodev                  62M  1.1M   61M   2% /var/spool
nodev                  62M  1.1M   61M   2% /var/lib/avahi-autoipd
nodev                  62M  1.1M   61M   2% /etc/dhclient-eth0.conf
nodev                  62M  1.1M   61M   2% /etc/printcap
nodev                  62M  1.1M   61M   2% /etc/resolv.conf
/dev/md0              1.9T  473G  1.4T  26% /mnt/disk1
/dev/sdb1             1.9T  459G  1.4T  25% /mnt/disk2
none                  3.7T  932G  2.8T  25% /home
none                  3.7T  932G  2.8T  25% /tmp
none                  3.7T  932G  2.8T  25% /var/cache/mt-daapd

second edit:

I should have mentioned this at the time but Its only just dawned on me that this NAS has two physical disks in a JBOD configuration (treating two disks as one filesystem). This is the contents of /proc/mounts..

rootfs / rootfs rw 0 0
ubi0:rootfs / ubifs rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
none /dev tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
nodev /var/log tmpfs rw 0 0
nodev /mnt/tmpfs tmpfs rw 0 0
nodev /var/lib/php/session tmpfs rw 0 0
nodev /tmp tmpfs rw 0 0
nodev /var/run tmpfs rw 0 0
nodev /var/cache tmpfs rw 0 0
nodev /var/lib/axentra_sync tmpfs rw 0 0
nodev /var/lib/oe-admin/minions tmpfs rw 0 0
nodev /var/lib/oe-admin/actions tmpfs rw 0 0
nodev /var/lib/oe-update-checker tmpfs rw 0 0
nodev /etc/blkid tmpfs rw 0 0
nodev /var/lib/dbus tmpfs rw 0 0
nodev /var/lib/dhclient tmpfs rw 0 0
nodev /var/lock tmpfs rw 0 0
nodev /var/spool tmpfs rw 0 0
nodev /var/lib/avahi-autoipd tmpfs rw 0 0
nodev /etc/dhclient-eth0.conf tmpfs rw 0 0
nodev /etc/printcap tmpfs rw 0 0
nodev /etc/resolv.conf tmpfs rw 0 0
/dev/md0 /mnt/disk1 xfs rw,noatime,nodiratime,grpid 0 0
/dev/sdb1 /mnt/disk2 xfs rw,noatime,nodiratime,grpid 0 0
none /home aufs rw,si=c7f860a0,xino=/mnt/disk1/.aufs.xino,noplink,create=mfs,sum,br:/mnt/disk1=rw:/mnt/disk2=rw 0 0
none /tmp aufs rw,si=c7f860a0,xino=/mnt/disk1/.aufs.xino,noplink,create=mfs,sum,br:/mnt/disk1=rw:/mnt/disk2=rw 0 0
none /var/cache/mt-daapd aufs rw,si=c7f860a0,xino=/mnt/disk1/.aufs.xino,noplink,create=mfs,sum,br:/mnt/disk1=rw:/mnt/disk2=rw 0 0

Output of fsck /home

fsck /home
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
fsck.ext2: Is a directory while trying to open /home

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

I don't have anything in my logs folder that looks relevant - thanks for your input.

-bash-3.2$ pwd
/var/log
-bash-3.2$ ls
cups  dmesg  httpd  igd-client  samba  wtmp  xferlog

Third Edit

Included contents of fstab

# This file is edited by fstab-sync - see 'man fstab-sync' for details
#
# /etc/fstab: static file system information.
#
# file system   mount       type    options           dump    pass
#/dev/sda1       /           ext3    defaults          1       1
proc            /proc       proc    defaults          0       0
devpts          /dev/pts    devpts  gid=5,mode=620    0       0
sysfs           /sys        sysfs   defaults          0       0
#/dev/sda3   /home   ext3    defaults,bsdgroups,noatime,nodiratime    0   0

## other examples, uncomment to activate
#/dev/sda2      swap        swap    defaults          0       0
nodev           /var/log tmpfs
nodev           /mnt/tmpfs tmpfs
ubi0:rootfs / ubifs defaults 1 1
nodev /var/lib/php/session tmpfs defaults
share|improve this question

1 Answer 1

Are you sure? Maybe there are is a symlink and the destination path actually is a subfolder of the source path. Compare the output of readlink -e /home/admin/Downloads/folder1 and readlink -e /home/admin/MyLibrary/MyVideos/TV/folder1.

share|improve this answer
    
I already had an answer on this question and it was deleted. very unhelpful (not you)... Thanks for the suggestion - there is no simlink. If I try to create anything inside the '/home/admin/MyLibrary/MyVideos/TV/folder1' I am getting an input/output error. I think something is wrong with the drive or file system... I've posted the results of df -h to my original question does anything look wrong with my filesystem? –  calumbrodie Feb 24 '11 at 22:38
    
Instead of the output of df, it would be even more useful to see the contents of /proc/mounts. I think it would be a good idea to run fsck on your /home filesystem, but I'm not sure what device it is on. Since you are receiving i/o errors, could you post them? I would look in /var/log/messages for more i/o errors, you should be able to match the timestamps in that file with the times you tried to write to /home/admin/MyLibrary/MyVideos/TV/folder1. –  sciurus Feb 28 '11 at 17:41
    
Hi Sciurus - sorry I didn't reply - I wasn't notified that you'd made a comment (spend more time on stackoverflow). I've edited my answer to include some more information that I should have incuded at the time –  calumbrodie Mar 26 '11 at 23:24
    
I've now also included fstab to see if that helps –  calumbrodie Mar 27 '11 at 15:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.