9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] cwfs
@ 2009-05-08 16:27 cinap_lenrek
  2009-05-08 16:39 ` erik quanstrom
  0 siblings, 1 reply; 12+ messages in thread
From: cinap_lenrek @ 2009-05-08 16:27 UTC (permalink / raw)
  To: 9fans

Have converted my fossil/venti filesystem to cwfs (with history) and
made boot code so that i can start off from it. On the way i had to change
cwfs a bit so that it can cope with the long filenames from my mp3
collection and as it was supposed to run on my cpu server, i reduced
the cache memory size to be a quarter of all free userspace memory.

converting fossil to cwfs:

used the cphist program from http://www.quanstro.net/plan9/history.pdf
and wrote a /dev/(bin)time faking fileserver
(/n/sources/contrib/cinap_lenrek/delorean) that fools cwfs and replica
about the current time, but does not confuse cron and fossil.  you
have to manualy convert fossils /adm/users to cwfs format.  the
sequence is this: start cwfs type "allow" and "users default".  then
mount it and copy a users file in the root.  then type "users /users"
and remove the file again before doing the replica.  after replica
copy that file again to /adm/users so that on next startup the owners
and groups get loaded correctly.  for the replica you better make a
script and check the fossil dumps for corrupted directories.  i had
several metadata corruptions in the root direcotiry of fossil dumps
that caused replica to remove anything just to recreate it on the next
round. in the end i made a list of bad dumps that got skpied in
the script. the good news is that you can do all this while your fossil
cpuserver is running so if you find problems you can start over again
and to crazy things while anything is still running.

booting from cwfs:

/n/sources/contrib/cinap_lenrek/local.c (copy to /sys/src/9/boot/local.c)

the important part of the kernel configuration looks like this:

boot cpu boot w0
	tcp
	local

bootdir
	bootpccpuc.out boot
	/386/bin/ip/ipconfig
	/386/bin/auth/factotum
	/386/bin/cwfs

cwfs as the original stand alone fileserver has its own device names. cwfs
needs a device mapping file that maps plan9 files to cwfs devices.
connectlocalcwfs() builds that mapping dynamicly from plan9.ini keys
in the form wN=file. so my plan9.ini looks like this:

bootfile=sdE0!9fat!9pccpuc
bootargs=local!w0
bootdisk=local!w0
w0=#S/sdE1/data

on boot, cwfs is started in config mode so one can recover from errors. after
typing "end" on the cwfscmd promt stdin of cwfs is put in /srv/cwfscmd
and the filesystem gets mounted.

misc:

dont forget to change fshalt to do something like this:

f=...
k=...
c=`{ls /srv/cwfs*cmd >[2]/dev/null}

for (i in $c){
	echo -n $i...
	echo halt >>$i
}

cwfs needs to be halted correctly as it has no jurnaling or softupdates.

--
cinap




^ permalink raw reply	[flat|nested] 12+ messages in thread
* [9fans] cwfs
@ 2013-02-22  8:11 arisawa
  2013-02-22  8:55 ` cinap_lenrek
  0 siblings, 1 reply; 12+ messages in thread
From: arisawa @ 2013-02-22  8:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

 I have been playing with cwfs64x on 9front since last summer as my home system.
My current chief concern is, how to restore data when the disk is corrupted.
I have a copy of /dev/sdC0/fsworm on  /dev/sdD0/fsworm.
However, I don't understand how to ream fscache based on the existing fsworm.
Cwfs64x complains "badtag" in fscache and exits...

I believe there is no much difference in administration between two release: Geoff's and 9front.

Kenji Arisawa.




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

end of thread, other threads:[~2013-02-22 11:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-08 16:27 [9fans] cwfs cinap_lenrek
2009-05-08 16:39 ` erik quanstrom
2009-05-08 17:56   ` cinap_lenrek
2009-05-08 19:10     ` erik quanstrom
2009-05-08 19:39       ` cinap_lenrek
2013-02-22  8:11 arisawa
2013-02-22  8:55 ` cinap_lenrek
2013-02-22 10:15   ` arisawa
2013-02-22 10:25     ` arisawa
2013-02-22 10:40     ` erik quanstrom
2013-02-22 11:33       ` arisawa
2013-02-22 11:43         ` 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).