9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Invers of partfs
@ 2022-02-10 17:42 Benjamin Riefenstahl
  2022-02-10 19:07 ` Steve Simon
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Riefenstahl @ 2022-02-10 17:42 UTC (permalink / raw)
  To: 9front

Hi all,

I would like to use partfs and disksim for testing.  As most of you
probably know, these services create devices similar to /dev/sdXXX from
memory or files.  One thing that I can't figure out is how to
close/unmount/unbind these, for cleanup and so that I can re-use the
names.  How do I do that?

Thanks, benny

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

* Re: [9front] Invers of partfs
  2022-02-10 17:42 [9front] Invers of partfs Benjamin Riefenstahl
@ 2022-02-10 19:07 ` Steve Simon
  2022-02-11 11:44   ` Benjamin Riefenstahl
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Simon @ 2022-02-10 19:07 UTC (permalink / raw)
  To: 9front

unmount?

probably the easiest would be to put your tests in a script with “rfork ne” at the top.

this will ensure that when your script ends the namespace and environment will evaporate. partfs will also close as its input is closed as part of the namspace going.

-Steve


On 10 Feb 2022, at 6:40 pm, Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> wrote:

Hi all,

I would like to use partfs and disksim for testing.  As most of you
probably know, these services create devices similar to /dev/sdXXX from
memory or files.  One thing that I can't figure out is how to
close/unmount/unbind these, for cleanup and so that I can re-use the
names.  How do I do that?

Thanks, benny

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

* Re: [9front] Invers of partfs
  2022-02-10 19:07 ` Steve Simon
@ 2022-02-11 11:44   ` Benjamin Riefenstahl
  2022-02-14 19:06     ` Benjamin Riefenstahl
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Riefenstahl @ 2022-02-11 11:44 UTC (permalink / raw)
  To: Steve Simon; +Cc: 9front

Hi Steve,

Steve Simon writes:
> unmount?

I tried that, but although the name in /dev is called a "mountpoint" in
the man page, unmount claims it doesn't know anything about it.

> probably the easiest would be to put your tests in a script with
> “rfork ne” at the top.
>
> this will ensure that when your script ends the namespace and
> environment will evaporate. partfs will also close as its input is
> closed as part of the namspace going.

Ah, thinking in namespaces, nice!  Yes, a subprocess like that should
work fine, thank you.

so long, benny

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

* Re: [9front] Invers of partfs
  2022-02-11 11:44   ` Benjamin Riefenstahl
@ 2022-02-14 19:06     ` Benjamin Riefenstahl
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Riefenstahl @ 2022-02-14 19:06 UTC (permalink / raw)
  To: Steve Simon; +Cc: 9front

Hi Steve, all.

> Steve Simon writes:
>> probably the easiest would be to put your tests in a script with
>> “rfork ne” at the top.
>>
>> this will ensure that when your script ends the namespace and
>> environment will evaporate. partfs will also close as its input is
>> closed as part of the namspace going.

Interestingly, partfs (i.e. the block device) and the filesystem mount
itself do go away as expected, but the cwfs64x processes (some 20 or 21
processes) do not.  They require "echo halt >> /srv/servicename" to end
themself.  Is that expected or is it a bug?

What I do, just for background: I have a diskimage with partitions for a
cwfs file system on it.  I run partfs, cwfs64x, and mount to get at the
contents of the file system.

When I run that inside a process with "rfork ne", the service created by
cwfs64x is visible from another rio window, but not the block device
created by partfs and not the mounted filesystem.  So it's consistent in
that way.

benny

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

end of thread, other threads:[~2022-02-15  9:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 17:42 [9front] Invers of partfs Benjamin Riefenstahl
2022-02-10 19:07 ` Steve Simon
2022-02-11 11:44   ` Benjamin Riefenstahl
2022-02-14 19:06     ` Benjamin Riefenstahl

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