Questions tagged [sata]

Serial ATA (SATA) is a forward-backward compatible family of advanced computer bus interfaces for mass storage devices with hot-swapping capability and transfer speeds up to 600 MiB/s.

55 questions
9
votes
2 answers

How to emulate a SATA disk drive in QEMU

I want to emulate a SATA disk drive in QEMU to check a device driver I'm trying to develop. How can this be done? Would greatly appreciate your help.
Dragonight
  • 1,033
  • 2
  • 10
  • 20
7
votes
3 answers

How can I identify the protocol used in hard disk?

I have an application which needs to read information from a hard disk, stuff like serial model etc. Now of course it matters if the drive is a SAS, SATA or FC drive. Is there a reliable way that I can identify which protocol a connected drive…
user2882307
7
votes
3 answers

How can I determine the SATA channel for a given disk?

Using DISKPART command line utility, I can get something called a "Location path" which appears to give me what I need, you can view this by using the command detail disk after selecting one of your disks in diskpart. It appears I can get this…
Jon
  • 1,379
  • 1
  • 12
  • 32
5
votes
2 answers

Does fsync(fd) work on a file created by external program?

I have a SATA hard disk with write cache disabled: hdparm -W0 /dev/foo I am operating on an ext4 partition with these mount options (amongst others): data=ordered auto_da_alloc Linux kernel version is 2.6.32-5-686. Now, I have an external program…
STenyaK
  • 1,047
  • 1
  • 8
  • 15
3
votes
0 answers

print_req_error: critical target error, dev sdb, sector 0

I have samsung disk after a while the device is found on /dev/sdb but not the partitions. The smartools is not able to make a test of the unit and the dmesg traces show the follow information about is not able to access sector 0. For me the problem…
3
votes
0 answers

Is there a way to override libata.force during runtime?

I have added the kernel option "libata.force=1.00:disable" on purpose to "ignore" my internal SATA HDD since I'm booting from flash memory (to speed up the boot process) and also to avoid faulty HDDs (to avoid kernel lock-ups during…
jctlmm
  • 31
  • 2
3
votes
0 answers

Writing binary files (~12MB) consecutively very fast (30 per second) from a C++ program in Linux

I'm trying to write out raw video frames (12.4MB each) in realtime (30fps) to a CFast 2.0(ext4) card which is connected via a sata3(6Gb/sec) interface. The card is rated at 430MB/sec and when I benchmark the drive with consecutive 100MB file writes,…
3
votes
1 answer

How to detect when a new SATA drive is inserted using Java under Linux?

I am currently working on a project where I need to bulk import data into a Hadoop cluster. The data that needs to be imported into Hadoop resides on SATA disks. The data that needs to be imported are Encase forensics disks image (E01). I created an…
Martijn
  • 521
  • 1
  • 8
  • 17
3
votes
1 answer

write on track / head / cylinder on a magentic disk

I am developing a high performance database and I want to write directly to a specific track/cylinder with multiple heads at the same time. How is this done in Linux with SATA disks through the SATA bus? Any docs, examples you could recommend?
Nulik
  • 6,748
  • 10
  • 60
  • 129
3
votes
1 answer

Bypassing I/O scheduling and linux kernel page buffering

What I wanna trying to accomplish: Developing an linux application in C language, that "exclusively" accesses a PATA/SATA hard disk drive(HDD) to send ATA commands(in fact only those ATA commands that do not modify any byte on HDD accessed - eg.…
jacks
  • 294
  • 3
  • 15
3
votes
0 answers

How to switch from PIO to DMA modes on a SATA Controller in code?

I am running windows 7. I need build an unattended/automated test to exercise some SATA drives. One of the test requirements is to exercise the drive with DMA in both states (enabled AND disabled). To manually change this setting, you would: …
user1310759
  • 31
  • 1
  • 2
2
votes
0 answers

How do I send commands to NVMe drive over USB bridge?

I have been working with a self encrypting drive that I want to be able to send commands to identify and unlock in userspace. I've been able to send commands to NVMe and SATA drives with direct motherboard connections using the sg and nvme_admin_cmd…
C-Scholl20
  • 377
  • 3
  • 19
2
votes
1 answer

LBA level disk access

What's the best way to issue disk commands (read k blocks from lba n etc.) to a SATA disk? The choice of OS does not matter. I also need to be able to issue ATA commands. I would rather do this through a tool/application than use ioctls…
hojusaram
  • 497
  • 1
  • 6
  • 13
2
votes
0 answers

When should WriteFile block when called on a HANDLE that was opened with FILE_FLAG_WRITE_THROUGH?

At work we run our unit tests regularly on several build machines with the help of Jenkins. One of the unit tests opens a file with FILE_FLAG_WRITE_THROUGH, and makes tens of thousands of WriteFile calls on this file. Why it does that is not…
Donpedro
  • 828
  • 7
  • 22
2
votes
1 answer

In C/C++ how to programmatically detect SATA SSD plug in and unplug in Windows?

I'm trying to write a C/C++ program to detect a new SATA SSD (solid-state drive) connection in Windows 7. This SATA SSD also comes with a SATA-USB cable. I've connected the SATA end to the SATA SDD and the USB end into my computer. Doing this I've…
user3731622
  • 4,844
  • 8
  • 45
  • 84
1
2 3 4