Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blocks:server:mirror [2020-05-20 06:20] mattias [Cloning the Blocks Server] |
blocks:server:mirror [2025-02-13 20:01] (current) admin Added Sync Errors note |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Blocks Mirroring Service ====== | ====== Blocks Mirroring Service ====== | ||
- | Our Linux-based | + | Our Linux-based server supports a hardware |
===== Introduction ===== | ===== Introduction ===== | ||
Line 133: | Line 133: | ||
This setting disables the ability to access the computer over the network using SSH with a password. The mirroring service can still function, since it uses SSH in another way that's not depending on a password. Should you ever change your mind and want to use SSH with password to access the server remotely, just remove that last line you added to sshd_config above and restart. Remember to make sure you're using a [[blocks: | This setting disables the ability to access the computer over the network using SSH with a password. The mirroring service can still function, since it uses SSH in another way that's not depending on a password. Should you ever change your mind and want to use SSH with password to access the server remotely, just remove that last line you added to sshd_config above and restart. Remember to make sure you're using a [[blocks: | ||
- | ++++++++++++++<< | + | ===== Cloning the Blocks Server ===== |
- | It' | + | Once you have configured your main Blocks Server as described above and have it all working as desired, it's time to make the Mirror Server by cloning |
- | The tool used is Clonezilla, | + | You'll also need a second USB storage device. This may be a USB stick with enough room to store the actively |
- | Boot the device | + | Shut down and re-boot your now fully configured Blocks server |
- | + | Once Clonezilla has started, | |
- | Select English | + | |
{{: | {{: | ||
- | Select your keyboard | + | Select your keyboard |
{{: | {{: | ||
- | Select | + | Select |
{{: | {{: | ||
- | Select the device-image option. | + | Select the " |
{{: | {{: | ||
- | Select | + | Select |
{{: | {{: | ||
- | Confirm that a usb drive has been attached with enter. | + | Connect the //second// USB stick or external |
{{: | {{: | ||
- | Exit this window with Ctrl-C | + | Once your newly connccted drive appears, press Ctrl-C |
{{: | {{: | ||
- | Select the device to mount as your destination | + | Select the newly connected drive as your destination. |
{{: | {{: | ||
- | Select | + | Click Done and press Enter to create the image at the root level of the drive. |
{{: | {{: | ||
- | Confirm with enter to continue. | + | Press Enter to continue. |
{{: | {{: | ||
- | Select | + | Select |
{{: | {{: | ||
- | Select the savedisk option to save the local disk as an image. | + | Select the "savedisk" |
{{: | {{: | ||
- | Give the image a describing | + | Give the image a descriptive |
{{: | {{: | ||
- | Select your source disk. | + | Select your source disk (the internal disk of your Blocks server). |
{{: | {{: | ||
- | Skip check and repair the source filesystem. | + | Skip "check and repair the source filesystem". |
{{: | {{: | ||
- | Skip checking if the saved image is restorable. | + | Skip "checking if the saved image is restorable". |
{{: | {{: | ||
- | Select the option | + | Choose |
{{: | {{: | ||
- | Choose | + | Choose |
{{: | {{: | ||
- | Press enter to continue. | + | Press Enter to continue. |
{{: | {{: | ||
- | :!: Check the details | + | Verify |
{{: | {{: | ||
- | :!: Doublecheck and reconfirm that you are not about to overwrite youre source disk. Confirm with y or cancel with n. | + | Double-check the details, then confirm by pressing |
{{: | {{: | ||
- | Follow | + | Wait for the cloning to conclude. This may take several minutes, depending on the amount of data on your source disk. Make sure the operation completes successfully. |
{{: | {{: | ||
- | The computer will shut down when done. | + | The computer will shut down automatically once a clone has been made. Remove the USB sticks/ |
+ | |||
+ | [[blocks: | ||
- | Remove the Clonzilla drive and the destination drive. | ||
- | Boot the computer. | ||
===== Connecting the Mirror Server ===== | ===== Connecting the Mirror Server ===== | ||
Line 269: | Line 268: | ||
* Server Disk Space. Indicates the amount of free space on the Blocks Server itself. This also makes sens to keep an eye on – especially before adding a significant amount of new content. | * Server Disk Space. Indicates the amount of free space on the Blocks Server itself. This also makes sens to keep an eye on – especially before adding a significant amount of new content. | ||
* Server Time. Shows the current time of the clock in the Blocks Server. If your server has Internet access, this is generally adjusted automatically. If not, you may want to check this every few monts to make sure that it is reasonably accurate. | * Server Time. Shows the current time of the clock in the Blocks Server. If your server has Internet access, this is generally adjusted automatically. If not, you may want to check this every few monts to make sure that it is reasonably accurate. | ||
+ | * Sync Errors. Cumulative count of data sync errors that have occurred, if any. Check the Mirror log file for details. | ||
- | The SYNCHRONIZE NOW button can be used to force a full synchronization. Use this after making manual changes to the files in the / | + | The " |
===== Testing the Mirror Server ===== | ===== Testing the Mirror Server ===== | ||
Line 312: | Line 312: | ||
===== Mirror Server Configuration ===== | ===== Mirror Server Configuration ===== | ||
- | The mirroring service can be configured in the PIXILAB-Blocks-config-yml file also used by Blocks. Add a top-level entry in this file with the following settings (where all settings are optional, with reasonable defaults): | + | The mirroring service can be configured in the PIXILAB-Blocks-config.yml file also used by Blocks. Add a top-level entry in this file with the following settings (where all settings are optional, with reasonable defaults): |
< | < | ||
Line 328: | Line 328: | ||
* Set fullSyncOnStartup to //true// to run a full synchronization once when mirroring service is started. | * Set fullSyncOnStartup to //true// to run a full synchronization once when mirroring service is started. | ||
* Set java.util.logging.FileHandler.level to //ERROR// for less verbose logging, or //INFO// for more details (sometimes useful when troubleshooting). | * Set java.util.logging.FileHandler.level to //ERROR// for less verbose logging, or //INFO// for more details (sometimes useful when troubleshooting). | ||
+ | |||
+ | The following additional, advanced settings are available in version 7.1 and later, then specified under the " | ||
+ | |||
+ | < | ||
+ | interface: enp2s0 | ||
+ | subnet: 192.168.0.0/ | ||
+ | </ | ||
+ | |||
+ | :!: **NOTE**: There are two spaces at the beginning of each line, as required when used under the " | ||
+ | |||
+ | * The // | ||
+ | * The //subnet// setting lets you specify a non link local subnet (in CIDR notation) for use as the data synchronization backdoor. This is useful in cases where you may want to use this interface for other purposes, such as remote management of the servers. You would then either set fixed addresses (within the specified subnet) or use dynamically assigned addresses (DHCP). | ||
+ | |||
The settings under //logging// follow the java.util.logging standard, sometimes referred to as JUL, allowing you to use any settings available there, for example to log to an external log handler. | The settings under //logging// follow the java.util.logging standard, sometimes referred to as JUL, allowing you to use any settings available there, for example to log to an external log handler. | ||
+ | =====Troubleshooting===== | ||
+ | Unless the advanced //subnet// setting is used (see above), the server-to-server backdoor connection assumes the use of self-assigned ("link local" | ||
+ | * Disable any such interface(s). in some cases this may need to be done in the computer' | ||
+ | * Change their addresses to keep them out of this address range. | ||
+ | * Use the advanced //nic// setting to specify which interface to use. | ||
+ | |||
+ | === Verifying over SSH === | ||
+ | The mirroring service shows its status window while running, as described above. If you're accessing your server using a terminal session over SSH, you can instead use this command to ascertain whether the mirroring service is running, while being logged in as the pixi-server user: | ||
+ | |||
+ | < | ||
+ | systemctl --user status blocks.mirror | ||
+ | </ | ||
+ | |||
+ | |||
+ | =====Implementation Notes===== | ||
+ | |||
+ | These notes provide additional understanding of how the mirroring service works. While not generally something you need to know, these details may be of assistans in some installations or when troubleshooting a system. | ||
+ | |||
+ | ===Synchronized files=== | ||
+ | The following directories and files are synchronized: | ||
+ | |||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | * / | ||
+ | |||
+ | :!: **NOTE:** Any additional files you want to synchronize, | ||
+ | |||
+ | ===Starting/ | ||
+ | The Linux [[https:// | ||
+ | |||
+ | However, when using the mirroring service, //systemd// starts the mirroring service (referred to by the name // | ||
+ | The mirroring service also generates its own log, found in the logs directory inside your Blocks root directory. Check these log files if you encounter any problems related to the mirroring service. |