9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9fans@9fans.net
Subject: Re: [9fans] 9front: /lib/ndb/local clobbered after edit w/ sam, soon following update
Date: Tue, 25 Mar 2014 09:38:57 +0100	[thread overview]
Message-ID: <bd4ea5cbe94c5a3ed5e786101133f947@felloff.net> (raw)
In-Reply-To: <CAPkKT5FTf88zctZeTeUMqoN36RqxeM6HfNzwmnUY7dv-Kt8fLA@mail.gmail.com>

sounds like filesystem corruption, yes. in that case, do not override
anything. keep it as it is and depending on the filesystem, run a check
to determine the extend of the damage.

what filesystem is this? if its cwfs, read further:

if the damage seems small, you might just clear the directory entry
for the corrupted files (abandoning the blocks) and recreate it from
backup. do not just delete the file or override it! the block pointers
could be wrong pointing into other files, you'll just corrupt these
or put these blocks on the freelist! a filesystem check can reveal this.

see fs(8) manpage for the check and clri commands.

you enter these commands on the filesystem console, accessube by:

con -Cl /srv/cwfs.cmd

with cwfs, all changes to the filesystem are first done in the cache
and later the cache is written out to the dump at night. you can
recover main from the worm dump, which will reinitialize the cache.

note, this assumes that the corruption is in the cache only and hasnt
propagated to the worm yet. (check 9fs dump; cd /n/dump and see
if the backup is still intact)

to reinitialize the cache from last dump, you reboot and
use bootargs local!/dev/sdXX/fscache -c to enter config mode,
then in config mode enter:

recover main
end

--
cinap



  reply	other threads:[~2014-03-25  8:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25  6:07 Michael Hansen
2014-03-25  8:38 ` cinap_lenrek [this message]
2014-03-25  8:42 ` cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd4ea5cbe94c5a3ed5e786101133f947@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).