Girish Ramakrishnan
c03da3be54
volumes: check provider instead of hostPath
2024-08-08 14:41:43 +02:00
Girish Ramakrishnan
36a768eb60
backups: document structure of backupConfig
...
I keep forgetting this, let's write this up once and for all
2024-06-25 13:06:40 +02:00
Girish Ramakrishnan
d87460a3cd
encoding removed by mistake
2024-02-29 11:51:57 +01:00
Girish Ramakrishnan
f076711ad3
add missing await
2024-02-29 10:41:07 +01:00
Girish Ramakrishnan
6149a5ac12
typo
2024-02-29 09:00:22 +01:00
Girish Ramakrishnan
4ea47da269
use execFile
2024-02-28 20:37:11 +01:00
Girish Ramakrishnan
a6f078330f
shell: no need to promise scoping
2024-02-21 19:40:27 +01:00
Girish Ramakrishnan
14c9260ab0
shell: exec encoding is utf8 by default and no shell
...
explicitly mark calls that require the shell
2024-02-21 17:47:25 +01:00
Girish Ramakrishnan
9b94cf18d0
convert more execSync to async
2024-02-21 11:00:12 +01:00
Girish Ramakrishnan
54c7757e38
Fix crash
2024-02-20 21:53:52 +01:00
Girish Ramakrishnan
3da3ccedcb
volumes: only wait for 5 seconds for mount status
...
mountpoint -q can never exit if the nfs mount disappears, for example
2024-02-20 21:38:57 +01:00
Girish Ramakrishnan
64381e2a04
backups: remove validation mount point after testing it
...
this also moves out the attempt validation logic from mounts code
into volumes. mounts.tryAddMount is also used in backup code
2023-09-29 08:01:58 +05:30
Johannes Zellner
8d0abf214c
First attempt a temporary mountpoint
2023-09-28 10:56:46 +02:00
Girish Ramakrishnan
630853abb5
move mountObjectFromBackupConfig into backups
2023-08-15 08:55:38 +05:30
Johannes Zellner
10646e9e04
Add generic disk (partition) backup provider to replace ext4 and xfs
2023-08-08 15:11:22 +02:00
Girish Ramakrishnan
03a77ddf01
Fix validation of hostPath
...
When adding a volume, this comes in mountOptions. The hostPath in the
database is the computed host path.
2023-02-25 23:41:11 +01:00
Girish Ramakrishnan
1c4205b714
mount: ignore filesystem type
2022-11-03 23:28:02 +01:00
Girish Ramakrishnan
a4a9b52966
Clarify error message
2022-10-02 16:38:12 +02:00
Girish Ramakrishnan
544ca6e1f4
initial xfs support
2022-06-08 10:58:00 -07:00
Girish Ramakrishnan
dbb803ff5e
cifs: use credentials file
...
this supports special characters in passwords better
https://forum.cloudron.io/topic/6577/failed-to-mount-inactive-mount-error-13-when-mounting-cifs-from-synology
2022-03-29 21:26:58 -07:00
Girish Ramakrishnan
0dea2d283b
move sshfs key write logic to renderMountFile
2022-03-29 20:15:55 -07:00
Girish Ramakrishnan
cbc44da102
create sshfs dir in start.sh
2022-03-29 20:13:41 -07:00
Girish Ramakrishnan
a786fad3ee
mountPoint is only set for 'mountpoint' (unmanaged)
...
When restoring, mountPoint field is expected for managed mount points
2022-01-26 13:37:16 -08:00
Girish Ramakrishnan
8b9d821905
isMountProvider -> isManagedProvider
2022-01-26 12:40:28 -08:00
Johannes Zellner
0508a04bab
Support cifs seal option
...
https://manpages.debian.org/testing/cifs-utils/mount.cifs.8.en.html#seal
2022-01-10 14:28:09 +01:00
Johannes Zellner
26dbd50cf2
Ensure we don't crash if mount status does not include some strings
2021-10-26 14:54:56 +02:00
Johannes Zellner
d1a7172895
Add remount route for mountlike backup storages
2021-10-11 18:12:11 +02:00
Johannes Zellner
9eed3af8b6
add volume remount
2021-10-11 16:22:56 +02:00
Girish Ramakrishnan
ae4a091261
pass debug for safe call
2021-09-29 20:15:54 -07:00
Girish Ramakrishnan
3bcd32c56d
restore: mount all volumes before restoring apps
...
fixes #786
2021-09-28 11:51:01 -07:00
Girish Ramakrishnan
d79206f978
mounts: volume -> mounts
...
this code is shared by volume code and backup code
2021-09-28 11:44:09 -07:00
Girish Ramakrishnan
004e812d60
merge backupdb into backups.js
2021-07-14 15:10:45 -07:00
Girish Ramakrishnan
fd9964c2cb
mount: always use mountpoint for getting mount state
...
for ssfs.fuse, we get this on ubuntu 18:
root@my:/etc/systemd/system# systemctl status mnt-cloudronbackup.mount
● mnt-cloudronbackup.mount - backup
Loaded: loaded (/etc/systemd/system/mnt-cloudronbackup.mount; enabled; vendor preset: enabled)
Active: active (mounted) (Result: exit-code) since Sat 2021-07-10 00:16:53 UTC; 40s ago
Where: /mnt/cloudronbackup
What: root@149.28.218.27:/mnt/backups
Process: 8273 ExecUnmount=/bin/umount /mnt/cloudronbackup -c (code=exited, status=32)
Process: 8288 ExecMount=/bin/mount root@149.28.218.27:/mnt/backups /mnt/cloudronbackup -t fuse.sshfs -o allow_other,port=22,IdentityFile=/home/yellowtent/platformdata/sshfs/id_rsa_149.28.2
Tasks: 0 (limit: 2314)
CGroup: /system.slice/mnt-cloudronbackup.mount
Jul 10 00:16:53 my.cloudron.space systemd[1]: Mounting backup...
Jul 10 00:16:53 my.cloudron.space mount[8288]: read: Connection reset by peer
Jul 10 00:16:53 my.cloudron.space systemd[1]: mnt-cloudronbackup.mount: Mount process exited, code=exited status=1
Jul 10 00:16:53 my.cloudron.space systemd[1]: Mounted backup.
so even though the mount failed, it says active/mounted. sad.
2021-07-09 17:50:29 -07:00
Girish Ramakrishnan
c93284e6fb
mount: json parsing of error message
2021-07-09 16:59:57 -07:00
Girish Ramakrishnan
bad6e39d59
volume: add filesystem type for shared folders
...
rename noop to mountpoint
2021-06-25 10:12:28 -07:00
Girish Ramakrishnan
1ce4875db1
volumes: set hostPath based on volume id
...
this is required for the file browser to work which does operations
based on the id
fixes #789
2021-06-24 17:32:41 -07:00
Girish Ramakrishnan
87b2b63043
sshfs: add StrictHostKeyChecking=no so that it can connect the first time
2021-06-24 15:10:00 -07:00
Girish Ramakrishnan
02263e8921
add back mountpoint check
2021-06-22 15:52:50 -07:00
Girish Ramakrishnan
15ff43369f
mount: if unmount failed, do not proceed
2021-06-22 13:03:44 -07:00
Girish Ramakrishnan
ceddabd691
Fix tryAddMount usage
2021-06-21 23:13:37 -07:00
Girish Ramakrishnan
3ba2f96d51
volume: remove private fields
2021-06-21 16:35:08 -07:00
Girish Ramakrishnan
6ace8d1ac5
volumes: fix various mount related issues
...
Various notes on mounting:
* The permissions come from the mounted file system and not the mount point.
This means that if we change the perms before mounting, it is overridden by
whatever is in the actual file system.
* uid/gid only works for permission-less file systems
SFTP container notes:
* Assumes that nothing changed if the host path hasn't changed. This means that
if a user changes the disk uuid, reload doesn't work.
* Not sure how/why, but even after unmounting the container can still access the old
mount files (!). With ext4 on disk change or nfs after root path change, the file manager
continues to be able to access the old mounts (despite umount succeeding).
All this led to following changes:
* Remove editing of volumes. Just allow editing username/password.
* edit UI then just also provides a way to re-mount.
* Change mode of mountpoint to be 777 post mounting for ease of use. Otherwise, we have to
make the user do this by ssh. this can always become options later.
2021-06-21 16:11:48 -07:00
Girish Ramakrishnan
79ec7fb245
volumes: make sshfs work
2021-06-20 23:39:35 -07:00
Girish Ramakrishnan
87c22a4670
mount: mount as 777 for max compat
...
for cifs, file_mode can be 666
2021-06-20 22:48:37 -07:00
Girish Ramakrishnan
90657af7f2
mount: fix nfs re-mounting
2021-06-18 23:48:39 -07:00
Girish Ramakrishnan
ecf2ff9e15
mount: better error message detection
2021-06-18 23:02:53 -07:00
Girish Ramakrishnan
5f509f802f
install sshfs
2021-06-18 14:46:54 -07:00
Girish Ramakrishnan
e6e875814e
systemctl show --value does not work on ubuntu 16
2021-06-18 14:29:03 -07:00
Girish Ramakrishnan
0a5a24ba2e
add tryAddMount
...
we try to add a mount. if it fails, it will revert to the previous mount config.
there was a plan to make this work based on systemd-mount but we hit this bug - https://bugzilla.redhat.com/show_bug.cgi?id=1708996
2021-05-21 22:32:51 -07:00
Girish Ramakrishnan
59db625ad9
volumes: wait for mount during add/update
...
this is a better feedback mechanism for the user
2021-05-19 11:08:33 -07:00