syncloud / platform

Run popular services on your device with one click
https://syncloud.org
GNU General Public License v3.0
400 stars 40 forks source link

Can't use encrypted SATA driver as external storage #368

Closed elsalanzo closed 5 years ago

elsalanzo commented 5 years ago

I'd like to use my encrypted and mounted SATA disk but I get this error.

error message confirmation storage list
cyberb commented 5 years ago

Do you need encryption on that disk?

Just curious why do you need it? Is it not safe where device is located?

elsalanzo commented 5 years ago

The disk is already encrypted and yes it's not safe since it's located in a share house. I just don't want someone unplug the driver and access my datas.

cyberb commented 5 years ago

I see. At the moment we do not support activating anything other than ext* filesystems as we depend on linux filesystem features like permissions. Probably we can add disk encryption at some point as Syncloud feature.

Workaround (hacky):

  1. Move contents of /opt/disk/internal to /opt/disk/internal_backup

    mv /opt/disk/internal /opt/disk/internal_backup
  2. Mount you disk under /opt/disk/internal

  3. Copy contents /opt/disk/internal_backup to /opt/disk/internal

    cp -R /opt/disk/internal_backup/.  /opt/disk/internal

    It should look like this in the end:

    root@helios4:~# ls -la /opt/disk/internal/
    total 16
    drwxr-xr-x 4 root      root      4096 Jan 14 19:11 .
    drwxr-xr-x 3 root      root      4096 Nov 14 22:12 ..
    drwxrwx--- 6 nextcloud nextcloud 4096 Jan  9 16:05 nextcloud
    drwxr-xr-x 3 root      root      4096 Jan 14 19:11 platform
elsalanzo commented 5 years ago

That's cool! I did it. It seems okay no problem. Thanks for the workaround!

I'm looking forward to see the support for encrypted disk feature.

Happy coding!