agagega
2022-02-22 11:34:33 +08:00
Can OneDrive be stored on an external drive? How does pinning a file work when I use an external drive? Are there multiple copies of my data?
> I've seen several threads on this topic but let me clarify with an emphatic yes: external drives are fully supported without any difference in the end-user experience.
>
> That said, external drive support as it exists today is implemented differently than it was in the past because of how File Provider works. Very few users are running this configuration, but for them, it's an important scenario because often their content won't fit on the home drive. File Provider doesn't support creating the sync root on any drive except for the home drive. So, we had to find a way to support external drives within these constraints.
>
> When you choose a path to sync your OneDrive, we use that path to derive where we put your OneDrive cache path. If that path is on an external drive, we'll put the cache path there. We wanted to honor this preference because the cache path is where your pinned content is stored, as I'll explain below.
>
> When your cache path is placed on an external drive, OneDrive tries to minimize the number of copies of your data it makes, and in most cases, only one copy will exist, usually in the sync root. If your home drive runs into disk pressure, the operating system will evict (dataless) files from the sync root, but they can always be obtained again from the cloud if needed. In some cases a file might exist in both places for a short time, but over time we will ship fixes that will optimize this further.
>
> Pinned files on an external drive have behavior quirks that are worth understanding. If you pin a file, it will download to the cache path only, and will show both the checkbox and "not downloaded" state icons. This is because the file is dataless in the sync root but exists as a full file in the cache path. However, if you pin a file and also double-click it to open it, we will bring it into your sync root, so there are two copies, one in each location. Note that files brought into your sync root in this manner can still be evicted by macOS when it encounters disk pressure, but when this happens, only the file in the sync root is evicted. We still keep the data in your cache path, so you can always get to the file's content, even if you are offline.
看起来是可以的,不过我还没试。