Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZFS doesn't mount the second drive /mnt/ncdata (.ocdata missing due to that) #1204

Closed
jwallmon opened this issue Apr 28, 2020 · 11 comments
Closed

Comments

@jwallmon
Copy link

Steps to reproduce

  1. setup new hyper-v vm per nextcloud instructions
  2. went through setup & answered questions
  3. setup static ip

Expected behaviour

i should see the nextcloud logon page

Actual behaviour

no blue logon page. white background. black text...
Your data directory is invalid Ensure there is a file called ".ocdata" in the root of the data directory. Your data directory is not writable Permissions can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/18/go.php?to=admin-dir_permissions.

Server configuration

  • default hyper-v settings per nextcloud setup steps

Nextcloud server version: (see your admin page)

  • new hyper-v downloaded yesterday (Apr 27, 2020)

Server OS (Ubuntu server is default)
ubuntu

How did you install the VM? (Scripted install from master OR Released version)

  • i just followed the script prompts per the vm

Network

Do you use DHCP?
no. static ip.

Is port 80 and/or 443 open?
yes

Logs / Screenshots

1 - nextcloud - web page

Log file (/var/log/nextcloud/nextcloud.log)

Insert your nextcloud.log file here

2 - nextcloud-log file

Installation log (command output)

Insert the CLI output here

Screenshoots

@enoch85
Copy link
Member

enoch85 commented Apr 28, 2020

Send me an email and refer to this issue and we can book a session and have a look.

https://www.hanssonit.se/#contact

@jwallmon
Copy link
Author

jwallmon commented Apr 28, 2020 via email

@enoch85
Copy link
Member

enoch85 commented Apr 29, 2020

Let's keep the everything in one issue.

This is also related: #1203

I'll have a look at Hyper-V deployment tomorrow, it's bed time here.

@enoch85
Copy link
Member

enoch85 commented May 1, 2020

So I think I may have a solution.

Please try this script: https://github.com/nextcloud/vm/blob/master/static/change-to-zfs-mount-generator.sh

Before you run it, make a snapshot of your VM and:

  1. Download the RAW file via CLI (wget file.sh)
  2. Run it with sudo bash file.sh
  3. Reboot
  4. Post the outcome here.

Thanks!

@enoch85 enoch85 mentioned this issue May 1, 2020
@enoch85 enoch85 changed the title new nextcloud hyper-v vm - Your data directory is invalid Ensure there is a file called ".ocdata" in the root of the data directory ZFS doesn't mount the second drive all the times [POSSIBLE SOLUTION AVAILABLE] May 1, 2020
@jwallmon
Copy link
Author

jwallmon commented May 1, 2020 via email

@enoch85
Copy link
Member

enoch85 commented May 1, 2020

Important before you run the script: remove any changes you did to /mnt/ncdata

So in your specific case, I would:

  1. sudo -i
  2. rm -rf /mnt/ncdata (zpool list is empty)
  3. Follow the steps above

@enoch85 enoch85 changed the title ZFS doesn't mount the second drive all the times [POSSIBLE SOLUTION AVAILABLE] ZFS doesn't mount the second drive /mnt/ncdata (.ocdata missing due to that) May 1, 2020
@enoch85 enoch85 pinned this issue May 1, 2020
@enoch85
Copy link
Member

enoch85 commented May 1, 2020

OK, I just got it confirmed, the fix works on a broken system.

@jwallmon Could you please also confirm?

I will push this to master now

@jwallmon
Copy link
Author

jwallmon commented May 1, 2020 via email

@enoch85
Copy link
Member

enoch85 commented May 1, 2020

Thank you very much for confirming! Now I feel confident this is the fix.

Have a nice weekend!

@enoch85 enoch85 closed this as completed May 1, 2020
@enoch85
Copy link
Member

enoch85 commented May 3, 2020

FYI: This is now completely fixed. Just uploaded all new versions of VMs with the latest patch.

@enoch85 enoch85 unpinned this issue May 31, 2020
@Railsimulatornet
Copy link

Unfortunately I have to run the ./change-to-mount-generator.sh file after every restart.

Is there a permanent solution here? Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants