Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

SVN repository on a NAS

  • 23-12-2010 4:48pm
    #1
    Registered Users, Registered Users 2 Posts: 18,982 ✭✭✭✭


    Hi all,
    Not especially a nix issue but perhaps some of you can help me out. I have 2 laptops in active use. One Windows 7 and one Ubuntu 10.04. I want to develop on both of them and keep my code stored in a subversion repository, checking in and out, committing and updating as I go, so everything is synced.

    I will also be using it for storing pictures etc. so dropbox would not suffice (without paying for it).

    I have the NAS (an iomega Home Media Hard Drive it's called, 1TB) for a while now and really don't get the most out of it.

    Is it possible to set up a repository on a NAS at all? I use Tortoise on Windows at work and will continue to use that on the Windows laptop as I'm used to it. I found RabbitVCS as a very similar alternative to it for Nautilus and it looks the part, so now I just need the repository setting up!

    The iomega NAS is currently accessible as a windows share (part of "workgroup", as is my Windows 7 machine and the Ubuntu one). If anyone has any tips or links, I'd appreciate it!


Comments

  • Registered Users, Registered Users 2 Posts: 18,982 ✭✭✭✭murphaph


    Ok, so I found this tutorial and it works fine on my NAS with windows, repository exists on NAS and I can update and commit to my hearts content from the W7 box.

    Unfortunately Ubuntu is not as easy to get going.

    I have tried every conceivable combination of file://smb:/path/to/repo, file://path/to /repo etc. that I can think of. Nothing works and I always get a similar error:
    svn: Unable to open an ra_local session to URL
    svn: Local URL 'file://iomega-090a25/philip/Programming/SVN_repository' contains unsupported hostname
    

    The NAS is called iomega-090a25 and I have tried using it's IP address as well, no joy. On Windows I simply had to do the initial checkout from file://iomega-090a25/philip/Programming/SVN_repository and it worked first time. I'm guessing this is because on Linux I am viewing these files on the NAS as a samba share.

    Anyone got any ideas how to proceed?


  • Registered Users, Registered Users 2 Posts: 13,115 ✭✭✭✭bnt


    I have a very old NAS that gave me serious trouble before I could get it to work at all under Linux. Maybe some of this will help:

    If you want this NAS to be available at all times, then you're going to want to create a permanent mount point and an entry in /etc/fstab. Something like the instructions here. Once you've done that, you can immediately test it using sudo mount -a, which tries to mount everything in fstab that's not already mounted.

    The options are the comma-separated entries immediately after "cifs" in the example given, and you may have to add some more to the ones in the article. With the old NAS I had they were insufficient, and I had to try some more (from here) for backwards compatibility

    noserverino (client always generates inodes - cifs is supposed to detect that the SMB share can't do this, but it was a bug)
    mapchars (remap characters SMB doesn't support)
    file_mode=0777,dir_mode=0777 (fix permissions on mounted files)

    You are the type of what the age is searching for, and what it is afraid it has found. I am so glad that you have never done anything, never carved a statue, or painted a picture, or produced anything outside of yourself! Life has been your art. You have set yourself to music. Your days are your sonnets.

    ―Oscar Wilde predicting Social Media, in The Picture of Dorian Gray



  • Registered Users, Registered Users 2 Posts: 18,982 ✭✭✭✭murphaph


    Hi bnt,
    I had already worked out that the main issue was my failure to properly mount the NAS folder locally on my LINUX machine as the svn operator "file:///" expects to find the files locally. I managed to edit fstab as you suggested (had to play with it a bit as there was some confusion as to whether or not one should use cifs or smbfs, but it looks like smbfs is deprecated now, I used cifs anyway. Here's the line I added to /etc/fstab (in case it heps anyone else who stumbles across it here):
    //192.168.2.110/philip/Programming/SVN_repository /mnt/SVN_repository cifs user,uid=1000,rw,suid,credentials=/etc/credentials 0 0
    
    ...where the IP address is the one of my NAS box.

    I don't have a password on my NAS but it was ok to leave the credentials option in there, creating a dummy login/password file. It mounted right away on entering:
    sudo mount -a
    

    ...and I was immediately able to checkout from the SVN repository, made a test edit on a random file and committed. Did an update on the W7 machine and it updated with the change, just as it should!

    Fantastic, thanks for taking the time to reply, you set me on the right track ;)


  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,287 Mod ✭✭✭✭Jonathan


    What does SVN do with old file versions if just using the filesystem?


  • Registered Users, Registered Users 2 Posts: 18,982 ✭✭✭✭murphaph


    Jonathan wrote: »
    What does SVN do with old file versions if just using the filesystem?
    Probably just overwrites them but I haven't actually trie3d to find out. I wasn't looking for a fully blown SVN server tbh, just a familiar way to keep 2 sets of files synced. I don't think it's possible to do a roll back or anything like that but I didn't want to jailbreak my NAS (it runs a Linux kernel with patches that allows it to be broken open for root access etc.) as it may void the warranty. This solution works well for me but I understand it's not ideal for everyone.


  • Advertisement
  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,287 Mod ✭✭✭✭Jonathan


    Would rsync be a better option then if you aren't looking for version control?


  • Registered Users, Registered Users 2 Posts: 18,982 ✭✭✭✭murphaph


    I dunno anything at all about rsync. I wanted to use an SVN type environment simply because that's what we use in work and it feels familiar. I use a W7 machine in work with Tortoise SVN as the client (Linux server) but have Linux stuff at home and basically I like Tortoise and how it seamlessly integrates with Windows Explorer and I wanted something like that for Nautilus, which is how I found Rabbit CVS, which is a dead ringer for Tortoise, but it requires an SVN type environment AFAIK. Does rsync allow Tortoise for example to work?


Advertisement