Dual Boot Disaster

FAQ, getting help, user experience about PrimoCache
B00ze64
Level 2
Level 2
Posts: 8
Joined: Mon Dec 21, 2020 6:26 am

Dual Boot Disaster

Post by B00ze64 »

Good day.

EDIT: PrimoCache was installed in Win7 my primary OS for now...

So I've been trying out PrimoCache, with write caching. I knew about the Flush-L2-On-Shutdown (volatile L2 I think you call it) option but I figured I'd deal with that once I'd installed the cache in BOTH of my OS'es (Win7/Win10). Then one day I rebooted from Win7 into Win10, not intending to modify any disks, only backup'ing the disks with robocopy out to a USB drive. I had not figured NTFS would update its structures even though all I was doing was reading the drives, but it did update its internal tables, because when I rebooted into Win7 disaster! Had to shutdown immediately and reboot back into Win10 and run CheckDisk. Copied over (from my USB backup) every corrupted file that CheckDisk detected (plenty!). Then I needed to disable PrimoCache before rebooting into Win7, but saw no way of doing that - I rebooted into Win7 SafeMode, but the PrimoCache UI refused to show me the caches so I could disable them. I ended-up disabling the PrinoCache Non-Plug-And-Play driver, thinking that ought to do it, but this resulted in a bluescreen on boot in both regular and safeMode. I had to restore from an image with no PrimoCache.

Questions:

1- How do we disable PrimoCache from SafeMode?

2- Is there a way to share L2 between OS'es? I know I can install PrimoCache on both Win7/Win10, configure the same cache in both OS'es, but enabling the cache "at the same time" in both OS'es is impossible, PLUS I do not know if PrimoCache can share L2 between the two, it would need to keep all state information in the L2, and not use something else, like a file in AppData (which I can work around with reparse points, I haven't looked.) So is there a way to share the L2 on dual boots? Mind you, all it'd take to screw things-up would be to boot into some CD/DVD tool and mount the disk; up to me to remember to disable L2 I guess. It's too bad PrimoCache does not check some disk-date and invalidate it's cache when the disk has been externally modified. The way it is now, the safest solution is to invalidate L2 on every shutdown, which will tank the hit rate...

Thank you.
Best Regards,
Last edited by B00ze64 on Tue Dec 22, 2020 4:51 am, edited 1 time in total.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Dual Boot Disaster

Post by Jaga »

B00ze64 wrote: Mon Dec 21, 2020 7:23 am2- Is there a way to share L2 between OS'es?
2) Nope. In fact, best practice is to remove drive letters from the L2 volumes (they need separate and distinct L2 caches). That way Windows won't update a drive it shouldn't be touching. It sounds like in your case drive letters were assigned to the unused (or both) L2 volumes, and Windows made alterations that messed with them.

When you go to set it up again, first create both L2 partitions separately using Disk Management. Then remove drive letters from both L2 partitions in both OSs. Then you can setup each cache task and give it the volume that you want it to use.
janusz521
Level 5
Level 5
Posts: 51
Joined: Wed Aug 26, 2020 6:11 pm

Re: Dual Boot Disaster

Post by janusz521 »

Your problem description is rather complex but I guess you want two cached partitions Win7 and Win10 being able to access each other along with their associated caches. Most likely this functionality is not implemented and may be subject to various conflicts. I guess the driver of PrimoCache has full access only to the OS on the partition it was booted from. The other partition may have a different version of OS or even PrimoCache itself. The caching strategy may vary and it would be hard to preserve a consistent state of the cache considering so many factors. So as a rule of thumb, if you are caching a partition from one OS, do not make it visible to other OSes. And if you really need some sharing, create an extra uncached partition working as a buffer.

Of course, there is no problem with having a separate L2 cache for every cached partition. From my experience, they can exist without any conflicts on a single disk partition dedicated to L2 caches.
User avatar
Support
Support Team
Support Team
Posts: 3628
Joined: Sun Dec 21, 2008 2:42 am

Re: Dual Boot Disaster

Post by Support »

B00ze64 wrote: Mon Dec 21, 2020 7:23 am 1- How do we disable PrimoCache from SafeMode?
PrimoCache's caching function is automatically disabled in the Safe Mode.
B00ze64 wrote: Mon Dec 21, 2020 7:23 am 2- Is there a way to share L2 between OS'es?
Sorry, but so far no. We are working to support dual-boot with one cache.
B00ze64
Level 2
Level 2
Posts: 8
Joined: Mon Dec 21, 2020 6:26 am

Re: Dual Boot Disaster

Post by B00ze64 »

Good day.

So I added in my post above that PrimoCache was installed in Win7 and when I booted Win10, it modified the partitions that had a L2 cache in Win7, even though I did not write to those partitions - the files did not move, but the NTFS structures did, which caused mayhem when I rebooted into Win7.

Jaga/janusz521 ->

It's not that simple, the partitions that I cache are intentionally shared between the OS'es. One in fact is a DrivePool of several disks, which I share between the two OS'es with some reparse point magic. And I do not think Win10, my secondary OS, was seeing the L2 cache partition; it's not NTFS so it does not mount - the problem appears to have been Win10 updating the FAT/etc of the partitions that were cached in Win7 even though I did not create or modify any files...

Support ->

1- Yes obviously PrimoCache is disabled in SafeMode, but what I needed was to invalidate the cache; what happens when you reboot in regular mode afterwards? The UI does not allow changing/disabling the cache when running in SafeMode, but that's what we need, we need to be able to invalidate the cache so that when we next reboot in regular mode it does not corrupt the disk again...

2- Yeah I discovered that lol. I'm not sure it's possible - Even if there was a counter/hash/date value in NTFS of when last the disk/partition was modified, it's likely it would be written to disk on shutdown AFTER PrimoCache had ended; you wouldn't be able to catch it in time and save it, you would likely need to access the disk/partition AFTER it gets dismounted by Windows...

It's too bad, I was getting something crazy like 92% cache hit rate,
but this will disappear once I reinstall and tell PrimoCache that the L2 is volatile...

Thank you.
Best Regards,
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Dual Boot Disaster

Post by Jaga »

B00ze64 wrote: Tue Dec 22, 2020 5:17 am...the partitions that I cache are intentionally shared between the OS'es. One in fact is a DrivePool of several disks, which I share between the two OS'es with some reparse point magic.
Yeah, that's not going to play well with Primocache. Any time you make even the smallest change to the drives in the pool in W10, the next time W7 boots up Primocache will notice the changes and mark the cache "dirty", then dump the contents since it assumes there were "offline changes" (which there were). It does this as a safety measure so the cache and drive(s) match.

A volatile cache (dumped at shutdown) is what you were thinking, which is probably the only way this would work for you. Hit rates will suffer tremendously, but there's no way around it unless/until Romex makes L2 volumes sharable between multi-boot OSs.
B00ze64
Level 2
Level 2
Posts: 8
Joined: Mon Dec 21, 2020 6:26 am

Re: Dual Boot Disaster

Post by B00ze64 »

Jaga -> I wish it did what you say, but it does not detect that the cache is dirty, it just keeps on using it, with disastrous consequences obviously, since the disk and the cache no longer match. It wouldn't be too bad if all it cached were regular files, but it's a sector cache and it caches NTFS private files too (the FAT and other special files) and it seems impossible to prevent Windows from playing with those even when all you do is read files. And Yup, I will have to use Volatile L2 Cache and hit rates will drop drastically...
User avatar
Support
Support Team
Support Team
Posts: 3628
Joined: Sun Dec 21, 2008 2:42 am

Re: Dual Boot Disaster

Post by Support »

If in another OS you change the data on the target partition, this is called "offline modification". So far PrimoCache cannot detect if a partition was offline modified. You have to keep the target partition which is cached in one OS will not be modified in another OS.
B00ze64
Level 2
Level 2
Posts: 8
Joined: Mon Dec 21, 2020 6:26 am

Re: Dual Boot Disaster

Post by B00ze64 »

I re-installed PrimoCache in EVAL on Win7. It found it's L2 partition that I had used previously, but it refused to re-use the previously allocated sub-partitions, meaning that even if I were to install PrimoCache in both Win7 and Win10, it would not allow re-using the same L2; it really isn't built with multiboot in mind. My cache hit rate of course sits around 10% lol, since I'd need to re-open/execute the same files over and over in the same Windows session for the cache to really help. Oh well, let's see what improvement a WRITE cache brings, I might decide to buy it just for that, but really, it should detect when disks have been modified offline, without that it's not that useful :-( You don't need to multiboot either, it suffices that you have some tools you run offline (AntiVirus Rescue Disk, Tails, I also defrag offline) for L2 to become dirty...
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Dual Boot Disaster

Post by Jaga »

The best solution for you actually, is to setup a gigabit networked file server hosting the drive pool, and install Primocache over there. I have mine on W7 just like that, and it works quite well.

The consistency check at boot time before a L2 cache went live would probably be a decent delay, and you'd lose cached blocks every time the drive pool changed contents that were previously cached. For that reason, I don't dual-boot and hope to use Primocache on other OSs on the same hardware. It wouldn't be a bad feature to have consistency checking, but it seems like quite a bit of work for Romex to pull off.
Post Reply