Question about PIO mode

paul90

New member
Just out of curiosity is it posible to set PIO mode in SATA disks or they are only DMA/UDMA compatible? does it support it?.

I used PIO mode in the past in the IDE drives (wich are compatible with PIO and DMA), but i don't know if it is possible to work in pio with SATA disks nowdays...
 

Jared

Administrator
Staff member
The drives themselves are certainly capable of operating in PIO mode as opposed to UDMA. We do this quite often in data recovery, but it's generally always through data recovery equipment like PC-3000. Finding a SATA controller capable of being set to PIO mode may be a challenge. The typical controller on a modern motherboard certainly isn't going to have that option. Perhaps it can be enabled on a software level through the OS, but I've never had a reason to look into it.
 

paul90

New member
pclab":e6fbs5eq said:
You mean during imaging?
Or selecting that mode for usual work?

Yes, it's more for usual work with an imaging software. In order to be recognized as PIO device in a Linux environment and then try to do the imaging process with a specific software like ddrescue or anything similar....

Jared":e6fbs5eq said:
The drives themselves are certainly capable of operating in PIO mode as opposed to UDMA. We do this quite often in data recovery, but it's generally always through data recovery equipment like PC-3000. Finding a SATA controller capable of being set to PIO mode may be a challenge. The typical controller on a modern motherboard certainly isn't going to have that option. Perhaps it can be enabled on a software level through the OS, but I've never had a reason to look into it.

Yeah, I never used a PC-3000 (I am in a learning process in the professional data recovery) but I see lots of demos about it and I know that it usually uses DMA and then PIO for next passes (and you can select it manually too) to get more info from badsectos where UDMA may fail.... and that's where I just got that doubt over SATA using PIO (without that kind of advanced HW like PC-3000). I didn't found any clear documentation about it in the past.

The info you give to me about the SATA controllers makes perfect sense. I don't know if it's possible for Linux to enable pio and disable dma in a sata disks. I tried in the past with hdparm and disabling dma at booting time but I cound't (in SATA disks)
 

paul90

New member
pclab":2yqtclpn said:
I believe that HDDSuperclone can do PIO mode, but not sure.
Ask him here: hddsuperclone-t1262.html

I'm more interested in ddrescue or much better to enable it at SO level not at software level but is interesting to know HDDSuperclone can do that... I'll look into it too.

Blizzard":2yqtclpn said:
I don't know if it actually works any more but the option was still there in Windows 7.

I'm aware of that possibility on Windows. I did it in the past in Windows 7 but I'm interested in do that in linux. Also, this makes me think that Windows does that simulation at driver level very well. Anyway thank you for the answer! ;)
 

maximus

Member
Maybe this is a stupid question, but WHY do you want to use PIO mode for cloning a SATA drive? Technically, SATA drives use DMA for all data transfers, even PIO commands. Putting a BIOS in IDE mode allows a simulation to the OS to be able to work with the drive as a PATA drive, but all data transfers between the motherboard and the drive are still DMA. Using PIO mode with the BIOS in IDE mode for cloning a SATA drive would be kind of like towing your car behind a bicycle, not very productive and slow going.

And by the way, a SATA drive does not care at all what PIO mode or DMA mode it is in when it comes to transfer speed. SATA drives operate natively as AHCI, and I can image a SATA drive with BIOS set to AHCI with PIO read commands at the same speed as with DMA read commands. SATA transfer speeds are set by the SATA version, 1.5Gbs, 3Gbs, and 6Gbs for the current version respectively.

As for the questions asked in the HDDSuperClone thread, yes, HDDSuperClone can use PIO mode. But in the free version it is only enabled in the Direct IDE mode (DMA is actually not available in the free version for the direct modes), meaning your bios must be set for IDE. In my personal (to be the Pro) version, PIO mode can be set for the reads. But it does not make any changes to the OS. I use something other than the standard OS read commands when accessing the disks. Even the passthrough modes are much more direct than ddrescue reads. The direct IDE and AHCI modes talk to the drives directly, well, as directly as possible from the OS. I actually bypass the OS driver.
 

paul90

New member
WOW thanks a lot for your explanation maximus I am learning a lot about this topic,

I just had curiosity about using PIO mode because I heard and read from diferent data recovering professionals that using PIO mode can get diferent results when you are reading badsectos. Where UDMA fail PIO can get better results or avoid some problems errors if you are reading them. What he didn't say if he was using SATA or IDE disks.

I had no idea SATA disks uses DMA even for PIO commands. That's explain because I cant disable DMA in linux (windows allows you to disable DMA and then it shows the SATA drive is using PIO4, but it still must be using DMA in the background then). PC-3000 allows you to use PIO mode, maybe it is emulated too by the software it is using (at least in the SATA disks).

The reason I was talking about GNU ddrescue (not ddrescue) is because I created my image with it and now I wanted to try PIO mode because the area left (still not rescued) has some badsectors and for the first time I cannot recover that 10GB left with ddrescue because every time It finds a badsector the system doesn't recognize the hardrive correctly anymore (until I restart). So I cannot continue with the image creation because hdparm shows I/O error in the drive (something is bad with it obviously). That's the reason I insist with the GNU ddrescue and not HDDSuperClone , to get use of the image part already created (240GB).

I didn't used your tool before (by the way amazing job, I researched about it) but I read it is much better for SCSI disks and some scenarios. Also, probably it's not a great idea to create the image again from the scratch with HDDSuplerclone because I can **** up the recovery and the disk may fail for re-read the same areas.

But, could I try to recover that area (those 10GB left) with HDDSuperClone with the ddrescue image file (.img)?
 

jol

Member
yes
there is a way you can convert the DDrescue log to HDDSuperClone
Code:
--importdd <file>
and continue the clone with HDDSuperClone
 
Top