Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been having a really annoying problem for quite some time
now, that has completly stumped me. The problem is that on one
of my hard drives, when connected to my PCI expansion IDE
contrtoller, and I boot a kernel that uses DMA, I get massive
filesystem corruption & total data loss.
The affected drive is a Western Digital WD205AA-00BAA0 20GB
UDMA66. It is attached to a Promise Ultra133TX2 (PDC20269) PCI
expansion IDE controller. At this point I don't even know which
of the two (if either) actually is the source of the problem, because
the hard drive works fine when attached to my motherboards IDE
controller, and the Ultra133TX2 controller also has two other hard
drives attached that work perfectly. Another detail that adds to
my confusion is that under M$ Windows XP, the hard drive works
fine when attached to the Ultra133TX2.
For quite some time I've been using a work-around that allowed
me to use the drive & controller together. The work-around
indicates that DMA may be related to the problem, although again
there is some very confusing stuff here. My work-around was to
disable DMA in the kernel, by turning off CONFIG_IDEDMA_AUTO
& CONFIG_IDEDMA_PCI_AUTO in make menuconfig, and then
enabling DMA with 'hdparm -d1' in my bootscripts. When I was
doing this, everything worked fine. But since I couldn't leave well
enough alone, I was trying to figure out why DMA works when
enabled with hdparm, but not through the kernel, and as I was
doing so, I lost everything on the hard drive (fortunatly backed
up), am no closer to knowing what the root problem is, and worst
of all haven't been able to restore my work-around configuration.
I've tried kernels 2.4.18 through 2.4.22, and 2.6.0-test4, and all
of them behave the same way.
[Edit]In the process of troubleshooting this, I've contacted both
Promise and Western Digital. So far I haven't got much info from
either of them.[/Edit]
Any help on this would be hugely appreciated,
Beolach
ok, i heard of this from the mandrake-linux mail list that i suscribe rto...
western digital does not use the full specs for something or another (am i vague enough?) making them suseptible to file system corruption. sorry i can't be more specific but a google search should be more specific but i know i'm right about western digital not being a hard drive for linux users. BTW, winblows incorporates a work-around for western digital hard drives.
I actually have read many posts on mailing list from searching
through google. Some of them do agree with what you said, that
WD drives have problems with DMA under Linux. What's really
confusing me about this is that when I enabled DMA using
'hdparm -d1' I would get DMA performance with no problems, but
when I set CONFIG_IDEDMA_AUTO & CONFIG_IDEDMA_PCI_AUTO
in the kernel config, I would get massive filesystem corruption.
What's the difference between enabling DMA in the kernel, and
enabling DMA with hdparm?
good question. not being a specialist in kernel subjects (i.e take this with a grain of salt :^) i'd say that they are doing the same thing in different ways.
At this point, I do think it is most likely a problem with the hard
drive. But along with DMA working with hdparm, the other thing
that makes me think it may be something else, is that the WD
hard drive has no problems (either with DMA via the kernel or
using hdparm) when I move it to my motherboards IDE controller.
Unfortunatly this isn't a very good solution for me, because I have
several ATAPI devices normally conected to the MoBo IDE, that I
boot off of occasionaly (bootable CDs, and a ATAPI floppy drive),
but the Ultra133TX2 controller doesn't work well with bootable
ATAPI devices, so I can't just swap them with the WD hard drive.
And at this point I'm out of work and strapped for cash, so I can't
just go out and buy a replacement hard drive (and my brother is
nagging me to return the one I borrowed from him). So if I can
get this drive working nicely, I will be a very happy camper.
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341
Rep:
You're going to be mad at me. But, here goes. Maxtor drives on one IDE #, western Digital on another. WD doesn't play well with others except WD (and even some of those don't get along.)
I had the same problem with WD + Samsung. Drove me nuts. Windows worked O.K. but major corruption in linux. On a CMD680 based controller I had problems even with them on different IDE#'s.
One thing though, most of the newer MB's have IDE controllers which do handle the timing difficulties involving two different speed devices as master and slave--not like the old days.
Both of your Maxstors are 133's so make them Master/slave on one of your IDE #'s on your Promise Card. Depending on performance needs, and such, you may have to move partitions around.
Another thing you might want to check up on is whether any of your frequently accessed hardware is sharing IRQs. I read somewhere that this is A Very Bad Thing with WD drives.
I've actually seen some info on that elsewhere; and I've also
heard that on some IDE controllers each channel can only operate
at one speed, so a UDMA133 and UDMA66 drive on the same
channel would both operate at UDMA66.
But the two different brand drives on the same channel isn't
whats causing my problem. The Maxtor 120GB UDMA133 drive
actually belongs to my brother. I borrowed it from him so I could
have a place to backup everything from the WD drive before trying
to troubleshoot it.
Of course, there's really no reason for it to be on the same
channel as the WD drive, so I will move it to the other channel as
I continue troubleshooting.
I haven't looked into which IRQ's are used by what. Will check it
out & post my findings.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.