Questions tagged [hard-drive]

GENERAL HARDWARE SUPPORT IS OFF-TOPIC. Questions about hardware should be asked on https://superuser.com. A hard drive is a physical storage device used to save state for operating systems and individual software programs. Questions should relate to reading and writing via programming.

649 questions
4
votes
1 answer

Understanding Hard Disk Sector Size

I'm currently developing a kernel mode driver that interacts with raw disk operations. I wish to understand more about the concept of Sector Size. Is a sector size a constant value per physical drive that was set when the HDD was manufactured ? Or…
Michael
  • 796
  • 11
  • 27
4
votes
6 answers

Emulate hard disk in .NET

Is there a way to emulate a disk drive in .NET, intercepting read/write/lock operations? I would like to create something with a front-end similar to GMail Drive in C#. Thanks, Tom
Tom
4
votes
2 answers

Python Filling Up Disk

I need to setup some test conditions to simulate a filled up disk. I created the following to simply write garbage to the disk: #!/usr/bin/python import os import sys import mmap def freespace(p): """ Returns the number of free bytes on…
james_dean
  • 1,477
  • 6
  • 26
  • 37
4
votes
1 answer

How can I access the raw data of a drive from within vb.net?

How can I access the raw data of a drive in vb.net? I plan on making a filesystem, but I need raw disk access. I'm meaning something like this: Dim data(255) As Byte data = ReadSector("C:", 5) data(125) = asc("h") data(126) = asc("e") data(127) =…
Daffy
  • 841
  • 9
  • 23
4
votes
5 answers

c# - How to list all files and folders on a hard drive?

I want to list all files and folders that my program has access to and write them to a text file. How would I get the list? I need a way that will catch or not throw UnauthorizedAccessExceptions on folders that are not accessible.
derp_in_mouth
  • 2,003
  • 4
  • 15
  • 17
4
votes
6 answers

How can I find the Harddisk Device Serial Number without using the WMI in .NET?

I want to get the hardwired serial number from the hard disk but NOT using WMI. I tried using WMI code, and it doesn't work on my machine for sure. So is there any alternative in .NET for finding the Serial Number of a physical hard disk?
Jey Geethan
  • 2,235
  • 5
  • 33
  • 60
4
votes
2 answers

Assembly - Read next sector of a virtual disk

As any programmer in the world at least once in his/her life, I am trying to create my "revolutionary", the new and only one operating system. :D Well, I am using a virtual emulator (Oracle VM Virtual Box), for which I create a new unknwon operating…
ali
  • 10,927
  • 20
  • 89
  • 138
4
votes
1 answer

Disk Throughput - new file vs. existing file using dd

I wanted to measure my disk throughput using the following command: dd if=/dev/zero of=/mydir/junkfile bs=4k count=125000 If the junkfile exists, my disk throughput is 6 times smaller than if junkfile does not exist. I have repeated that many times…
Amir
  • 5,996
  • 13
  • 48
  • 61
4
votes
1 answer

Python - Reading directly from hard drive

I want to read bytes directly off a hard drive, preferably using python. How can I do this, provided it is even possible. Also, can I write directly to a hard drive, and how? I want to do this to make a complete clone of a hard drive, and then…
adisander
  • 43
  • 3
4
votes
3 answers

Get hard disk temperature using Python

I would like to get the temperature of a hard disk using Python (under Linux). I'm currently calling hddtemp with subprocess.popen, but I call it often enough that it is a performance bottleneck in my script. I think it should be possible to do…
mrtasktat
  • 323
  • 1
  • 4
  • 12
3
votes
1 answer

Restore PostgreSQL database from mounted volume

My EC2 database server failed, preventing SSH or other access (not sure why ... grrr AWS ... that's another story). I was able to make a snapshot of the EBS root volume. I can not boot a new instance from this volume (I'm guessing the boot partition…
lubar
  • 2,589
  • 2
  • 26
  • 28
3
votes
2 answers

Listing physical drives installed on my computer

Possible Duplicate: How to list physical disks? What is the "best way" (fastest) C++ way to List physical drives installed on my computer? Is there a boost library to do that?
smallB
  • 16,662
  • 33
  • 107
  • 151
3
votes
1 answer

Development kits for OPAL SSC full-disk encryption

I am looking for development kits or utilities to interact with and test OPAL SSC full disk encryption. I could get it working from BIOS, but that makes R&D tricky. Please pass along any helpful tips or utilities. The question would be answered if…
Konrads
  • 2,206
  • 2
  • 30
  • 45
3
votes
2 answers

How to get unallocated space info in a physical disk

Can anybody help, how to get unallocated space information in a disk using C# ?
Nick
  • 361
  • 2
  • 7
  • 16
3
votes
1 answer

Does Mac OS UUID depend on hard disk?

I use this code to get UUID on Mac OS NSString* getComputerId() { io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/"); CFStringRef uuidCf = (CFStringRef)…
user486134
  • 405
  • 1
  • 6
  • 13