Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. FBWF to protect files against a sudden power outage

FBWF to protect files against a sudden power outage

Scheduled Pinned Locked Moved System Admin
helpquestioncom
9 Posts 3 Posters 38 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joan M
    wrote on last edited by
    #1

    Hi all, INTRODUCTION I'm thinking about a portable solution with a single board PC (lattepanda[^] or similar). The device can't include batteries and must be connected to all the peripherals and power using a special cable. The problem is that the user will unplug it without shutting the Operating System down properly. Given this will happen often (twice per day probably) I need to solve it and I was thinking on using FBWF[^]... QUESTION If I activate the FBWF and protect all the folders of the hard disk could I be sure that the computer would start always without problems and without damaging any file? Any experience using this on windows 10? The help file says it will be OK, and I used it with WES7 and it worked but it was an industrial computer and I wanted to double check it before proceeding with the project. Thank you all! :thumbsup:

    www.robotecnik.com[^] - robots, CNC and PLC programming

    https://www.robotecnik.com freelance robots, PLC and CNC programmer.

    L J 2 Replies Last reply
    0
    • J Joan M

      Hi all, INTRODUCTION I'm thinking about a portable solution with a single board PC (lattepanda[^] or similar). The device can't include batteries and must be connected to all the peripherals and power using a special cable. The problem is that the user will unplug it without shutting the Operating System down properly. Given this will happen often (twice per day probably) I need to solve it and I was thinking on using FBWF[^]... QUESTION If I activate the FBWF and protect all the folders of the hard disk could I be sure that the computer would start always without problems and without damaging any file? Any experience using this on windows 10? The help file says it will be OK, and I used it with WES7 and it worked but it was an industrial computer and I wanted to double check it before proceeding with the project. Thank you all! :thumbsup:

      www.robotecnik.com[^] - robots, CNC and PLC programming

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      If you yank the drive out before the write is complete, safe or not, you'll be missing data. If the device is "ejectable" in any form, you could try that. If it supports unmounting, that would work too. Any way - even if it is a SSD-drive in RAID - if you yank it out before the led stops flickering, you're in trouble.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

      J 1 Reply Last reply
      0
      • L Lost User

        If you yank the drive out before the write is complete, safe or not, you'll be missing data. If the device is "ejectable" in any form, you could try that. If it supports unmounting, that would work too. Any way - even if it is a SSD-drive in RAID - if you yank it out before the led stops flickering, you're in trouble.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

        J Offline
        J Offline
        Joan M
        wrote on last edited by
        #3

        So... what is FBWF useful for? I was thinking on using it precisely to avoid that... Thank you!

        www.robotecnik.com[^] - robots, CNC and PLC programming

        https://www.robotecnik.com freelance robots, PLC and CNC programmer.

        L 1 Reply Last reply
        0
        • J Joan M

          So... what is FBWF useful for? I was thinking on using it precisely to avoid that... Thank you!

          www.robotecnik.com[^] - robots, CNC and PLC programming

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Joan M wrote:

          So... what is FBWF useful for?

          See MSDN[^].

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          J 1 Reply Last reply
          0
          • L Lost User

            Joan M wrote:

            So... what is FBWF useful for?

            See MSDN[^].

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

            J Offline
            J Offline
            Joan M
            wrote on last edited by
            #5

            Yes, I can see it, but then I don't understand it:

            File-Based Write Filter (FBWF) enables redirection of all changes made to a protected volume to an in-memory overlay. This provides system designers with the option of discarding all changes made to a system in a manner that is transparent to user applications.

            As far as I understand it I could set all the windows files to be protected and then no problem would happen... I understand it to be like a steadystate but for newer Oses... Am I understanding it wrong? Thank you very much Eddy! :thumbsup:

            www.robotecnik.com[^] - robots, CNC and PLC programming

            https://www.robotecnik.com freelance robots, PLC and CNC programmer.

            L 1 Reply Last reply
            0
            • J Joan M

              Yes, I can see it, but then I don't understand it:

              File-Based Write Filter (FBWF) enables redirection of all changes made to a protected volume to an in-memory overlay. This provides system designers with the option of discarding all changes made to a system in a manner that is transparent to user applications.

              As far as I understand it I could set all the windows files to be protected and then no problem would happen... I understand it to be like a steadystate but for newer Oses... Am I understanding it wrong? Thank you very much Eddy! :thumbsup:

              www.robotecnik.com[^] - robots, CNC and PLC programming

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Joan M wrote:

              As far as I understand it I could set all the windows files to be protected and then no problem would happen...

              How about Windows-updates?

              Joan M wrote:

              Am I understanding it wrong?

              Dunno; sounds to me like some sort of buffer. If the disc is not yanked out, and people simply forget to shut down, then it may result in a file being corrupted if the write doesn't complete. If the system has nothing to "write" and is merely shutting down, nothing gets corrupted - you simply loose what is in memory. I don't know how this specific class could help.

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

              J 1 Reply Last reply
              0
              • L Lost User

                Joan M wrote:

                As far as I understand it I could set all the windows files to be protected and then no problem would happen...

                How about Windows-updates?

                Joan M wrote:

                Am I understanding it wrong?

                Dunno; sounds to me like some sort of buffer. If the disc is not yanked out, and people simply forget to shut down, then it may result in a file being corrupted if the write doesn't complete. If the system has nothing to "write" and is merely shutting down, nothing gets corrupted - you simply loose what is in memory. I don't know how this specific class could help.

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                J Offline
                J Offline
                Joan M
                wrote on last edited by
                #7

                Eddy Vluggen wrote:

                How about Windows-updates?

                A lot of industrial systems around are even not connected to the Internet or network and used to control machines... so no need to use updates... In most cases, though, computers are placed inside the electrical cabinets then I used some kind of UPS systems to keep them running while shutting them down. In this case weight is a very important factor and a UPS is completely impossible. and the portable computer will never connect to anywhere except from machine computers that will also never be connected to anywhere... I understand FBWF as it getting a copy of the files the OS uses, never touching the original files, therefore the original files can't be corrupted... :~ Let's see if someone here has used it extensively and knows exactly how it works... thank you very much for your help Eddy! :thumbsup:

                www.robotecnik.com[^] - robots, CNC and PLC programming

                https://www.robotecnik.com freelance robots, PLC and CNC programmer.

                L 1 Reply Last reply
                0
                • J Joan M

                  Eddy Vluggen wrote:

                  How about Windows-updates?

                  A lot of industrial systems around are even not connected to the Internet or network and used to control machines... so no need to use updates... In most cases, though, computers are placed inside the electrical cabinets then I used some kind of UPS systems to keep them running while shutting them down. In this case weight is a very important factor and a UPS is completely impossible. and the portable computer will never connect to anywhere except from machine computers that will also never be connected to anywhere... I understand FBWF as it getting a copy of the files the OS uses, never touching the original files, therefore the original files can't be corrupted... :~ Let's see if someone here has used it extensively and knows exactly how it works... thank you very much for your help Eddy! :thumbsup:

                  www.robotecnik.com[^] - robots, CNC and PLC programming

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Joan M wrote:

                  I understand FBWF as it getting a copy of the files the OS uses, never touching the original files, therefore the original files can't be corrupted... :~

                  The OS is mostly "reading"; there are Linux-versions that can be run from USB and mount completely in memory - turn the PC of and it is gone. If you only have the OS on the key, and all other important info somewhere else, then a non-working machine (in case of corruption) could be "fixed" by plugging in a new bootable usb-key. Also, you won't corrupt files by reading them; it is interrupting a write-operation that is dangerous and can cause corruption.

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                  1 Reply Last reply
                  0
                  • J Joan M

                    Hi all, INTRODUCTION I'm thinking about a portable solution with a single board PC (lattepanda[^] or similar). The device can't include batteries and must be connected to all the peripherals and power using a special cable. The problem is that the user will unplug it without shutting the Operating System down properly. Given this will happen often (twice per day probably) I need to solve it and I was thinking on using FBWF[^]... QUESTION If I activate the FBWF and protect all the folders of the hard disk could I be sure that the computer would start always without problems and without damaging any file? Any experience using this on windows 10? The help file says it will be OK, and I used it with WES7 and it worked but it was an industrial computer and I wanted to double check it before proceeding with the project. Thank you all! :thumbsup:

                    www.robotecnik.com[^] - robots, CNC and PLC programming

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #9

                    Joan M wrote:

                    The problem is that the user will unplug it without shutting the Operating System down properly.

                    Reading the thread below I want to repeat what was already said...there is NO way to protect it as described. Best you could do would be to re-engineer/re-spec the device so it has a onboard battery that has sufficient juice to allow an automatic shutdown once the real power is interrupted. The alternative to that is that users that do not do it property are disciplined up to including being fired. After a while you will only have users that always do it "properly". If it was me I would propose both solutions to management and let them decide. Option one is of course more expensive and requires quite a bit more code. And code that is quite complicated also.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups