Hi there,
I have an odd one for you here. Im trying to copy music from a hard
disk(FFS) mounted on /mnt/media. I can play the music with mplayer
just fine, but cp seems to refuse to believe that the files exist.Whats going on?
---8<---
# fsck /mnt/media
** /dev/rwd1a (NO WRITE)
** Last Mounted on /mnt/media
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
50647 files, 14741198 used, 24829133 free (1229 frags, 3103488 blocks,
0.0% frag mentation)
# pwd
/mnt/media/OGG/devil_sold_his_soul
# find a_fragile_hope/
a_fragile_hope/
a_fragile_hope/at_the_end_of_the_tunnel.ogg
a_fragile_hope/as_the_storm_unfolds.ogg
a_fragile_hope/dawn_of_the_first_day.ogg
a_fragile_hope/awaiting_the_flood.ogg
a_fragile_hope/between_two_words.ogg
a_fragile_hope/sirens_chant.ogg
a_fragile_hope/hope.ogg
a_fragile_hope/in_the_absence_of_light.ogg
a_fragile_hope/in_absense_of_light.ogg
a_fragile_hope/the_starting.ogg
a_fragile_hope/the_coroner.ogg
# cp -r a_fragile_hope /mnt/usb
cp: /mnt/usb/a_fragile_hope/the_coroner.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/as_the_storm_unfolds.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/dawn_of_the_first_day.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/awaiting_the_flood.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/between_two_words.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/sirens_chant.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/hope.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/in_the_absence_of_light.ogg: No such file
or directo ry
cp: /mnt/usb/a_fragile_hope/in_absense_of_light.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/the_starting.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/at_the_end_of_the_tunnel.ogg: No such file
or direct ory
--
Best RegardsEdd
-------------------------------------------...
Hi,
I know what has happened?
---8<---
# ls
a_fragile_hope darkness_prevails
# ls /mnt/usb
palm volume.nam
# cp -R a_fragile_hope /mnt/usb
cp: /mnt/usb/a_fragile_hope/the_coroner.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/as_the_storm_unfolds.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/dawn_of_the_first_day.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/awaiting_the_flood.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/between_two_words.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/sirens_chant.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/hope.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/in_the_absence_of_light.ogg: No such file
or directo
ry
cp: /mnt/usb/a_fragile_hope/in_absense_of_light.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/the_starting.ogg: No such file or directory
cp: /mnt/usb/a_fragile_hope/at_the_end_of_the_tunnel.ogg: No such file
or direct
ory
# ls /mnt/usb
a_frag~1 palm volume.nam
---8<---The directory made has been truncated msdos style. "a_frag~1".
Therefore when cp tries to copy files into the new directory, it can't
find the new filename.The workaround is to do something like this, with a shorter filename
---8<---
# cp -R a_fragile_hope /mnt/usb/a
---8<-----
Best RegardsEdd
---------------------------------------------------
http://students.dec.bournemouth.ac.uk/ebarrett
or make sure you have a long filename in the root directory of the
partition or mount with -l.---
Lars Hansson
Aha! great.
--
Best RegardsEdd
---------------------------------------------------
http://students.dec.bournemouth.ac.uk/ebarrett
While this is a workaround, mounting it with "-l" parameter (mount_msdos
-l) should be the proper solution. Of course, unless you need to keep the
filenames short.On the other hand, one would expect the filesystem code to truncate the
filename before actually trying to open a file on such a filesystem. I
think that Msoft designed it that way. Currently, you create a file and
cannot stat it immediately afterwards. Oh, and a different new file has
appeared there in the meantime! I think it shouldn't work this way. Is it
a valid assumption?Regards,
David
Be VERY careful with LFN support and 8.3 filenames. MS' implementation
of LFN support is broken by design, because the short filenames are
not saved along with the long ones and instead are autogenerated from
the long ones -- which, if you have a set of similarly named files
with long filenames can easily result in a 8.3 filename referring to a
different file after you delete and copy.See the section "Ambiguous LFNs" here:
http://users.iafrica.com/c/cq/cquirke/lfns.htmThe upshot is, you're best off avoiding these older 8.3 FAT file
systems altogether.
I have experienced similar behaviour, except that, with me, after I do an
archive extraction, or a file concatenation of many files, while the file
system only shows one set of files, additional files which were deleted after
the extraction, continue to be listed as existing when I try to do operations
on the directory as a whole.$ cp -R dir new/
Failure! Cannot copy some non-existent file.$ cp -R dir/*.x new/
Works.It is very strange.
--
((name "Aaron Hsu")
(email/xmpp "arcfide@sacrificumdeo.net")
(phone "703-597-7656")
(site "http://www.aaronhsu.com"))[demime 1.01d removed an attachment of type application/pgp-signature]
Does your target dir /mnt/usb exist?
It does. I copied another album onto an SD mounted there and listened
to it on the way to work today.--
Best RegardsEdd
---------------------------------------------------
http://students.dec.bournemouth.ac.uk/ebarrett
Show a ls -la of the source dir and a stat(1) of the dir and at least
one of the problem files.-Otto
Hello,
perhaps output of the following will be more useful:
mount |grep /mnt/usb
df /mnt/usb
df -i /mnt/usb
ls -la /mnt/usb
fsck /mnt/usbThe cp program complains about the target files, not the source.
Regards,
David
--
And God spake unto Moses, and said unto him, I am the LORD:
-- Exodus 6:2
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tejun Heo | [PATCH 2/5] sysfs: simplify sysfs_rename_dir() |
| Andi Kleen | [PATCH x86] [0/16] Various i386/x86-64 changes |
| Dave Hansen | Re: [RFC/PATCH] Documentation of kernel messages |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Thomas Gleixner | Re: [BUG] New Kernel Bugs |
