Configuration of LFS Storage (OD-2390)
Tobias opened 8 months ago

Hi,

We have a problem with the Git LFS. We are running OneDev on an Ubuntu via Docker and have mapped a directory for storing LFS files in the container. The mapped path in the container also works and we have ensured this with a manual file transfer. The specified Git LFS path is also accepted in OneDev.

We then created a new repository and activated lfs. The files are displayed in OneDev and can be downloaded successfully.

However, the mounted GitLFS directory is empty. The LFS folder in the project folder on the container does not contain any files.

How can we find out where the original files are located and how we can determine if the lfs activation was successful

  • Robin Shen commented 8 months ago

    Please run below command inside the container:

    ls -l /opt/onedev/site/projects/<project id>/git
    

    The lfs sub directory should be a symbol link pointing to the actual lfs storage

  • Robin Shen changed state to 'Closed' 8 months ago
    Previous Value Current Value
    Open
    Closed
  • Tobias commented 8 months ago

    Sorry for the late reply. The OneDev shows us that the file was saved with Git LFS.

    Unfortunately, the lfs folder only contains an objects folder with several subfolders and no symbolic link. In the subfolder of the lfs folder we have a file that contains unreadable text.

    2025-05-06_16h51_21_2.png

  • Tobias changed state to 'Open' 8 months ago
    Previous Value Current Value
    Closed
    Open
  • Robin Shen commented 8 months ago

    Seems that this lfs folder is created before you set up lfs storage in system setting. In this case, OneDev will leave the lfs folder as is. You may move it manually to your lfs storage however. To do it, please exec into the container and run below command:

    mv /opt/onedev/site/projects/613/git/lfs /path/to/lfs/storage/613
    ln -s /path/to/lfs/storage/613 /opt/onedev/site/projects/613/git/lfs
    
  • Tobias commented 8 months ago

    It worked after I executed the commands. It also worked with a completely new project and the sym link was created. Many thanks for the help.

  • Tobias changed state to 'Closed' 8 months ago
    Previous Value Current Value
    Open
    Closed
issue 1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2390
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover