teejee2008 / timeshift

System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. Supports scheduled snapshots, multiple backup levels, and exclude filters. Snapshots can be restored while system is running or from Live CD/USB.
GNU Lesser General Public License v3.0
4.69k stars 282 forks source link

Timeshift mounts already mounted drive #578

Open sabcatlibra opened 4 years ago

sabcatlibra commented 4 years ago

Describe the bug When plugging in my USB drive, I decrypt and mount it as my user. However when timeshift starts up, it mounts it again in a separate place. It does not seem like this would be desired behavior and creates oddities when I want to unplug the drive where I can't rely on my file manager to do the right thing, so I have to manually umount the drive as root and then cryptsetup close manually as well.

/dev/mapper/luks-dde4249e-1f1d-4d7c-b123-3a7e2e5236c6 on /run/media/sabrina/ariadne type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks2)
/dev/mapper/luks-dde4249e-1f1d-4d7c-b123-3a7e2e5236c6 on /run/timeshift/backup type ext4 (rw,relatime)

To Reproduce Steps to reproduce the behavior:

  1. Mount drive
  2. Start timeshift-gtk (with sudo because that's required)
  3. Have a look at mount output

Expected behavior I would assume that it would use the already existing mount rather than mounting it again

System:

Zwerg1296 commented 4 years ago

I have the same issue with an encrypted external USB storage. For me the umount with the file manager leads to the error: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error locking /dev/-dm-3 (/dev/sda): Failed to deactivate device: Device or resource busy When I then try to mount the device again I get the error: Error unlocking /dev/sdb: Failed to activate device: File exists

System: Pop!_OS 20.04 Application Version 20.03

Engrammae commented 4 years ago

Same Issue here. After mapping the encrypted hard drive, and mounting it, timeshift seems to mount the filesystem to a second mounting point: (in my case: /run/timeshift/backup). Even after closing timeshift the filesystem seems mounted to /run/timeshift/backup and the manually assigned mounting point. Luckily I had no crashes till now, and could umount from both mounting points one after another.

System:

Windows-Is-Cancer commented 3 years ago

Similar Problem on UBUNTU 20.04 + timeshift 20.03 and plain NON-ENCRYPTED fixed /etc/fstab mounted drives.

I have multiple internal sata drives, one is supposed to be my /backups drive (to be used by timeshift as well) and thus is already mounted by fstab on system boot.

timeshift seem not to care about already mounted backup partitions. it "double mounted" that partition somewhere under /run/timeshift/ , no matter what, risking damage to the filesystem, since most filesystems on desktop linuxes are not prepared for parallel/concurrent mounts like some cluster filesystems are.

im using ext4 and xfs here.

THIS IS REAL DANGEROUS if you share your timeshift backups partition with other apps as well. Through to filesystem corruption as a result of multiple concurrent mounts DATALOSS may occur.

This behavior is REAL BAD.

Either put better system requirements together, mentioning that timeshift requires an exclusive NON MOUNTED backup partition, OR BETTER fix timeshift so it checks for mounted drives or just support plain old PATHs so we can define where to put things.

regards Axel