Windows+Linux Dual Boot

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.3
  • Operating system and version (e.g., Ubuntu 24.04):
    • Windows 11 + Mint 22.3
  • Web server and version (e.g, Apache 2.4.25):
    • 2.. something
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx v2.13.5
  • PHP version (e.g, 8.3):
    • 8.3.28
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • trying to setup dual boot sync
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Server: TrueNAS Docker via github.com/nextcloud/docker built in container
    • Mint is using newest app image
    • Windows is also up to date
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

I have an extra 8TB NVME formatted as NTFS that my nextcloud is configured to sync to.

I want to be able to keep it synced if I am in Windows or Mint

Steps to replicate it (hint: details matter!):

  1. Setup in windows, fully sync entire folder to F:/Nextcloud
  2. Reboot into mint
  3. Setup Nextcloud for the same folder on auto-mounted NTFS partition
  4. Error: The folder ... is already linked to multiple accounts.....

I have tried deleting these DB files a few times, rebooting and letting each rebuilt their DBs, it always ends in 1 of the two giving this error and large re-sync of data(sometimes the entire thing) that is already up to date.

Both windows and Mint are setup to use RTC time as UTC but have the same timezone configured.

There’s gotta be a way this can be done, I am debating just having a tiny vmware VM that is shared between each system that starts on boot to just run nextcloud but that feels like a super ridiculous solution. similar to the final here: Dual boot sync not allowed for the same folder?

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "upgrade.disable-web": true,
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/localhost",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "32.0.3.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "logtimezone": "America\/Vancouver",
        "default_phone_region": "CA",
        "loglevel": 1,
        "logfile_audit": "\/var\/www\/html\/data\/nextcloud.log",
        "maintenance": false,
        "maintenance_window_start": 1,
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "bulkupload.enabled": true,
        "chunkSize": "5120MB",
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "app_install_overwrite": [],
        "defaultapp": "files",
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "127.0.0.1",
            "192.168.0.51",
            "localhost",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***\/",
            "nextcloud",
            "nextcloud-init-sync.lock",
            "***REMOVED SENSITIVE VALUE***"
        ]
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 5.0.0-dev.0
  - admin_audit: 1.22.0
  - bruteforcesettings: 5.0.0-dev.0
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.1
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0-dev.0
  - forms: 5.2.3
  - impersonate: 3.0.0
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notifications: 5.0.0-dev.0
  - notify_push: 1.3.0
  - oauth2: 1.20.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - richdocuments: 9.0.2
  - richdocumentscode: 25.4.702
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - spreed: 22.0.7
  - support: 4.0.0-dev.0
  - survey_client: 4.0.0-dev.0
  - systemtags: 1.22.0
  - text: 6.0.1
  - theming: 2.7.0
  - twofactor_backupcodes: 1.21.0
  - twofactor_totp: 14.0.0
  - updatenotification: 1.22.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - workflowengine: 2.14.0
Disabled:
  - app_api: 32.0.0 (installed 32.0.0)
  - encryption: 2.20.0
  - files_external: 1.24.0
  - suspicious_login: 10.0.0-dev.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - user_ldap: 1.23.0

In my opinion, what you want to do is unwise for several reasons.

The error message in your smartphone photo already mentions one of them.

Furthermore, it is unwise to allow a Linux operating system to access NTFS partitions in write mode. The source code for NTFS has never been published by M$. Especially in combination with the new NTFS3 driver integrated into the Linux kernel, error messages occur repeatedly and the NTFS file system has to be repaired by M$. So if you really want to share a partition with M$, you should choose exFAT as file system.

However, this does not change the Nextcloud error message.

Addendum: and why are you taking these pensioner-style photos with your smartphone instead of simply using the Print-Screen or Alt-Print-Screen keys (on Mint) to take a screenshot?

I had not heard of any issues with the new NTFS drivers for quite some time, but maybe I have just been lucky. That being said that does make me wonder if that is why nextcloud is currently doing large re-syncs due to slightly different timestamps/metadata/journaling. Something I will need to test

In response to your addendum, yea I should have used the screenshot tool. I have disconnected windows from that folder for now to prevent that error and that was just a photo I sent to a friend before I had anything else setup on this machine.

Another interesting thing I have noticed, is secondary folder syncs do not get this error, as you can see the extra Archive folder does not have that error. The sync works mostly fine, BUT still ends up doing large re-sync operations making the client on both windows and mint re-download a lot of files.

Edit: I am going to setup a 1GB folder with random pictures on both a NTFS and exFAT partition and see if the behaviour changes.

NTFS comes with 8 time-stamp values 4 of which resides in $Standard_Information attribute (SI) and the other 4 in $FILE_NAME (FN) attribute of MFT entry.

Linux has less

  • Access timestamp (atime)
  • Modified timestamp (mtime)
  • Change timestamp (ctime)

On NTFS-Mounts on Linux OS some needs to be emulated or kept untouched. I suspect that this alone will cause some problems. Beside others.

From the test it worked on both exFAT and NTFS

But I set it up slightly different:

  1. Setup folder on Mint
  2. Wait for full sync
  3. Switch to windows and start adding the folder until the wizard gets error about folder in use
  4. moved .log and db files out of the folder, clicked next once
  5. moved files back
  6. finished the wizard(selective sync)
  7. Windows did a quick sync

Rebooting back into mint and it did not have to re-sync the files.

I am going to do more testing, maybe the above steps allow both installs to use the same db files and it might actually work?

Once I finish the full transition back to mint form windows 11 here I will move the nextcloud to a ext4 partition.

Another thought is to use the WSL to mount the ext4 partition and give windows access that way… But I am not even sure if that is a good idea either.

Either way moving the main folder at this point will take forever to re-sync the ~3TB, so hopefully the above steps work out.

Edit My above steps do not seem to consistently work, I tried it with a folder closer to 100GB and it still triggered a full resync

When it comes down to it, I just need a way for Windows and Mint to be able to sync the same extra storage drive. I understand not wanting 2 Nextcloud instances running at the same time, but since only 1 OS will be running at the same time and it doesn’t seem like a huge ask for this to be a thing?

Should this be something I move/documented on github instead?