Installed pydio cells v4.2.2 on rocky linux 9, and wanted to use a smb/cifs share as datasource.
This does not work and the datasource is shown as “Objects down”.
Folder structure: /mnt/pydio/share /mnt/pydio can be read/write from cells,
fstab mount entry is set to mount the share under the /share folder.
Workaround/tricks with symlinks do not work either.
Q: “what is mount point?”
A: The folder which is used to mount the smb share, e.g. //server/share/ → /mnt/pydio/share.
→ /mnt/pydio/ is the parent folder where cells can/should create the .minio/.pydio files/folder.
Q: “the folder path which is used for datasource in cells?”
A: /mnt/pydio/share
To get around this limitation, you need to compile Pydio Cells from source.
You must edit a file named “mountinfo_linux.go”.
mkdir -p /home/pydio
cd /home/pydio
git clone -b stable https://github.com/pydio/cells
cd cells
git clone https://github.com/pydio/minio
Edit the file /home/pydio/cells/go.mod Go to last line, locate replace github.com/minio/minio => github.com/pydio/minio v0.0.0-20230301104210-859d91c9822e Replace it with replace github.com/minio/minio => /home/pydio/cells/minio
Edit the file /home/pydio/cells/minio/pkg/mountinfo/mountinfo_linux.go Go to line ~107, locate:
msg := `Cross-device mounts detected on path (%s) at following locations %s. Export path should not have any sub-mounts, refusing to start.`
if len(crossMounts) > 0 {
// if paths didn't match then we do have cross-device mount.
return fmt.Errorf(msg, path, crossMounts)
}
Replace it with
//msg := `Cross-device mounts detected on path (%s) at following locations %s. Export path should not have any sub-mounts, refusing to start.`
if len(crossMounts) > 0 {
// if paths didn't match then we do have cross-device mount.
fmt.Printf("Cross-device mounts detected on path (%s) at following locations %s.\n", path, crossMounts)
fmt.Println("Export path should not have any sub-mounts, refusing to start.")
//return fmt.Errorf(msg, path, crossMounts)
}
Tried to build, after making the changes (and after installing go ), but it fails:
../go/pkg/mod/github.com/lucas-clemente/quic-go@v0.29.0/internal/qtls/go120.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.20 yet. For more details, please see https://github.com/lucas-clemente/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.20 yet. F...) as int value in variable declaration
make: *** [Makefile:19: main] Error 1
I installed: go version go1.20.5 linux/amd64
After downgrading to version go version go1.19.10 linux/amd64 the error message changed to:
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
make: *** [Makefile:19: main] Error 1
EDIT: Got it working after building as non root user.
After starting the new compile version, i can add the share as a datasource.
But now i cant synchronize it:
{"Id":"","Code":0,"Detail":"Cannot Stat Root: We encountered an internal error, please try again.: cause(Rename across devices not allowed, please fix your backend configuration (/mnt/pydio/.minio.sys/tmp/c4630d23-63c6-449d-9e38-528509949c82/39f2a675-13a7-4211-b32a-7f1a4ba72c7e)-\u003e(/mnt/pydio/share/.pydio))","Status":""}
Should i create/open a new topic?
(Because thats a different problem)
Can you please elaborate to me why this is a “cross device” issue?
I dont understand what that means. It makes no sense for me.
Its a normal folder/mount point, dont know why minio has issues with it.
Especially when cells is working on Linux, i expect hat it has no problem with standard things like mount a smb/cifs share. That is my eyes nothing special that requires special treatment.
But perhaps im not developer enough to understand that.
Thank you for your help again
I really appreciate it.
@c12simple@ghecquet@bsinou what do we think about that? Shall we modify our minio fork to support “cross-device” mounts ? I guess the original minio restriction is here for performance and safety…
Hi guys @jaimedelano@nodejs i just commited the suggested modification, but it must be enabled with an environment variable CELLS_MINIO_ALLOW_CROSSMOUNT=true
Feel free to test the latest dev build and check if it’s working as expected!
REMINDER: the Minio team explicitly states that using such a setup may lead to data corruption. IMHO it could be used exceptionally to import existing data but certainly not in a production environment. At your own risk!