9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] recover cwfs
@ 2009-06-05 14:17 Anthony Sorace
  2009-06-05 15:17 ` erik quanstrom
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony Sorace @ 2009-06-05 14:17 UTC (permalink / raw)
  To: 9fans

i've got a cwfs based on an old fs(4). it gets used infrequently;
about a month and a haf ago it sufferend a power outage and i just
left it off, since i'd not touched it for a few weeks before that.

today i brought the thing back up, and the active fs is unhappy. on
boot, it reports it can't read /adm/users, which makes mounts fail.
running newuser complains about /adm/users but adds the user to the
table in memor, so i can mount, just to get "phase error -- cannot
happen" on any file access attempt.

accessing the dump file system works just fine. i'm entirely happy to
replace the file system with the last dump. i think "recover" from the
configuration mode is the way to do this, but i can't find a
description of it and it's been years since i had to do it. in
particular, how do i determine the superblock of the last dump?

also, this seems like the right oportunity to start using cwfs's -c.
any notes on the performance differences?



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] recover cwfs
  2009-06-05 14:17 [9fans] recover cwfs Anthony Sorace
@ 2009-06-05 15:17 ` erik quanstrom
  0 siblings, 0 replies; 2+ messages in thread
From: erik quanstrom @ 2009-06-05 15:17 UTC (permalink / raw)
  To: 9fans

On Fri Jun  5 10:19:22 EDT 2009, anothy@gmail.com wrote:
> i've got a cwfs based on an old fs(4). it gets used infrequently;
> about a month and a haf ago it sufferend a power outage and i just
> left it off, since i'd not touched it for a few weeks before that.
>
> today i brought the thing back up, and the active fs is unhappy. on
> boot, it reports it can't read /adm/users, which makes mounts fail.
> running newuser complains about /adm/users but adds the user to the
> table in memor, so i can mount, just to get "phase error -- cannot
> happen" on any file access attempt.
>
> accessing the dump file system works just fine. i'm entirely happy to
> replace the file system with the last dump. i think "recover" from the
> configuration mode is the way to do this, but i can't find a
> description of it and it's been years since i had to do it. in
> particular, how do i determine the superblock of the last dump?
>
> also, this seems like the right oportunity to start using cwfs's -c.
> any notes on the performance differences?

the right way to do this is to type "recover main" at the
configuration prompt.  since ken's fs writes the superblock
as part of the dump process, it points to where the next
superblock should be.  so recover's algorithm is to find
the first superblock at a known location and then use it
to find the next superblock.  lather, rince, repeat until
an invalid superblock is found.  the cache is wiped clean
as part of this process.

this is part of the normal procedure on our backup fileserver.
see http://www.quanstro.net/plan9/disklessfs.pdf

- erik



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-05 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05 14:17 [9fans] recover cwfs Anthony Sorace
2009-06-05 15:17 ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).