hard-drive

Non-file FileSystems?

ぐ巨炮叔叔 提交于 2019-12-03 09:14:37
I've been thinking on this for a while now (you know, that dangerous thing programmers tend to do) and I've been wondering, is the method of storing data that we're so accustomed to really all that efficient? The trouble with answering this question is that I really don't have anything to compare it to, since it's the only thing I've ever used. I don't mean FAT or NTFS or a particular type of file system, I mean the filesystem structure as a whole. We are simply used to thinking of "files" inside "folders" like our hard drive was one giant filing cabinet. This is a great analogy and indeed, it

Finding what hard drive sectors occupy a file

随声附和 提交于 2019-12-03 08:08:40
I'm looking for a nice easy way to find what sectors occupy a given file. My language preference is C#. From my A-Level Computing class I was taught that a hard drive has a lookup table on the first few KB of the disk. In this table there is a linked list for each file detailing what sectors that file occupies. So I'm hoping there's a convinient way to look in this table for a certain file and see what sectors it occupies. I have tried Google'ing but I am finding nothing useful. Maybe I'm not searching for the right thing but I can't find anything at all. Any help is appreciated, thanks.

Spin Down Hard Disk Programmatically on Windows?

主宰稳场 提交于 2019-12-03 05:46:55
问题 How do you request Windows to spin down a hard disk programmatically? Is there any user-mode function I can call (or kernel-mode function to call or IRP to send) in order to make this happen? I've tried making a program to send an ATA STANDBY command directly to the hard disk, but the problem is that this method doesn't inform the system, and hence whenever the system needs to flush the cache, it'll wake up the hard disk again. How do I tell the system to do this for me? (If the system does

Process permanently stuck on D state [closed]

末鹿安然 提交于 2019-12-03 04:12:04
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have an issue with some processes stuck in a D state on Ubuntu 10.04.3 LTS. They have been in this state since Nov the 5th (today being December 6th). I understand these are uninterruptible sleep states often related to waiting for data from hardware such as a hard disk. This is a production server so

Delphi - How to get list of USB removable hard drives and memory sticks?

笑着哭i 提交于 2019-12-03 03:21:20
问题 In my application (Delphi), I need to list all the USB storage devices. These can be either flash memory sticks or external storage drives. There is a Jvcl component JvDriveCombo , and it has the DriveType property - the problem is if I select DriveType := Fixed then in addition to the external drive, it also lists the internal drives ( C:\ , D:\ etc). However, I only want to list the external drives. I believe there is DeviceIoControl function (I saw it on MSDN) but I have no idea of how to

How can i determine the sector size in windows

被刻印的时光 ゝ 提交于 2019-12-03 00:53:30
问题 How can I determine the Physical Sector Size (e.g. if i have an Advanced Format drive with 4,096 byte sectors rather than the legacy 512 byte sectors) in Windows 7? I know that by clicking on a file and get properties we can find out the NTFS Cluster Size , but that's not the same as the hard-drive's sector size. Note : We ask about Windows 7 because it (and Windows Vista SP1) understand the existence of 4096 Advanced Format hard drives. 回答1: You want fsutil. Make sure you run Command Prompt

How to programatically prevent Windows from hard disk drive spin down?

半腔热情 提交于 2019-12-03 00:11:00
My program performs a task on the hard disk free space. The task is quite long, it takes 1-2 hours . The problem is that on laptop the hard disk may be turned off after few minutes when the user is inactive. How do I programmatically prevent Windows from hard disk spin down (power off) ? TLama To prevent the system from entering idle mode you may try to use the SetThreadExecutionState function. This function informs the system that the application is in use and allows you to specify the thread's execution requirements. The usage can be like this, but I'm not sure if this affects also the disk

Spin Down Hard Disk Programmatically on Windows?

℡╲_俬逩灬. 提交于 2019-12-02 19:08:17
How do you request Windows to spin down a hard disk programmatically? Is there any user-mode function I can call (or kernel-mode function to call or IRP to send) in order to make this happen? I've tried making a program to send an ATA STANDBY command directly to the hard disk, but the problem is that this method doesn't inform the system, and hence whenever the system needs to flush the cache, it'll wake up the hard disk again. How do I tell the system to do this for me? (If the system does it, it'll save up the cache and "burst" the data when it gets too large, instead of writing in small

Process permanently stuck on D state [closed]

限于喜欢 提交于 2019-12-02 17:29:10
I have an issue with some processes stuck in a D state on Ubuntu 10.04.3 LTS. They have been in this state since Nov the 5th (today being December 6th). I understand these are uninterruptible sleep states often related to waiting for data from hardware such as a hard disk. This is a production server so rebooting is a very last resort, is anyone able to shed any light on what these processes might be? This is the output for the D state items from ps -aux www-data 22851 0.0 0.0 0 0 ? D Nov05 0:00 [2637.64] www-data 26306 0.0 0.0 4008 12 ? D Nov05 0:00 ./2.6.37 www-data 26373 0.0 0.0 4008 12 ? D

Delphi - How to get list of USB removable hard drives and memory sticks?

一世执手 提交于 2019-12-02 16:49:59
In my application (Delphi), I need to list all the USB storage devices. These can be either flash memory sticks or external storage drives. There is a Jvcl component JvDriveCombo , and it has the DriveType property - the problem is if I select DriveType := Fixed then in addition to the external drive, it also lists the internal drives ( C:\ , D:\ etc). However, I only want to list the external drives. I believe there is DeviceIoControl function (I saw it on MSDN) but I have no idea of how to use it. I wonder if anyone can help me with the proper way / code to list USB storage devices? Thanks.