You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rafal Hajdacki <ha...@pf.pl> on 2004/03/11 21:31:15 UTC

Repo on FAT32 accesed from Windows and Linux

Hi,

I tried to create SVN repo on FAT32 formatted drive. I wanted to access
it locally from Windows and Linux via ra_local. But I have a problem. If
I create repo on linux I can't checkout it on Windows and vice versa. 
Here is output of svn co on Linux:

svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///mnt/common/svn/win'
svn: Berkeley DB error while opening environment for filesystem
/mnt/common/svn/win/db:
Invalid argument

Is Berkeley DB format different on Windows and Linux? Or is it something
else?
What can I do to share repo locally between Linux and Windows?

Please CC me, I'm not subscribed.
Thanks in advance,
-- 
---------------------------------------------------------------------
Rafał Hajdacki                                           Hajdi's Cave
hajdi@pf.pl                                          www.hajdi.prv.pl
---------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repo on FAT32 accesed from Windows and Linux

Posted by Max Bowsher <ma...@ukf.net>.
Rafał Hajdacki wrote:
> Max Bowsher wrote:
>
>> Rafał Hajdacki wrote:
>>
>>> So I will have to use repo dumping.
>>
>>
>> No, you won't.
>>
>> C. Michael Pilato said:
>>
>>> I'm not sure if anyone has experimented with deleting the __db.* files
>>> from /path/to/repos/db, and then running 'svnadmin recover' on the
>>> repository. I suppose this could solve the problem for you (unless
>>> the log.* files -- which you most certainly don't want to delete --
>>> also have platform-specific formats).
>>
>>
>> The log.* file format depends only on byte-order - so this won't be a
>> problem.
>>
>> All you have to do is make *absolutely sure* that no processes are
accessing
>> the repository, and delete the __db.* files from the db directory. You
don't
>> even need to run 'svnadmin recover' - the db environment will be
recreated
>> on the next access to the db.
>>
>> I haven't tried this to move a repository between different OSes, but I
have
>> done it when I was experimenting with temporarily deactivating the bdb
>> txn/log/lock subsystems to boost the speed of svnadmin load.
>>
>> Max.
>
> But how safe this is?

"It seems to work." People have been removing the regions from RPM databases
to clear stale locks for years now.

If you want a less hackish way, write a small C program that calls
DB_ENV->remove.
Or use db_recover, which leaves the environment removed after the recovery.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repo on FAT32 accesed from Windows and Linux

Posted by Rafał Hajdacki <ha...@pf.pl>.
Max Bowsher wrote:

> Rafał Hajdacki wrote:
> 
>>So I will have to use repo dumping.
> 
> 
> No, you won't.
> 
> C. Michael Pilato said:
> 
>>I'm not sure if anyone has experimented with deleting the __db.* files
>>from /path/to/repos/db, and then running 'svnadmin recover' on the
>>repository. I suppose this could solve the problem for you (unless
>>the log.* files -- which you most certainly don't want to delete -- 
>>also have platform-specific formats).
> 
> 
> The log.* file format depends only on byte-order - so this won't be a
> problem.
> 
> All you have to do is make *absolutely sure* that no processes are accessing
> the repository, and delete the __db.* files from the db directory. You don't
> even need to run 'svnadmin recover' - the db environment will be recreated
> on the next access to the db.
> 
> I haven't tried this to move a repository between different OSes, but I have
> done it when I was experimenting with temporarily deactivating the bdb
> txn/log/lock subsystems to boost the speed of svnadmin load.
> 
> Max.

But how safe this is?
Full history is stored in logs?
Is it BerkeleyDB's feature or "that happens to work"?

Rafal,
-- 
---------------------------------------------------------------------
Rafał Hajdacki                                           Hajdi's Cave
hajdi@pf.pl                                          www.hajdi.prv.pl
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repo on FAT32 accesed from Windows and Linux

Posted by Max Bowsher <ma...@ukf.net>.
Rafał Hajdacki wrote:
> So I will have to use repo dumping.

No, you won't.

C. Michael Pilato said:
> I'm not sure if anyone has experimented with deleting the __db.* files
> from /path/to/repos/db, and then running 'svnadmin recover' on the
> repository. I suppose this could solve the problem for you (unless
> the log.* files -- which you most certainly don't want to delete -- 
> also have platform-specific formats).

The log.* file format depends only on byte-order - so this won't be a
problem.

All you have to do is make *absolutely sure* that no processes are accessing
the repository, and delete the __db.* files from the db directory. You don't
even need to run 'svnadmin recover' - the db environment will be recreated
on the next access to the db.

I haven't tried this to move a repository between different OSes, but I have
done it when I was experimenting with temporarily deactivating the bdb
txn/log/lock subsystems to boost the speed of svnadmin load.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repo on FAT32 accesed from Windows and Linux

Posted by Rafał Hajdacki <ha...@pf.pl>.
So I will have to use repo dumping. It will be rather time consuming though.
Thans for all answers.

Best regards,
-- 
---------------------------------------------------------------------
Rafał Hajdacki                                           Hajdi's Cave
hajdi@pf.pl                                          www.hajdi.prv.pl
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repo on FAT32 accesed from Windows and Linux

Posted by "C.A.T.Magic" <c....@gmx.at>.
----- Original Message ----- 
From: "C. Michael Pilato" <cm...@collab.net>
To: "Rafal Hajdacki" <ha...@pf.pl>
Cc: <us...@subversion.tigris.org>
Sent: Friday, March 12, 2004 02:07
Subject: Re: Repo on FAT32 accesed from Windows and Linux

[...]

> > What can I do to share repo locally between Linux and Windows?
> 
> I'm not sure if anyone has experimented with deleting the __db.* files
> from /path/to/repos/db, and then running 'svnadmin recover' on the
> repository.  I suppose this could solve the problem for you (unless
> the log.* files -- which you most certainly don't want to delete --
> also have platform-specific formats).

I wouldn'n fiddle with the db data ;-)

If your repository is very small you could do a
svnadmin dump/svnadmin load when changing between systems.
Ofcourse, the dump must occour before changing the OS
and the load must be on the new OS.
You could also use incremental dumps for the transfers
(afaik there are some .py scripts to do repo-mirroring)
But there is always a high-risk that you mess up something and
dump/load something (incremental) twice or forget to load it and
commit something in-between...
and all of this will probably only work if you are a 'single user'.
or gather some cheap old 300Mhz PCand run it as your svn server :-)

or, a very different approach would be:
install linux on a virtual machine (VMWare, VirtualPC, maybe WINE)
and run the svn server inside the virtual machine.
you can then access it from the other OS but keep the format
(ofcourse running the VM is a lot slower than a real system)

:-)
c.a.t.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Repo on FAT32 accesed from Windows and Linux

Posted by "C. Michael Pilato" <cm...@collab.net>.
Rafal Hajdacki <ha...@pf.pl> writes:

> Hi,
> 
> I tried to create SVN repo on FAT32 formatted drive. I wanted to access
> it locally from Windows and Linux via ra_local. But I have a problem. If
> I create repo on linux I can't checkout it on Windows and vice versa. 
> Here is output of svn co on Linux:
> 
> svn: Unable to open an ra_local session to URL
> svn: Unable to open repository 'file:///mnt/common/svn/win'
> svn: Berkeley DB error while opening environment for filesystem
> /mnt/common/svn/win/db:
> Invalid argument
> 
> Is Berkeley DB format different on Windows and Linux?

The shared memory functionality is different across the two systems,
so yes, a portion of the format differs.

> What can I do to share repo locally between Linux and Windows?

I'm not sure if anyone has experimented with deleting the __db.* files
from /path/to/repos/db, and then running 'svnadmin recover' on the
repository.  I suppose this could solve the problem for you (unless
the log.* files -- which you most certainly don't want to delete --
also have platform-specific formats).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org