disk

How can I record what process or kernel activity is using the disk in GNU/Linux?

耗尽温柔 提交于 2019-12-02 20:39:38
On a particular Debian server, iostat (and similar) report an unexpectedly high volume (in bytes) of disk writes going on. I am having trouble working out which process is doing these writes. Two interesting points: Tried turning off system services one at a time to no avail. Disk activity remains fairly constant and unexpectedly high. Despite the writing, do not seem to be consuming more overall space on the disk. Both of those make me think that the writing may be something that the kernel is doing, but I'm not swapping, so it's not clear to me what Linux might try to write. Could try out

How to load LUKS passphrase from USB, falling back to keyboard?

老子叫甜甜 提交于 2019-12-02 17:42:05
I want to set up a headless Linux (Debian Wheezy) PC with whole disk encryption, with the ability to unlock the disk either with a USB drive, or by entering a passphrase by keyboard. My starting point is a fresh install using the basic whole disk encryption option in the Debian Installer, which manages everything besides /boot as a LUKS-encrypted logical volume group and gives me the keyboard option. I will describe my current solution in an answer, in hopes that it will be useful and that others can improve on it. Here are some of the issues I had: Setting up a passphrase and putting it on

Will data written via write() be flushed to disk if a process is killed?

拥有回忆 提交于 2019-12-02 14:38:16
问题 I'm working with a program that uses qdbm to maintain a key-value store (qdbm is linked into the program). In certain cases, the process puts a value in the qdbm database and then restarts itself by calling an external init script (via system()). It appears that sometimes a value written to the qdbm database doesn't actually stick, and I'm wondering if it could be due to the data not getting flushed to disk before the process is killed via SIGTERM. Since qdbm does writes using the write()

Will data written via write() be flushed to disk if a process is killed?

人盡茶涼 提交于 2019-12-02 11:28:26
I'm working with a program that uses qdbm to maintain a key-value store (qdbm is linked into the program). In certain cases, the process puts a value in the qdbm database and then restarts itself by calling an external init script (via system()). It appears that sometimes a value written to the qdbm database doesn't actually stick, and I'm wondering if it could be due to the data not getting flushed to disk before the process is killed via SIGTERM. Since qdbm does writes using the write() system call (versus say, the fwrite() library function), I would think that the Linux kernel should know

VHD Java library

眉间皱痕 提交于 2019-12-02 07:20:25
I'm looking for a Java library that can open .vhd files. I wants to create a program that can navigate inside it. I also want it to be cross-platform. I have googled for an library a while now but found nothing. I did only find an old unanswerd question here on stack overflow . Can anyone help me? Consider libguestfs . libguestfs is a C library, but it has a Java binding . It claims to be cross-platform , working on Linux and Mac OS X, and "[s]ome virt tools have been ported to Windows". Check to see whether the features you need work on Windows. libguestfs does support VHD images ( under the

Fast Poisson Disk Sampling [Robert Bridson] in Python

风流意气都作罢 提交于 2019-12-02 06:49:00
First of all, I implemented the ordinary, slow, Poisson Disk Sampling algorithm in the 2D plane and it works just fine. This slow version calculates the distances between all points and checks that the point you wish to place is at least R away from all the others. The fast version by Robert Bridson, available here: https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf , suggests discretizing your 2D plane into quadratic cells with length = R/sqrt(2) since each cell can at most contain a single valid point this way and the number of cells you need to check for distance

FileSystemWatcher Work is Done?

ε祈祈猫儿з 提交于 2019-12-02 06:14:33
问题 I setup a FsWatcher on a local filesystem directory. I only want to know when files are added to the directory so they can be moved to another filesystem. I seem to be able to detect when the first file is in, but actually I want to know when all files from a given copy operation are done. If I used Windows Explorer to copy files from one directory to another, Explorer would tell me that there are n seconds left in the transfer, so while there is some activity for the begin-transfer and end

How is data stored on disk? - EFI GUID

ε祈祈猫儿з 提交于 2019-12-02 05:04:24
问题 I posted this question earlier on SuperUser but I feel it is more suited for programmers. If I understand correctly, according to GPT, the first 16 bytes of LBA 2 is the partition type GUID for the first partition on disk. In Windows Disk Management the first partition is designated as an EFI System Partition. However upon further investigation an EFI System Partition's GUID is: C12A7328-F81F-11D2-BA4B-00A0C93EC93B And yet the first 16 bytes tell me otherwise: 28732AC1-1FF8-D211-BA4B

FileSystemWatcher Work is Done?

£可爱£侵袭症+ 提交于 2019-12-02 01:12:42
I setup a FsWatcher on a local filesystem directory. I only want to know when files are added to the directory so they can be moved to another filesystem. I seem to be able to detect when the first file is in, but actually I want to know when all files from a given copy operation are done. If I used Windows Explorer to copy files from one directory to another, Explorer would tell me that there are n seconds left in the transfer, so while there is some activity for the begin-transfer and end-transfer for each file, it appears that there is something for the begin-transfer and end-transfer for

How is data stored on disk? - EFI GUID

北城余情 提交于 2019-12-02 01:02:37
I posted this question earlier on SuperUser but I feel it is more suited for programmers. If I understand correctly, according to GPT, the first 16 bytes of LBA 2 is the partition type GUID for the first partition on disk. In Windows Disk Management the first partition is designated as an EFI System Partition. However upon further investigation an EFI System Partition's GUID is: C12A7328-F81F-11D2-BA4B-00A0C93EC93B And yet the first 16 bytes tell me otherwise: 28732AC1-1FF8-D211-BA4B-00A0C93EC93B Interestingly the first 3 sections act as little endian while the other 2 are big endian. Why is