ikrabbe / plan9front

Automatically exported from code.google.com/p/plan9front
0 stars 0 forks source link

move directories to other directories #83

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
While building notreally.info, I've needed to move various directories up and 
down in the directory hierarchy. Presently I create a new directory, dircp the 
original directory, then remove the original directory. In some cases (such as 
deeply nested hierarchies containing many megabytes or gigbytes of data), this 
is not a satisfactory method.

How might moving directories into other directories be accomplished? 

Original issue reported on code.google.com by stanley....@gmail.com on 18 Aug 2011 at 11:03

GoogleCodeExporter commented 9 years ago
This is particularly needed with cwfs which will otherwise preserve duplicates 
of gigabytes of data for all time.

There was a big argument about how to do this a few weeks ago. If I remember 
right, what came out of it was the news that the hard-storage file servers 
already have means of moving files via commands to their console. "All" that's 
needed is a means for mv to discover the relevant console file and whether 
source and dest are on the same fs. /sys/src/cmd/ns.c may be interesting.

Original comment by tereniao...@gmail.com on 20 Aug 2011 at 11:40

GoogleCodeExporter commented 9 years ago
its impossible to figure out the relevant "console" file.

Original comment by cinap_le...@felloff.net on 22 Aug 2011 at 1:35

GoogleCodeExporter commented 9 years ago
the main reason Tmove was abandoned is that changing 9p is almost impossible 
without
breaking everything. lib9p for example will just assert() if you send it unknown
9P messages (this is fixed in 9front).

Original comment by cinap_le...@felloff.net on 22 Aug 2011 at 1:37

GoogleCodeExporter commented 9 years ago
also, a console file is not really that usefull. only the hostowner
as access to it. its for administrative commands only! i'm not going to
abuse it as a 9p side channel.

i'm going to close this issue as its going nowhere.

i rarely need it. for the worm argument, just dont put random directories
in your worm that you later regret. put them in /tmp or /n/other.

Original comment by cinap_le...@felloff.net on 1 Sep 2011 at 10:22

GoogleCodeExporter commented 9 years ago
Issue will not go away just because it's uncomfortable. ;) I would reopen, but 
I can't see any evidence of the issue being closed.

I misremembered when I wrote my previous comment, and was also evidently not 
thinking straight that day. I won't post my further useless ramblings, I'll 
quote Uriel, who posted something to 9front ML I did not understand at the time:

>>> - add Tmove to 9p and fileservers
>
> This is plain gratuitous idiotic protocol breaking, you can do the
> same thing simply by providing an alternative attach name with ctl
> file(s) for fancy things like moving stuff around.

I'm sure it could not be automatically utilised by mv, but I would consider it 
better than nothing.

Original comment by tereniao...@gmail.com on 1 Sep 2011 at 12:03

GoogleCodeExporter commented 9 years ago
The answer to this always boils down to: don't put big files on Plan 9 drives.

Original comment by stanley....@gmail.com on 1 Sep 2011 at 2:40

GoogleCodeExporter commented 9 years ago
Not being able to reorganize directories without sacrificing significant 
portions of the worm severely hinders the usefulness of hierarchical 
directories as an organizing system. The fact is that sometimes circumstances 
change or knowledge is updated, and the organization of directories needs to be 
adjusted.

Original comment by stanley....@gmail.com on 1 Sep 2011 at 2:44

GoogleCodeExporter commented 9 years ago
there is too mutch talk, too less code.

as a first step i suggest start implementing the move
operation in cwfs so it can be used with a console
command.

just like there is a create command.

Original comment by cinap_le...@felloff.net on 16 Sep 2011 at 7:10

GoogleCodeExporter commented 9 years ago

Original comment by cinap_le...@felloff.net on 4 Nov 2011 at 11:05