Re: How to work around E000018: invalid cross-device link

2021-03-11 Thread Daniel Shahaf
Daniel Sahlberg wrote on Thu, Mar 11, 2021 at 08:56:27 +0100:
> Den ons 10 mars 2021 kl 16:21 skrev Zhao Wu :
> > 1. sensitive files must be kept on encrypted file system, but to put the
> > entire repo is too slow;
> >
> 
> Since you most probably have multiple working copies and individual
> developers can check out a new working copy wherever they want, I think it
> will be difficult to implement such a policy across your organization.
> Unless you have very specific hardware/software limitations I would suggest
> to take the performance hit and encrypt everything. (This might also apply
> to the disk on the server where the actual repository is stored).

Don't forget about encrypting the relevant parts of .svn/, such as 
.svn/pristine/.


Re: How to work around E000018: invalid cross-device link

2021-03-11 Thread Zhao Wu
Sorry for the confusion. By "repo" I mean the working copy that a user
checks out. Svn1.6.x used to follow symlinks when checking out a copy, but
since svn1.7.x all checked out directories must reside on the same file
system (i.e. no symlinks or mount points).  As many stackoverflow users
have pointed out, this is rather inconvenient.
regards,
--Zhao

On Thu, Mar 11, 2021 at 9:20 PM Nico Kadel-Garcia  wrote:

> On Wed, Mar 10, 2021 at 10:21 AM Zhao Wu  wrote:
> >
> > To whom it may concern,
> >
> > Is it possible to put one directory in a repo on a mounted directory? We
> need this for several reasons:
> > 1. sensitive files must be kept on encrypted file system, but to put the
> entire repo is too slow;
> > 2. sometimes we want to test different versions without checking out the
> entire repo;
> > 3. we want to keep large data files in the repo on SSD instead of HDD
>
> No.The "repo" on the server is basically, a database with a list of
> all the commits referring to the content of the repo, not a filesystem
> that can be split this way. I think you'll need to split the repo into
> multiple repos along the lines of the security you want.
>


Re: How to work around E000018: invalid cross-device link

2021-03-11 Thread Nico Kadel-Garcia
On Wed, Mar 10, 2021 at 10:21 AM Zhao Wu  wrote:
>
> To whom it may concern,
>
> Is it possible to put one directory in a repo on a mounted directory? We need 
> this for several reasons:
> 1. sensitive files must be kept on encrypted file system, but to put the 
> entire repo is too slow;
> 2. sometimes we want to test different versions without checking out the 
> entire repo;
> 3. we want to keep large data files in the repo on SSD instead of HDD

No.The "repo" on the server is basically, a database with a list of
all the commits referring to the content of the repo, not a filesystem
that can be split this way. I think you'll need to split the repo into
multiple repos along the lines of the security you want.


Re: How to work around E000018: invalid cross-device link

2021-03-11 Thread Zhao Wu
On Thu, Mar 11, 2021 at 3:56 PM Daniel Sahlberg 
wrote:

> Den ons 10 mars 2021 kl 16:21 skrev Zhao Wu :
>
>> To whom it may concern,
>>
>> Is it possible to put one directory in a repo on a mounted directory? We
>> need this for several reasons:
>>
>
> When you mention "repo", is it actually the repository you refer to or is
> it a working copy?
>
> The repository, which is stored on the server, contains only a few
> directories (and the actual content is stored under db\revs\...) and there
> is no relation between the path on the server and the actual path of the
> content. (In the thread
> http://mail-archives.apache.org/mod_mbox/subversion-users/202103.mbox/%3cpr3pr06mb6922399f737ad222b28e1263f5...@pr3pr06mb6922.eurprd06.prod.outlook.com%3e
> there is some information on how the content is stored in the repository).
>
I mean the working copy.

1. sensitive files must be kept on encrypted file system, but to put the
>> entire repo is too slow;
>>
>
> Since you most probably have multiple working copies and individual
> developers can check out a new working copy wherever they want, I think it
> will be difficult to implement such a policy across your organization.
> Unless you have very specific hardware/software limitations I would suggest
> to take the performance hit and encrypt everything. (This might also apply
> to the disk on the server where the actual repository is stored).
>
It's actually quite simple to setup encrypted file system. Unfortunately
the capacity is limited and the entire repo exceeds the limit, so we must
use symlink or mount point.

2. sometimes we want to test different versions without checking out the
>> entire repo;
>>
>
> You can do this by checking out only the specific subfolder that is of
> interest at this time.
>
> For example, Subversion's source code is stored in the following
> repository: https://svn.apache.org/repos/asf/
>
> However most developers would checkout just the /subversion/trunk
> subfolder: https://svn.apache.org/repos/asf/subversion/trunk/ or maybe
> even https://svn.apache.org/repos/asf/subversion/trunk/contrib/
>
I understand, but to build and run the project we need other directories,
so the best practice is to check out src_r1, src_r2, src_r3... and then
make src a symlink to one of them while keeping other directories plain.
We had been doing this for quite a few years, until svn1.7.x complains
about cross-device link.

>
>
3. we want to keep large data files in the repo on SSD instead of HDD
>>
>> I know one solution is to use external link, but that requires multiple
>> repo and extra work for svnadmin.  When I searched I found
>> https://stackoverflow.com/questions/24850844/follow-symlinks-in-svn, but
>> when I tried I got:
>> svn: E18: Can't move '...' to '...': Invalid cross-device link
>>
>> It seems that since 1.7.0 svn has stopped following mount or link. Is
>> there a solution for this?
>>
>
> Sorry, no answer on this.
>
I see many users had complained about this, e.g.
http://mail-archives.apache.org/mod_mbox/subversion-users/201402.mbox/%3c52f020b8.4020...@reser.org%3E
https://svn.haxx.se/dev/archive-2011-11/0137.shtml
and some discussions on how to fix it:
https://dev.subversion.apache.narkive.com/0XJkLdwo/all-breakage-tests-failing-in-svn-io-file-rename
This is a really useful feature for us (as well as many other developers).
So can you please fix it?

>
> Kind regards,
> Daniel Sahlberg
>