Is it safe to extract file from potentially infected disk

I have a hard drive used for years, there are windows and many personal files on it. What I called "files" are images, musics, documents (pdf or docx), but not programs. All the "files" were not initially infected. As I said in the title, the hard drive may be infected by malware (I did not safely use it).

My question is : can I extract these personal files on a safe computer without risk of contamination ? In other words, may these files be infected and spread malware ?

Maximal subsets of a point set which fit in a unit disk

Suppose that there are a set $ P$ of $ n$ points on the plane, and let $ P_1, \dots, P_k$ be not necessarily disjoint subsets of $ P$ such that every point in $ P_i|\ 1 \leq i \leq k$ fits inside a unit disk $ D_i$ .

Moreover, each $ P_i$ is maximal. This means that if the corresponding unit disk $ D_i$ moves to cover another point, then one point which was inside the disk will be uncovered.

Here is an example: enter image description here

In the above figure, there are three maximal subsets.

I don’t know whether this problem has a name or was studied before, but my question is:

  1. Can $ k$ be $ O(1)^n$ ?
  2. If not, then can we find those subsets in polynomial time w.r.t. $ n$ ?

Postgresql: Refreshing materialized view fails with “No space left on device” and a huge spike in disk usage

I have a materialized view that refreshes every five minutes. The SQL aggregates the data among many tables with over 800k rows in each.

However, the when using the "REFRESH MATERIALIZED VIEW CONCURRENTLY tableName", the query runs for about an hour and then complains: ERROR: could not write block 39760692 of temporary file: No space left on device

It should be noted that this 39760692 changes every time I execute the query.

The disk size is about 960 GB and the database size is about 30 GB. So the disk has a free space of about 930 GB.

I noticed that when running the refresh query, there is a huge spike in the disk usage of about 12GB per minute and then finally the query errors out with no space error when it hits the 960 GB mark. Immediately, the disk usage is back to 30GB from the abnormal growth.

I even tried the REFRESH MATERIALIZED VIEW tableName (without concurrently) and seeing the same behavior.

I’m not sure what can be done here to diagnose the problem.

Is realization of unit disk graphs hard?

It is known that recognizing a unit disk graph is NP-hard [1].

However, the paper does not mention how hard is the realization problem.

I have looked up several references [2][3][4]. None of the papers answer whether the following problem is NP-hard:

Given a unit disk graph $ G = (V,E)$ , find a configuration of a set $ \mathcal{D}$ of disks, such that the intersection graph $ G(\mathcal{D})$ of $ \mathcal{D}$ is isomorphic to $ G$ .

The difference between this problem and the recognition problem is that the input of this problem is guaranteed to be a unit disk.

Is there any study that shows the complexity of the above problem? I expect it to be NP-hard, but I am yet to find a full proof.

Why is disk IO higher on Debian 10 (MariaDB 10.3) with MySQL replication?

I have a MySQL/MariaDB master-master replication setup that has been working well for several years, the db and tables are not very large (under 200MB for 18 tables). These were on 2 servers running Debian 9 and MariaDB 10.1.44. Now I’ve spun up 2 new servers running Debian 10 and I’m in the process of moving things over to them, but stopped half-way because I’m seeing much higher disk IO usage on the new servers (about 6x more).

So currently, one of the Debian 9 servers and one of the Debian 10 servers are in master-master relationship, with one Debian 9 still being a slave of the master Debian 9 server, and same on the Debian 10 side of things.

I didn’t notice the increased disk IO until after all read/write operations were moved to the Debian 10 master. I was trying to browse tables and saw how slow it was outputting the query results, and it felt like I was on a dial-up connection watching the rows scroll across. It turned out there was some disk contention with the virtual host that was partly responsible, and that problem is now mostly gone.

Now, as you can imagine, none of this is crashing the server with such a "small" set of tables, but as things continue to grow, I’m concerned that there is some underlying mis-configuration which will rear its ugly head at an inopportune time. On the Debian 9 servers, iotop shows steady write IO at around 300-600Kb/s, but on Debian 10 it spikes as high as 6MB/s, and averages around 3MB/s.

Here is the standard config on all 4 servers, everything else is default Debian settings (or MariaDB, as the case may be), full config for Debian 10 at

max_connections = 1000 query_cache_limit       = 4M query_cache_size        = 0 query_cache_type        = 0 server-id               = 1 # different for each server log_bin                 = /var/log/mysql/mysql-bin.log binlog_do_db            = optimizer replicate-do-db         = optimizer report-host             = #changed obviously log-slave-updates       = true innodb_log_file_size    = 32M innodb_buffer_pool_size = 256M 

Here are some other settings I’ve tried that don’t seem to make any difference (checked each one by one):

binlog_annotate_row_events = OFF binlog_checksum = NONE binlog_format = STATEMENT innodb_flush_method = O_DIRECT_NO_FSYNC innodb_log_checksums = OFF log_slow_slave_statements = OFF replicate_annotate_row_events = OFF 

I’ve gone through all the settings here that have changed from MariaDB 10.1 to 10.3, and can’t seem to find any that make a difference:

I also did a full listing of the server variables and compared the configs on 10.1 to the 10.3 configuration and didn’t find anything obvious. But either I’m missing something, or the problem lies with Debian 10 itself.

Results of SHOW ENGINE INNODB STATUS are here:

Now, how about that disk IO, what is it actually doing? I include 3 screenshots here to show what I mean by increased disk IO: Resource graphs on the Debian 10 master

That is from the Debian 10 master, and you can see where I moved operations back to the Debian 9 server (more on that in a second). Notice the disk IO does go down slightly at that point, but not to the levels that we’ll see on the Debian 9 master. Also note that the public bandwidth chart is pretty much only replication traffic, and that the disk IO far outstrips the replication traffic. The private traffic is all the reads/writes from our application servers.

Resource graphs on Debian 9 master

This is the Debian 9 master server, and you can see where I moved all operations back to this server, the private traffic shoots up, but the write IO hovers around 500kB/s. I didn’t have resource graphs being recorded on the old servers, thus the missing bits on the left.

Debian 10 slave server resource graphs

And lastly, for reference, here is the Debian 10 slave server (that will eventually be half of the master<–>master replication). There are no direct reads/writes on this server, all disk IO is from replication.

Just to see what would happen (as I alluded to above), I reverted all direct read/write operations to the Debian 9 master server. While disk IO did fall somewhat on the Debian 10 server, it did not grow on the Debian 9 server to any noticeable extent.

Also, on the Debian 10 slave server, I did STOP SLAVE once to see what happened, and the disk IO went to almost nothing. Doing the same on the Debian 10 master server barely did not have the same drastic effect, though it’s possible there WAS some change that wasn’t obvious; the disk IO numbers on iostat fluctuate much more wildly on the Debian 10 servers than they do on the Debian 9 servers.

So, what is going on here? How can I figure out why MariaDB is writing so much data to disk apparently and/or how can I stop it?

Thanks in advance!

USB Flash Disk with block-chain

I am thinking of buying USB flash disk with Security Element(stores Private-Key/Secret-Key/X.509-Certificates) and some encrypted data(8 Megabyte). The disk has to be protected against cloning and possibly maintains logs of insert history with UNIX timestamp & USB Host ID when inserted.

I found YubiKey & NitroKey, but they does not have additional storage. Is there a USB Device like that satisfy above requirements.

(Or) Is there any cost effective SoC+Security Element Over USB with flash storage available to implement my requirement using Opensource?


Call of duty disk space [closed]

my friends and I have been wondering about the following thing: Let’s say COD:MW takes 180GB of storage space, then has a 20 GB update. Afterwards, the game takes only 190GB of storage space and not 200GB. Do you you know this happens? I thought maybe it’s because some files are replacing older ones instead of just being “added on top”. Thanks !

How fast would a Tenser’s Floating Disk descend if I pulled it over a long drop?

So I’m designing a variant human warlock with the wizard ritual caster feat and while considering which rituals to start with I read the description for Tenser’s floating disk and looking through the eldritch invocations I saw the Ascendant step invocation allows levitation on myself at will so if I was to make a floating disk, have a party member or some equipment placed on it and then go down a chasm or hole or off the side of a flying ship/island etc would the disk follow at my levitate speed (20 feet descent or ascent per turn) or my movement speed (30 feet per turn) or would it drop like a rock? I’m picturing using it like a down elevator. Additionally would I be able to hold a wooden tabletop under the disk and levitate up and have it ascend to stay 3 feet above the surface?

For ease of reference here is the description of the relevant spells (quoted from D&D Beyond).

Tenser’s floating disk:

This spell creates a circular, horizontal plane of force, 3 feet in diameter and 1 inch thick, that floats 3 feet above the ground in an unoccupied space of your choice that you can see within range. The disk remains for the duration, and can hold up to 500 pounds. If more weight is placed on it, the spell ends, and everything on the disk falls to the ground.
The disk is immobile while you are within 20 feet of it. If you move more than 20 feet away from it, the disk follows you so that it remains within 20 feet of you. It can move across uneven terrain, up or down stairs, slopes and the like, but it can’t cross an elevation change of 10 feet or more. For example, the disk can’t move across a 10-foot-deep pit, nor could it leave such a pit if it was created at the bottom.
If you move more than 100 feet from the disk (typically because it can’t move around an obstacle to follow you), the spell ends.


One creature or loose object of your choice that you can see within range rises vertically, up to 20 feet, and remains suspended there for the duration. The spell can levitate a target that weighs up to 500 pounds. An unwilling creature that succeeds on a Constitution saving throw is unaffected.
The target can move only by pushing or pulling against a fixed object or surface within reach (such as a wall or a ceiling), which allows it to move as if it were climbing. You can change the target’s altitude by up to 20 feet in either direction on your turn. If you are the target, you can move up or down as part of your move. Otherwise, you can use your action to move the target, which must remain within the spell’s range.
When the spell ends, the target floats gently to the ground if it is still aloft.

To be clear I am not asking about whether I can move the disk over a hole, I am aware of that limitation and can easily put a plank over the hole and move the disk over the void, I am only asking about the vertical movement speed of the disk.

Can second internal hard disk cause infection after reinstall?

Lets say I have two internal hard disks, one for the operating system the other for backups. If i make sure to delete the MBR and partition table with dd if=/dev/zero of=/dev/sda bs=512 count=2048 of the disk with the operating system to avoid the possibility of a boot sector virus.

If I reinstall in what ways can that second hard disk be used to cause an infection of the primary disk with the operating system?

I was reading thata boot sector viruses can even spread to other hard drives you have installed or physical media you have plugged into your system.

So what impact can a boot sector virus on a backup drive have on on the primary drive? And any other threats I may have missed? I guess it could effect USB sticks plugged in?