Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Bob Harris <harris@zk3.dec.com>
Subject: Re: ADVFS fileset information
Date: Fri, 08 Feb 2002 12:36:01 -0500	[thread overview]
Message-ID: <080220021236019384%harris@zk3.dec.com> (raw)
In-Reply-To: b9019227.0202070537.34625e79@posting.google.com

In article <b9019227.0202070537.34625e79@posting.google.com>, Narasimha
<mknarasimha@hotmail.com> wrote:

X  Hi Bob,
X  
X  I thought i had cleared out our goal. Our goal is to find the extents
X  that a
X  fileset occupies on disk.People can write scripts read the extent
X  information(offset and size and perform backups) Currently there is no
X  way to do this other than walking thro all the files of the fileset
X  and then finding all the extents occupied by all the files and then
X  collapse them wherever possible and give the output(this effort is
X  time consuming). Our goal was to find the extents that a fileset maps
X  to but since you mentioned that the fileset is just a name in a name
X  space we probably need to stick to the method you mentioned.
X  Continuing on the previous conversation: If we indeed walk thro all
X  the files in the fileset and get the file extents we would need to
X  find the extents of the special files M-6 and M-12 as well but these
X  files are somehow hidden but i am pretty sure that they occupy space
X  on the fileset and we need to account for their extent information as
X  well. My question was concerns about opening these files and doing a
X  showfile on them? Hope i have clarified things.

You are playing in very dangerous territory.  Unless you have umounted
all the filesets in the domain, things could move on you behind your
back.  balance, defragment, migrate, rmvol, and the act of extending a
file could mess things up.

If you are going to work with an unmounted domain, then you might as
well just do a 'dd' of the volumes and get everything.  OK, a 1/2 full
1TB domain would still be faster to backup, if you didn't have to
backup the unused storage, so it may always be better.   But the fact
that unless you stop all activity on the domain, AdvFS can and will
move things on you.  AdvFS will work perfectly, but you will find you
have a corrupt backup.

As to saving on-disk metadata.  Some of it you want, and some of it you
do not want.  What you want is ownership, protections, time stamps,
property lists, etc...  What you do not want to save is metadata that
keeps track of how AdvFS stores and manages the data on the disk.

The M-6, M-12, etc... are where most of the above information is kept. 
While you could back these up by just reading them, you would not want
to restore them as they would contain information that the new domain
you are restoring into would not want.

If it was your intention to have a "Smart dd" where you memorize all
the locations on the disk which have data, back them up, then for a
restore you rebuild the disk from scratch and assume that since you
restored all the used sectors on disk, that the disk is now a usable
domain, that might work (but only if you make sure nothing in the
domain (and that is all the volumes of the domain) changes between the
time you start the "Smart dd" and the time it is finished.  Anything
else would most likely result in data corruption and it could even
panic the system when AdvFS chokes trying to mount the restored domain.

If that is your goal, then look at reverse engineering the SBM (Storage
Bitmap) file (M-7 for vol 1, M-13 for vol 2, etc...).  But again, I
caution you, the contents of the file can and will change on a running
AdvFS domain, plus the AdvFS development team is free to change the
format of the file between releases (and there have already been
discussions about changing it a future major release).  So having your
project depend on the contents of the SBM (and any other AdvFS metadata
file) is a high risk situation.

If your goal is to actually know about every file in the domain without
using supported APIs, then that gets even deeping into reverse
engineering and increases the likelyhood that on any given new release
of Tru64 UNIX something in the AdvFS metadata will change and break
your assumptions about how things work.

And in a previous reply I pointed out APIs that AdvFS supports for
backup utilities (see man 4 advfs, and man fcntl(F_GETMAP), things like
stat()/lstat(), getproplist(), readdir(), etc...).

While I appreciate how time consuming it is to backup huge domains, and
I do not want to discourage anyone from thinking about things from a
different angle, I also do not want to encourage you to create a
product that will fail 6 months, a year, 2 years from now because it
was based on quicksand (ie. changing AdvFS metadata format).

If your company is really serious about creating a new faster better
backup utility for Tru64 UNIX, then the best thing to do is contact our
Product Manager (if you ask off-line, I'll forward his email address).

                                        Bob Harris


      reply	other threads:[~2002-02-08 17:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-31 14:42 ADVFS fileset information Narasimha
2002-02-01  9:39 ` Marre des Spameurs qui prennent les add dans les news [SauroN]
2002-02-01 14:28 ` Narasimha
2002-02-04 15:40   ` Bob Harris
2002-02-01 15:15 ` Bob Harris
2002-02-04 16:47   ` Narasimha
2002-02-05 15:18     ` Bob Harris
2002-02-05 21:12       ` Narasimha
2002-02-06 15:18         ` Bob Harris
2002-02-06 22:48           ` Narasimha
2002-02-07  3:21             ` Bob Harris
2002-02-07 13:37               ` Narasimha
2002-02-08 17:36                 ` Bob Harris [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox