linux&win share partition, disable write-cache?

Robert Locke lists at ralii.com
Wed May 11 17:15:53 UTC 2005


On Wed, 2005-05-11 at 18:32 +0200, Duncan Lithgow wrote:
<snip>

> >>>
> >>> i have winxp home and core three installed on my laptop as dual boot;
> >>> and i frequently switch from one into another and vice versa using
> >>> hibernate.
> >>>
> >>> so i frequently hibernate my windows, then boot into linux, and then
> >>> hibernate linux, and then resume into windows, and so on that the
> >>> cycle repeated several times a day until i rebooted them...
> >>>
> >>> my problem is, i want both operating systems to access (read/write)
> >>> the same partition (let's call it D: or /dev/hda9, the point is they
> >>> are the same). but as i have experienced, this will corrupt my data at
> >>> the partition when i switched operating system.
> >>>
> >>> to make things more clearly, the case is, i'm using thunderbird e-mail
> >>> client both at windows and linux. i stored windows thunderbird mail
> >>> folder to D:\mails and i stored linux thunderbird mail folder to
> >>> /dev/hda9/mails. when i receive new mails from linux thunderbird, all
> >>> seems okay. but when i hibernate my linux and switched into windows,
> >>> thunderbird windows complains there is a file corrupt and suggests me
> >>> to run chkdsk utility. and you can guess, chkdsk truncated my inbox
> >>> and my mails are gone.
> >>>
> >>> i realized that sharing a partition for 2 OS is a bad practice. but is
> >>> there really no solution? how about disabling write-cache on both OS?
> >>> is it possible to "disable write-cache just for selected partition" ?
> >>> how to do that in fedora?
> >>>
> >>> thank you for any solution, opinion, or idea.
> >>>
> >>  
> >>
> >
> <snip>

> >
> I've had this working for a while but it gave me all sorts of headaches. 
> I could swear i read an article about it on mozillazine - but now I 
> can't find it. There are lots of other things that come up about it 
> though. Have you tried a search before asking?
> 
> Duncan
> 

To be honest, I would be surprised if this ever worked.  I think, you
are correct in your assumption that the primary issue is a caching
issue.  But it's not just the "write-cache".  There is a read-cache.
How does the "hibernating" operating system know that a change has been
made to one of the "drives/partitions"?  These operating systems and
their interactions with the hard disk make a HUGE ASSUMPTION - that they
are the only one accessing the disk/partition/filesystem.  This is why
clustering is not a slam dunk and requires a different filesystem.

What you would need to do is modify the "hibernate" scripts to
drop/umount or something the "shared" filesystem and the "wakeup"
scripts to pickup/mount or something the "shared" filesystem.  This way,
only one operating system has the partition/filesystem open at a time
and life returns to sanity....

HTH,

--Rob




More information about the fedora-list mailing list