Re: hfs+ read only over fibre channel
Re: hfs+ read only over fibre channel
- Subject: Re: hfs+ read only over fibre channel
- From: Anton Altaparmakov <email@hidden>
- Date: Tue, 3 Jul 2007 08:10:11 +0100
Hi,
On 3 Jul 2007, at 02:53, Brian Sturk wrote:
Mark Day wrote:
Probably the closest you can get is to do an update mount, with
the MNT_RELOAD flag also set. Use at your own risk. Changing the
on-disk structures behind the file system's back is very risky;
you could corrupt the file system and lose data. This is not the
right way to hook multiple machines up to a SAN.
-Mark
Hi Mark,
Thanks for the info. I'm pretty sure I've tried that although if I
remember correctly I was attempting to use mount -o and reload (or
was it update, can't recall) rather than doing it
programmatically. I think what I ran into doing that was dealing
with open file handles. I will play some more with that flag. I
thought I recall reading somewhere that someone was able to
accomplish this as of 10.4.6. Was anything added in 10.4.6 that
might be relevant in this area? Maybe something in the IOMedia
framework? I'll try and dig up where I read that.
And yep, I know just how *bad* this is (or can be). The machine I
want to do the update on will be mounting read only so hopefully it
won't actually corrupt the disk.
It is not about corrupting the FS when mounting read-only. It is
more that your read-only mounting system will hang / crash / report
FS corruption and all sorts if the underlying FS is being actively
modified. For example if your rw mount is modifying a directory tree
by actively creating files and directories and your ro mount tries to
read this directory it is likely it will see the metadata as being
corrupt because half of it is old and half new and the two are not in
sync... If you are unlikely this will trigger a kernel panic() or
worse...
Network and distributed FS exist for a reason. Use them. NEVER
mount the same storage in two or more locations unless ALL mounters
are read-only. Simply mount it in one place then export it via AFP/
SMB/NFS/whatever to the other machines that need access. Anything
else leads to madness and unpredictable failure modes. Or don't use
HFS at all and instead install a proper distributed file system and
use that instead so you can safely mount it from multiple locations.
Best regards,
Anton
thanks again,
~brian
On Jul 2, 2007, at 3:51 PM, Brian Sturk wrote:
Not sure if this is the right mailing list for this sort of
question.
If not I'll ask on the appropriate list.
I'm trying to force an HFS volume that is mounted read only to re-
read
directory entries from disk (bypassing it's cache). I haven't found
anything at the VFS layer that allows me to do that (cache_purgevfs
etc). The VOP_READDIR path seems to go almost straight to the
underlying driver. Just looking for any pointers on how to
accomplish
this if it can even be done. I know that re-mounting the volume
accomplishes this but I'm looking to do it *without* having to
remount.
Having asked this I'm very aware of how dangerous this is i.e.
reading
structures off the disk while another could be possibly writing
to the disk.
Any info would be greatly appreciated!
~brian
--
--
.--------------------------------------------------,--------.
| Brian Sturk - http://users.adelphia.net/~bsturk \ C/C++ |
|-------------------------. bsturk<AT>comcast.net | Python |
| http://www.telengard.com `------------------------`-------|
| Telengard Technologies Inc. - NT/*nix UI & device drivers |
`-----------------------------------------------------------'
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden