Hacker News new | past | comments | ask | show | jobs | submit login
Dropbox dropping support for anything other than unencrypted ext4 on Linux (dropboxforum.com)
3 points by zeveb on Aug 29, 2018 | hide | past | favorite | 1 comment



Create a sparse file on your unencrypted ext4 volume. Mount it as a loopback. Encrypt it. Write data to it. Sync the disks and dismount it.

To find the next available loop device:

    LOOP=$(losetup -f)
Make a sparse file, size being how big you want it.

    truncate -s"${SIZE}" /path/to/dropbox_disk/file
Add your new file to the loopback device.

    losetup "${LOOP}" /path/to/dropbox_disk/file
Optional: See what ciphers give you what speed on your hardware. AES (rijndael) may be fastest due to hardware offloading. Serpent may be strongest.

    cryptsetup benchmark
Set up encryption for the loop device, CIPHER being what cipher you want. Avoid defaults unless you only care about speed.

    cryptsetup -c "${CIPHER}" create MyCrap "${LOOP}"
Then format your encrypted loopback with whatever filesystem suites your fancy.

    mkfs -t xfs -f -d su=64k,sw=3 -l version=2 /dev/mapper/MyCrap
Mount your shiny new filesystem

    mount -t xfs -o defaults,noatime,allocsize=64k,inode64 /dev/mapper/MyCrap /home/username/MyCrap
Write data to your new filesystem, then sync and dismount.

    echo "I know you dont need sync, this is not why you think."
    sync && umount /home/username/MyCrap
    cryptsetup remove /dev/mapper/MyCrap
    losetup -d "${LOOP}" # maybe save this in a lockfile / pidfile.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: