I might need some help to get me out of this situation. At the moment I don't even know good search terms to google.
But from the start:
I recently set up a OMV-based NAS which worked for a few months now in a kind of extended beta phase quite flawlessly.
But (apt) updates kept on coming and I for some reason never bothered to actually reboot the machine.
Now I did and what I feared has happened: after rebooting nothing works anymore. (Of course I did several reboots during installations with no problems.)
I'm using 2 4TB HDDs in an RAID10 configuration and a SSD as system drive + an USB stick as installation media.
The HDD-Raid is encrypted with LUKS and then made available via LVM. (Both RAID configuration and LVM setup are overkill atm and were made in case I need to add more storage later.)
Up until now there were 4 shared folders defined on that drive.
The nginx of this NAS additionally serves a GitLab and a NextCloud installation. NextCloud adds one of the shared folders as 'external storage' to access media files.
Now after reboot (and input of the LUKS password in the OMV webgui to unlock the encryption), Nextcloud reports the external storage as empty and with no access rights.
The OMV webgui shows
- disks: HDDs as /dev/sda & /dev/sdb, SSD as /dev/sdc
- raid: /dev/md0 out of /dev/sda and /dev/sdb
- encryption: /dev/mapper/md0-crypt made from /dev/md0 (unlocked: yes, referenced: no)
- lvm:
- physical /dev/dm-0 with Volume Group 'Data'
- volume group 'Data' with physical volume /dev/wrapper/md0-crypt
- logical volume 'data' from volume group 'Data'
- file systems:
- ext4 on /dev/dm-1 (mounted: yes, referenced: yes)
- vfat on /dev/sdc1 (mounted: yes, referenced: no)
- ext4 on /dev/sdc2 (mounted: yes, referenced: yes)
- shared folders: 4 folders (e.g. 'Multimedia') on device 'data' (all referenced: yes)
on the terminal, 'mount' says
[...]
/dev/sdc2 on / type ext4 (rw,noatime,nodiratime,errors=remount-ro)
/dev/sdc1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/mapper/Data-data on /srv/dev-disk-by-label-data type ext4 (rw,noexec,relatime,stripe=128,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group)
/etc/fstab reads:
[...]
UUID=533dfffd-ebd1-4be6-8e7b-55489f1ffece / ext4 noatime,nodiratime,errors=remount-ro 0 1
UUID=EAFD-673A /boot/efi vfat umask=0077 0 1
/dev/disk/by-label/data /srv/dev-disk-by-label-data ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
in /etc/systemd/system/ I can find a .mount file for each shared folder with contents like
# This configuration file is auto-generated.
[Unit]
Description=Mount shared folder Multimedia to /sharedfolders/Multimedia
DefaultDependencies=no
After=zfs-mount.service
Conflicts=umount.target
RequiresMountsFor=/srv/dev-disk-by-label-data/Multimedia /sharedfolders
[Mount]
What=/srv/dev-disk-by-label-data/Multimedia
Where=/sharedfolders/Multimedia
Type=none
Options=bind,nofail
[Install]
WantedBy=local-fs.target
Alles anzeigen
systemctl status sharedfolders-Multimedia.mount gives
sharedfolders-Multimedia.mount - Mount shared folder Multimedia to /sharedfolders/Multimedia
Loaded: loaded (/etc/systemd/system/sharedfolders-Multimedia.mount; enabled; vendor preset: enabled)
Active: inactive (dead)
Where: /sharedfolders/Multimedia
What: /srv/dev-disk-by-label-data/Multimedia
Nov 01 18:51:03 Datenschleuder2 systemd[1]: Dependency failed for Mount shared folder Multimedia to /sharedfolders/Multimedia.
Nov 01 18:51:03 Datenschleuder2 systemd[1]: sharedfolders-Multimedia.mount: Job sharedfolders-Multimedia.mount/start failed with result 'dependency'.
Alles anzeigen
/sharedfolders/ contains only empty folder names.
/srv/dev-disk-by-label-data/ contains the full data partition and is writable by root, but only readable by normal users.
NextClouds external drive points to /sharedfolders/Multimedia, but has no data. Changing that to /srv/dev-disk-by-label-data/Multimedia makes the data re-appear, but no even the admin account has write permissions.
I see a lot of inconsistencies in the naming in the omv config. The chain disk->raid->encryption->lvm physical->lvm volume group->lvm volume->shared folders does not have consistent input/output device names. Is the setup still ok? Is something wrong or unused?
Why don't the shared folders mount? What is the 'dependency' that systemctl complains about? Is it run only at startup, when the RAID is not yet decrypted? How can it be re-tried once LUKS unlocks the drive?
Where are access rights defined for those mounts?
How much can I dismantle the whole configuration to re-build it without actually using data?
Any help welcome!