9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] fs(3) issues ('clear' missing and mirror question)
@ 2007-09-28 14:02 Christian Kellermann
  2007-09-28 16:15 ` geoff
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Kellermann @ 2007-09-28 14:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1851 bytes --]

Dear List,

1)
I have been playing with fs(3). Unfortunately the clear command
mentioned in the man page does not seem to exist.

cpu% echo clear > /dev/fs/ctl
echo: write error: unknown control message "clear"

whereas fs(3) says:
clear
               Discard all fs device definitions.

One of each is wrong here ;)

2)
I wanted to use fs(3) to setup mirrored venti arenas, and indeces.
Now with fs I only get one device after a 
echo mirror m0 /dev/sdC1/data /dev/sdD0/data > /dev/fs/ctl

I have read in earlier threads that it is possible to disk/part the
m0 device. How can I specify the partitions later on? Also This
seems to fail:

cpu% disk/prep -a^(isect arenas fscfg) /dev/fs/m0 > /dev/fs/ctl 
no plan9 partition table found
fscfg 1
arenas 558164159
isect 27908208
' fscfg                   0 1            (1 sectors, 512 B )
' arenas                  1 558164160    (558164159 sectors, 266.15
GB)
' isect           558164160 586072368    (27908208 sectors, 13.30
GB)
>>> w
adding part failed: fscfg: wrong #args in control message "part
fscfg 0 1"
adding part failed: arenas: wrong #args in control message "part
arenas 1 558164160"
adding part failed: isect: wrong #args in control message "part
isect 558164160 586072368"
?warning: partitions could not be updated in devsd
>>> q

Is this supposed to work? Doing it a second time disk/part tells me:
cpu% disk/prep -a^(isect arenas fscfg) /dev/fs/m0 > /dev/fs/ctl
partitions already exist; not repartitioning
>>> q

The '>/dev/fs/ctl' part comes from a mail from erik (Message-ID:
2cb5e9b012d84b84ab0216685114e141 () coraid ! com
)

Should I mirror each partition separately then?

Thanks for your precious time,

Christian

-- 
You may use my gpg key for replies:
pub  1024D/47F79788 2005/02/02 Christian Kellermann (C-Keen)

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] fs(3) issues ('clear' missing and mirror question)
  2007-09-28 14:02 [9fans] fs(3) issues ('clear' missing and mirror question) Christian Kellermann
@ 2007-09-28 16:15 ` geoff
  2007-09-28 16:56   ` Christian Kellermann
  2007-09-28 17:12   ` Christian Kellermann
  0 siblings, 2 replies; 8+ messages in thread
From: geoff @ 2007-09-28 16:15 UTC (permalink / raw)
  To: 9fans

You need a recent kernel to get the "clear" command.

fs(3) describes a "part" command for partitioning other devices.



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

* Re: [9fans] fs(3) issues ('clear' missing and mirror question)
  2007-09-28 16:15 ` geoff
@ 2007-09-28 16:56   ` Christian Kellermann
  2007-09-28 19:38     ` geoff
  2007-09-28 17:12   ` Christian Kellermann
  1 sibling, 1 reply; 8+ messages in thread
From: Christian Kellermann @ 2007-09-28 16:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

* geoff@plan9.bell-labs.com <geoff@plan9.bell-labs.com> [070928 18:21]:
> You need a recent kernel to get the "clear" command.
> 
> fs(3) describes a "part" command for partitioning other devices.

Thanks! I just haven't updated this machine for almost a year...

Now I have just pull'ed from sources and rebuild a stock pccpuf
kernel.

After rebooting I get this:

cpu% cat /dev/fs/ctl
mirror m0 /dev/sdC1/data /dev/sdD0/data
cpu% echo clear > /dev/fs/ctl
cpu% cat /dev/fs/ctl
mirror m0 /dev/sdC1/data /dev/sdD0/data
clear
cpu%

Is this desired? The concatenation seems a bit disturbing...

Cheers,

Christian

-- 
You may use my gpg key for replies:
pub  1024D/47F79788 2005/02/02 Christian Kellermann (C-Keen)

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] fs(3) issues ('clear' missing and mirror question)
  2007-09-28 16:15 ` geoff
  2007-09-28 16:56   ` Christian Kellermann
@ 2007-09-28 17:12   ` Christian Kellermann
  2007-09-28 19:52     ` geoff
  1 sibling, 1 reply; 8+ messages in thread
From: Christian Kellermann @ 2007-09-28 17:12 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

* geoff@plan9.bell-labs.com <geoff@plan9.bell-labs.com> [070928 18:21]:
> fs(3) describes a "part" command for partitioning other devices.

Just to make sure I have understood the man page correctly:

I can use the output of disk/prep -p /dev/fs/m0, for example:

part fscfg 0 1
part arenas 1 558164160
part isect 558164160 586072368

and insert the fs device (/dev/fs/m0 in my case) as 'file' parameter
and then I am done?
cpu% ls -l /dev/fs
--rw-rw-r-- k 0 bootes bootes    558164160 Sep 28 18:45
/dev/fs/arenas
--rw-rw-r-- k 0 bootes bootes            0 Sep 28 18:45 /dev/fs/ctl
--rw-rw-r-- k 0 bootes bootes            1 Sep 28 18:45
/dev/fs/fscfg
--rw-rw-r-- k 0 bootes bootes    586072368 Sep 28 18:45
/dev/fs/isect
--rw-rw-r-- k 0 bootes bootes 300069052416 Sep 28 18:45 /dev/fs/m0

does this look ok to you?

Thanks for your help!

Christian

-- 
You may use my gpg key for replies:
pub  1024D/47F79788 2005/02/02 Christian Kellermann (C-Keen)

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: [9fans] fs(3) issues ('clear' missing and mirror question)
  2007-09-28 16:56   ` Christian Kellermann
@ 2007-09-28 19:38     ` geoff
  0 siblings, 0 replies; 8+ messages in thread
From: geoff @ 2007-09-28 19:38 UTC (permalink / raw)
  To: 9fans

No, that shouldn't have been happening; "clear" should have resulted
in an empty configuration.  I've just pushed out a new devfs.c that
fixes it.



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

* Re: [9fans] fs(3) issues ('clear' missing and mirror question)
  2007-09-28 17:12   ` Christian Kellermann
@ 2007-09-28 19:52     ` geoff
  2007-09-28 20:48       ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: geoff @ 2007-09-28 19:52 UTC (permalink / raw)
  To: 9fans

devsd's partition commands and devfs's are currently different.  Among
other differences, devsd's partitions are defined in terms of sectors
but devfs's are defined in terms of bytes.  There's no need to use
prep to configure devfs and it isn't really appropriate.



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

* Re: [9fans] fs(3) issues ('clear' missing and mirror question)
  2007-09-28 19:52     ` geoff
@ 2007-09-28 20:48       ` erik quanstrom
  2007-09-28 20:58         ` geoff
  0 siblings, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2007-09-28 20:48 UTC (permalink / raw)
  To: 9fans

> devsd's partition commands and devfs's are currently different.  Among
> other differences, devsd's partitions are defined in terms of sectors
> but devfs's are defined in terms of bytes.

another way of saying this is that fs's sector size is one byte.

i think it would be more useful to use the least common multiple
of the fs's devices' sector sizes.  an ata disk, for example can only
read in multiples of 512 bytes.  so if a partition offset % 512 != 0,
a sector-sized read will require reading two sectors.

>  There's no need to use
> prep to configure devfs and it isn't really appropriate.

why not use prep to partition an fs device?  what is the advantage
of making things different.  the result of fs's operations is a block
device.  i would think one should be able to prep it just like a sd
device.  am i missing something?

- erik


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

* Re: [9fans] fs(3) issues ('clear' missing and mirror question)
  2007-09-28 20:48       ` erik quanstrom
@ 2007-09-28 20:58         ` geoff
  0 siblings, 0 replies; 8+ messages in thread
From: geoff @ 2007-09-28 20:58 UTC (permalink / raw)
  To: 9fans

I was just explaining the current situation.  Admittedly, it's not
ideal.



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

end of thread, other threads:[~2007-09-28 20:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-28 14:02 [9fans] fs(3) issues ('clear' missing and mirror question) Christian Kellermann
2007-09-28 16:15 ` geoff
2007-09-28 16:56   ` Christian Kellermann
2007-09-28 19:38     ` geoff
2007-09-28 17:12   ` Christian Kellermann
2007-09-28 19:52     ` geoff
2007-09-28 20:48       ` erik quanstrom
2007-09-28 20:58         ` geoff

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).