Questions tagged [disk]

Anything related to disk-like storage media, like hard-disks, CDs, DVDs, etc. By extension it could be applied to other mass storage media that are commonly referred as "disks", like SSD, flash cards, etc.

1293 questions
4
votes
1 answer

why system call unlink so slow?

#include #include void dump_log(int size){ char cmd[1024]; snprintf(cmd, sizeof(cmd)/sizeof(cmd[0]), "dd if=/dev/zero of=from.bin bs=1024 count=%d", size); int ret = system(cmd); if (ret<0){ …
zzn
  • 2,376
  • 16
  • 30
4
votes
2 answers

Why linux disables disk write buffer when system ram is greater than 8GB?

Background: I was trying to setup a ubuntu machine on my desktop computer. The whole process took a whole day, including installing OS and softwares. I didn't thought much about it, though. Then I tried doing my work using the new machine, and it…
user3528438
  • 2,737
  • 2
  • 23
  • 42
4
votes
1 answer

How can I assemble a file from iSCSI blocks?

I am new to iSCSI programming. I have security camera videos written in iSCSI blocks in a SAN. I need to construct playback of the some video from those blocks. I have hard time finding any tutorial or lead to solve this issue. Thanks in advance.
Rifat Rousseau
  • 289
  • 1
  • 4
  • 16
4
votes
2 answers

Paging / Page fault handler - how is a virtual address used to find specific content on the disk

Paging allows the machine to provide a layer of indirection between the virtual memory address space and the real one. After being given an address, the MMU goes through the page tables and determines if the corresponding frame is in memory. If it…
aralar
  • 3,022
  • 7
  • 29
  • 44
4
votes
1 answer

SCAN and CSCAN algorithm

I am having hard time understanding the working of SCAN and CSCAN algorithm of disk scheduling.I understood FCFS,Closest Cylinder Next but heard that SCAN resembles elevator mechanism and got confused. My book says that for the incoming order :[10…
Khan
  • 185
  • 1
  • 4
  • 15
4
votes
3 answers

disk space is full by `vda` files, how to clear them?

So I have a VPS and it has whm / cpanel installed. For some reason its giving an error when ever I login to cpanel or visit a site on my server which says the disk space is full. When i check the desk space in WHM it says /dev/vda3 is 100% full. I…
Jamie Warren
  • 123
  • 1
  • 9
4
votes
3 answers

Detect if a block device is a local disk or a removable usb disk

There's any way to detect if a block device, like /dev/sda or /dev/sdc, is related to a local disk (scsi or sata I mean) or to a removable USB disk? I'm writing a shell script that have to detect ONLY local disks block devices, excluding any…
Andrea
  • 87
  • 2
  • 9
4
votes
1 answer

How long can I expect grep to take on a 10 TB file?

I have a 10 TB file with words from multiple books, and I'm trying to grep for some uncommon strings (no regex). For example: grep "cappucino" filename I'm trying to estimate how long this will take. I'm not really looking for whether it's the…
Popcorn
  • 5,188
  • 12
  • 54
  • 87
4
votes
5 answers

Automating cleanmgr.exe silently using PowerShell

I've been working on a script that is supposed to run cleanmgr.exe silently when disk C: is less than a 1gb, it's all working well, but one thing I couldn't achieve... I want to run cleanmgr.exe silently fully! I don't wanna see anything from the…
AliAlghamdi
  • 43
  • 1
  • 1
  • 4
4
votes
1 answer

How to get files (or file system) from VHDX file with CPP/C#

I want to extract a file from vhdx file. There is a way to do this. -Mount the disk and read file from mounted location. But I want to write a CPP/C# code for this. I am able to get vhdx file details with MS provided API (visrtdisk.dll) which…
Mahesh Mankar
  • 231
  • 3
  • 16
4
votes
2 answers

See disk management info with c#

When I open Disk Management (right click My Computer->Manage) I see: How can I know that path F:\ belongs to Disk5? In other words I will like to know what disks are available with C#. The reason why I need to know that is because I have a usb…
Tono Nam
  • 34,064
  • 78
  • 298
  • 470
4
votes
2 answers

Programmatically assign new letter to existing drive with C++

I want to change a drive letter. For example, I can use diskpart to assign a new letter to a drive (a USB disk or a new hard disk). How can I implement it in C/C++?
mark
  • 292
  • 1
  • 6
  • 18
4
votes
1 answer

How to get diskutil info output in a cocoa application

Is there a way to programmatically get the same information that diskutil info / | grep "Free Space" gives you? (For obvious reasons I'd rather have a better way to do this than just parsing the result of that command.) Currently I'm using statfs;…
houbysoft
  • 32,532
  • 24
  • 103
  • 156
4
votes
7 answers

Detecting mounted drives on Linux and Mac OS X

I’m using QDir::drives() to get the list of drives. It works great on Windows, but on Linux and Mac it only returns a single item “/”, i. e. root. It is expected behavior, but how can I get a list of drives on Mac and Linux? Non-Qt, native API…
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
4
votes
2 answers

Determine linux driver that owns a disk

I am trying to debug a situation where the SSD on my hardware is not being detected by the right device driver. The device driver that should own the SSD's is a software RAID driver (megasr) that will automically configure 2 SSD's in mirroring mode.…