Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Sep 2005 16:53:22 +0200
From:      Chantry Xavier <x.chantry@wanadoo.fr>
To:        freebsd-questions@freebsd.org
Subject:   cp fails copying file from ext2 partition
Message-ID:  <20050913165322.42db8a7b.x.chantry@wanadoo.fr>

next in thread | raw e-mail | index | archive | help
Hi,

I've an external usb hard drive using ext2 filesystem, mounted in /mnt/usb (/dev/da0s1 on /mnt/usb (ext2fs, local)).
I can't copy any non empty files from the ext2 partition to somewhere else (the ext2 partition itself or my local freebsd filesystem).
# cd /mnt/usb
# echo "foo" > file
# cp file file2
cp: file: Invalid argument

cp creates an empty file2 instead of a file containing "foo".
If the source file is empty, cp creates an empty target file without displaying any errors.

I tried with another ext2 partition I had on a local hard disk, it failed the same way.

Note that mv works just fine, so as a workaround, I can move the file to my local hard disk, then copy it again to the ext2 partition.
midnight commander works just fine too, I guess it isnt using cp directly, maybe cpio.

Output of uname -a :
FreeBSD mybox.maison 6.0-BETA4 FreeBSD 6.0-BETA4 #3: Sun Sep 11 18:01:53 CEST 2005     xav@mybox.maison:/usr/obj/usr/src/sys/MYKERNEL  i386

Cheers,
	Xav




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050913165322.42db8a7b.x.chantry>