Closed Disorganise closed 4 years ago
Hi,
Thanks for posting!
Yeah, there were some issues with the early 20.04 VMs, I don't know if you are one of those affected? To find out, please post the output of zpool status
.
Anyway, there's a script that: https://github.com/nextcloud/vm/blob/master/static/change-to-zfs-mount-generator.sh So after posting the output of the above command, please run the script as root.
I had Virtual box convert the disks to VHD and later used Hyper-V to convert to VHDX - although I couldn't get gen 2 VM working, so reverted to gen 1 and could've left the disks as VHD [I previously bought a Hyper-V version but it was accidentally deleted so had to start over] I added a 2nd 60GB vhdx to the config Then added 'sdc' to the ncdata pool
This may also be the cause.
The later VMs are fixed, and Gen 2 is working. So if you want Gen 2 and a working ZFS mount, please download the latest VM and don't touch anything with ncdata
.
output of zpool status
root@nextcloud:/var/log/nextcloud# zpool status
pool: ncdata
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
ncdata ONLINE 0 0 0
sda ONLINE 0 0 0
scsi-14d534654202020202853723d14a3a244a59fb11353423cda ONLINE 0 0 0
errors: No known data errors
output of script
ncadmin@nextcloud:~$ sudo bash ./change-to-zfs-mount-generator.sh
Adding required repo (multiverse).
'multiverse' distribution component is already enabled for all sources.
Synchronizing state of zfs-mount.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable zfs-mount
Synchronizing state of zfs-zed.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable zfs-zed
/etc/zfs/zfs-list.cache/ncdata is emtpy, setting values manually instead.
Rebooted....and lost the mount again :(
ncadmin@nextcloud:~$ zpool list
no pools available
ncadmin@nextcloud:~$ zpool status
no pools available
ncadmin@nextcloud:~$ zpool import -a
cannot discover pools: permission denied
ncadmin@nextcloud:~$ sudo zpool import -a
[sudo] password for ncadmin:
ncadmin@nextcloud:~$ zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
ncdata 99G 58.9G 40.1G - - 5% 59% 1.00x ONLINE -
ncadmin@nextcloud:~$ zpool status
pool: ncdata
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
ncdata ONLINE 0 0 0
sdb ONLINE 0 0 0
scsi-14d534654202020202853723d14a3a244a59fb11353423cda ONLINE 0 0 0
errors: No known data errors
ncadmin@nextcloud:~$
highjacking this cause of the 40GB version is free thing. does that mean there are some kind of protections or caveats which don't let you expand the data area of the VM? if yes, is it the same with the bigger VMs? what if I want to start small and expand some day? or would i just have to expand the lun within the OS after expanding the vmdk and that's it? i get the idea, and that the appliance, scripts, etc are work and that you want to get paid for that work. tbh prices are very fair as well (although i'd have loved to have access to all the "subscriber only" documentation for a feasable price, having in mind that my installation is not commercial). still i'm wondering whether there is some weird stuff in the appliances which will not allow you to simply enlarge the VMs space.
thanks!
@Disorganise Setting the support label here as this isn't the default state.
You tried to expand the pool, now you have errors.
scsi-14d534654202020202853723d14a3a244a59fb11353423cda
This tells me that the script only set the expanded disk, and not sdb
which is default behaviour with the original VM. Everything in the VM scripts are scripted with the default settings in mind. If you change anything you're on your own, or you can buy support here.
My suggestion would be to get a larger VM and install that instead, if you are unsure on how to properly expand the disk.
@mamama1 There are no limitations in none of the VMs. So, basically you could get the free VM, expand it to whatever you want. But, you might end up here when things start to bug out due to that it wasn't done correctly.
I have resized the data disk in VMware, then I deleted sdb9 which was a reserved solaris compatibility 8MB partition and I resized sda1 to 100%. then I exported/imported the ZFS pool and now I get this, which in my opinion looks good - is this the way it is meant to be done or am I going to need your (paid) support soon? :-D
root@files:/home/ncadmin# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
ncdata 600G 41.0M 599G - - 0% 0% 1.00x ONLINE -
root@files:/home/ncadmin# zpool status
pool: ncdata
state: ONLINE
scan: scrub repaired 0B in 0 days 00:00:01 with 0 errors on Sun Aug 9 00:24:02 2020
config:
NAME STATE READ WRITE CKSUM
ncdata ONLINE 0 0 0
9595306896715766089 ONLINE 0 0 0
errors: No known data errors
That UUID gave me headaches, btw ;-)
@mamama1
is this the way it is meant to be done or am I going to need your (paid) support soon? :-D
Simple answer: no. :)
That UUID gave me headaches, btw ;-)
It's always better to use UUID than a "real" name. :)
no to needing your support soon or no to whether that's how it is meant to be done? :) if the latter, is it because I deleted the 8MB partition? I've read somewhere that I don't really have to care about that but it was too late, I already had deleted it... however i figure that I shouldn't run into issues because of that...
i really am not against buying support from you, your prices are absolutely fair. I just don't want to give up that fast and fail with such a simple task of expanding a disk. of course zfs and stuff makes it more obscure than probably needed and zfs isn't used much in the linux world yet but on the other hand i understand that it brings nice features like reliability, snapshots and deduplication. and caching!
no to needing your support soon or no to whether that's how it is meant to be done? :)
Sorry, I understand the misunderstanding.
No, that's not how it's done. Sure, if you need paid support I'm here. :)
i will contact you in case i run into problems with how i expanded the pool.
or is it that bad that you would strictly advise against using the appliance like this? like hours of work repairing issues I'll run into with this afterwards? if so, I might just go for buying the 500GB appliance which will come cheaper than 30 min of support :)
or is it that bad that you would strictly advise against using the appliance like this?
If you care about your data, it's smart not to take any chances.
buying the 500GB appliance which will come cheaper than 30 min of support :)
That's also very smart! :) Actually, that's what I would do if I were you.
I was able to fix the problem under ESXI as follows:
Shut down the VM
Edit the VM -> Edit settings -> VM Options
Under Advanced ->Configuration Parameters -> click Edit Configuration button
Add a new parameter with following properties:
Key: disk.EnableUUID
Value: TRUE
Click OK -> Save
Power on the VM and confirm the errors have stopped in /var/log/syslog
source: https://jc-lan.org/2020/06/03/ubuntu-20-04-on-esxi-generating-multipathd-errors/
Railsimulatornet commented on Sep 5 His solution fixes my issue with the zpool not being recognized after reboot.
Hi5 Rail
I have resized the data disk in VMware, then I deleted sdb9 which was a reserved solaris compatibility 8MB partition and I resized sda1 to 100%. then I exported/imported the ZFS pool and now I get this, which in my opinion looks good - is this the way it is meant to be done or am I going to need your (paid) support soon? ...
consider ZoL a WiP, there is no one exact way. so your's is one way.
sorry, to append here, but I think my issue might be related as my problem is 99.9% as the topic starter plus it appeared only after I migrated my nextcloud vm from Hyper-V to KVM/Qemu.
After a reboot and, what really nags me, from time to time, sometimes daily, sometimes after a few days or so without a reboot, the nextcloud-vm looses its ZFS pool (ncdata).
I manually issue an: zfs set mountpoint=/mnt/ncdata ncdata
and the mount is online again - until - who knows...
This has to be related to migration and the underlying change of the block device from hyper-v to qemu but I don`t understand how to make the mount persistant.
@vizion8-dan
This has to be related to migration and the underlying change of the block device from hyper-v to qemu but I don`t understand how to make the mount persistant.
If it worked before the change, then there's nothing wrong nor nothing we can do code wise. I suggest you look for support in the forum.
Steps to reproduce
Expected behaviour
Mounted drive/pool should survive reboot reliably
Actual behaviour
Sometimes the pool disappears. I noticed because I had a power outage, and my nextcloud client did not come back to green.
Going to the web page gives: Your data directory is invalid Ensure there is a file called ".ocdata" in the root of the data directory Logged into CLI and found the ncdata missing. Googled for how to get it back and and discovered the import -a did the trick (phew). Ran the update script and accidentally aborted half way through. Ran it again and let the box reboot. Logged back in and ran the update again just to be sure, and on reboot the ncdata had disappeared again
Server configuration
Nextcloud server version: (see your admin page) 19.0.1.1
Server OS (Ubuntu server is default) Ubuntu 20.04.1 LTS
How did you install the VM? (Scripted install from master OR Released version) Nextcloud_VM_www.hanssonit.se.ova
This is the free 40GB version I had Virtual box convert the disks to VHD and later used Hyper-V to convert to VHDX - although I couldn't get gen 2 VM working, so reverted to gen 1 and could've left the disks as VHD [I previously bought a Hyper-V version but it was accidentally deleted so had to start over] I added a 2nd 60GB vhdx to the config Then added 'sdc' to the ncdata pool
Network
Do you use DHCP? yes - though the address is sticky
Is port 80 and/or 443 open? yes
Logs / Screenshots
Log file (/var/log/nextcloud/nextcloud.log)
Installation log (command output)
Screenshoots