Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 1997 06:41:46 -0500 (EST)
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        ponds!charming.nrtc.northrop.com!johnson, ponds!freebsd.org!questions
Subject:   Re: file store question
Message-ID:  <199704031141.GAA07546@lakes.water.net>

next in thread | raw e-mail | index | archive | help
> 
> 
> Hello all,
> 
>   When a file gets created under the Fast File System, and gets placed into
> a set of physical blocks and possibly a few fragments, will that file
> ever get moved?  In other words, if I created a file and then never updated
> it (or even read from it), would it stay on the same place on the physical
> disk?

 Yep, as far as I know (unless, of course, you took it off, with say,
tar for a backup and restored it later.. but you said "never updated.")

 If your thinking along the lines of a dos compression to reorder things
for efficiency, the way files are laid out really doesn't need that
in the FFS.

> 
>   Another question:  what tools exist (if any) to go in and manually
> change i-nodes and other data structures on a hard disk?

 See the man page for 'clri' - it will clear an inode...  it's a small
program that you could easily modify to do something else if you wanted.
The basic idea is that you run 'clri' on the inode in question (setting
it to 0) and then fsck the file system to put everything in order.  fsck
will discover your cleared inode (if it makes sense for it to  be something
else) and properly repair things as best as could be.

	- Dave Rivers -

> 
> (This is a follow-on to my earlier question about what to do if a bad spot
> develops on an IDE hard drive.)
> 
> Thanks in advance,
> 
> Greg Johnson
> johnson@nrtc.northrop.com
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704031141.GAA07546>