9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] cfs(4)
@ 2021-02-09 15:51 Stanley Lieber
  2021-02-10 15:27 ` james palmer
  0 siblings, 1 reply; 8+ messages in thread
From: Stanley Lieber @ 2021-02-09 15:51 UTC (permalink / raw)
  To: 9front

i'd like to document setting up cfs in the fqa. some questions:

- can it use a file on fat volume, or a fat volume itself

- if not, what are the steps for creating a minimum viable cfs partition

- how does cfs= in plan9.ini interact with tls booting

- does that, or cfs -a work with current auth and encryption

thanks,

sl

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

* Re: [9front] cfs(4)
  2021-02-09 15:51 [9front] cfs(4) Stanley Lieber
@ 2021-02-10 15:27 ` james palmer
  2021-02-12  3:16   ` Xiao-Yong Jin
  0 siblings, 1 reply; 8+ messages in thread
From: james palmer @ 2021-02-10 15:27 UTC (permalink / raw)
  To: 9front mailing list

Quoth sl@stanleylieber.com:
> i'd like to document setting up cfs in the fqa. some questions:
> 
> - can it use a file on fat volume, or a fat volume itself
i'd guess that this would work fine seeing as it just takes a file as an argument.

> - if not, what are the steps for creating a minimum viable cfs partition
cfs will format the partition it is given. i use this to run cfs on a ramdisk.

> - how does cfs= in plan9.ini interact with tls booting
works fine for me. i enter my secstore password, cfs is run, then init runs /bin/rc.

> - does that, or cfs -a work with current auth and encryption.
i dont know about cfs -a. it gets run as cfs -s -f $cfs </srv/boot in bootrc.

- james

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

* Re: [9front] cfs(4)
  2021-02-10 15:27 ` james palmer
@ 2021-02-12  3:16   ` Xiao-Yong Jin
  2021-02-12  7:30     ` Silas McCroskey
  0 siblings, 1 reply; 8+ messages in thread
From: Xiao-Yong Jin @ 2021-02-12  3:16 UTC (permalink / raw)
  To: 9front


> On Feb 10, 2021, at 9:27 AM, james palmer <james@biobuf.link> wrote:
> 
> Quoth sl@stanleylieber.com:
>> i'd like to document setting up cfs in the fqa. some questions:
>> 
>> - can it use a file on fat volume, or a fat volume itself
> i'd guess that this would work fine seeing as it just takes a file as an argument.
> 
>> - if not, what are the steps for creating a minimum viable cfs partition
> cfs will format the partition it is given. i use this to run cfs on a ramdisk.

I can't get it to work.

; ramfs
; dd -if /dev/zero -of /tmp/cache -bs 1m -count 32
32+0 records in
32+0 records out
; {cfs -s -dS -f /tmp/cache </srv/office &} | echo 0 >/srv/office.c
; dinit: bsize 0x0<= 0
formatting disk
formatting inodes

; mount /srv/office.c /mnt/office.c
<-client: Tversion tag 65535 msize 8216 version '9P2000'
->server: Tversion tag 65535 msize 8216 version '9P2000'
cfs: sendmsg
mount: sys: write on closed pipe pc=0x2008c6

directly use -F also does not work for me.

; dd -if /dev/zero -of /tmp/cache -bs 1m -count 32
32+0 records in
32+0 records out
; cfs -F /srv/office -dknS -f /tmp/cache /mnt/office.c
dinit: bsize 0x0<= 0
formatting disk
formatting inodes
<-client: Tversion tag 65535 msize 8216 version '9P2000'
->server: Tversion tag 65535 msize 8216 version '9P2000'
cfs: sendmsg

it seems to stuck there.
> 
>> - how does cfs= in plan9.ini interact with tls booting
> works fine for me. i enter my secstore password, cfs is run, then init runs /bin/rc.

putting the line in plan9.ini seems to work for tls boot.

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

* Re: [9front] cfs(4)
  2021-02-12  3:16   ` Xiao-Yong Jin
@ 2021-02-12  7:30     ` Silas McCroskey
  2021-02-12  8:34       ` james palmer
  2021-02-12 19:50       ` Xiao-Yong Jin
  0 siblings, 2 replies; 8+ messages in thread
From: Silas McCroskey @ 2021-02-12  7:30 UTC (permalink / raw)
  To: 9front

> > cfs will format the partition it is given. i use this to run cfs on a ramdisk.
>
> I can't get it to work.
>
> ; ramfs

ramdisk, not ramfs --

from plan9.ini(8):
        ramdiskX=size
        ramdiskX=size sectorsize
        ramdiskX=address size sectorsize
          This reserves physical memory as a ramdisk that will appear
          as sd(3) device sdZX.  When the address argument is omited
          or zero, then the ramdisk will be allocated from the top of
          physical memory.

so something like

ramdisk0=1G
cfs=#S/sdZ0

in plan9.ini. (someone correct me if any of this is wrong, I've since
reformatted my thumb drive I used to boot this way).

- sam-d

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

* Re: [9front] cfs(4)
  2021-02-12  7:30     ` Silas McCroskey
@ 2021-02-12  8:34       ` james palmer
  2021-02-12 19:50       ` Xiao-Yong Jin
  1 sibling, 0 replies; 8+ messages in thread
From: james palmer @ 2021-02-12  8:34 UTC (permalink / raw)
  To: 9front mailing list

Quoth inkswinc@gmail.com:
> 
> so something like
> 
> ramdisk0=1G
> cfs=#S/sdZ0
> 

almost. sdZ0 is a directory. you want sdZ0/data.

- james

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

* Re: [9front] cfs(4)
  2021-02-12  7:30     ` Silas McCroskey
  2021-02-12  8:34       ` james palmer
@ 2021-02-12 19:50       ` Xiao-Yong Jin
  2021-02-13  0:30         ` james palmer
  1 sibling, 1 reply; 8+ messages in thread
From: Xiao-Yong Jin @ 2021-02-12 19:50 UTC (permalink / raw)
  To: 9front


> On Feb 12, 2021, at 1:30 AM, Silas McCroskey <inkswinc@gmail.com> wrote:
> 
>>> cfs will format the partition it is given. i use this to run cfs on a ramdisk.
>> 
>> I can't get it to work.
>> 
>> ; ramfs
> 
> ramdisk, not ramfs --

What is that ramdisk provides that ramfs does not?
Is there any 9p protocol not implemented properly?

> in plan9.ini.

Like I said, putting it in plan9.ini seems to work,
but I can't figure out why running it manually does not.
What am I supposed to do?


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

* Re: [9front] cfs(4)
  2021-02-12 19:50       ` Xiao-Yong Jin
@ 2021-02-13  0:30         ` james palmer
  2021-02-13  2:35           ` Xiao-Yong Jin
  0 siblings, 1 reply; 8+ messages in thread
From: james palmer @ 2021-02-13  0:30 UTC (permalink / raw)
  To: 9front mailing list

Quoth meta.jxy@gmail.com:
> What is that ramdisk provides that ramfs does not?
> Is there any 9p protocol not implemented properly?

iirc ramfs dynamically allocates data for its files.
data that is all 0 is not stored in memory.
ramdisk reserves a section of memory and presents it as a disk device.
cfs seems to assume the ramfs file is of 0 size.

> Like I said, putting it in plan9.ini seems to work,
> but I can't figure out why running it manually does not.
> What am I supposed to do?

you are running it with -d. this enables debugging and keeps in in the foreground. it is not hung, it is waiting for a 9p connection.

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

* Re: [9front] cfs(4)
  2021-02-13  0:30         ` james palmer
@ 2021-02-13  2:35           ` Xiao-Yong Jin
  0 siblings, 0 replies; 8+ messages in thread
From: Xiao-Yong Jin @ 2021-02-13  2:35 UTC (permalink / raw)
  To: 9front


> On Feb 12, 2021, at 6:30 PM, james palmer <james@biobuf.link> wrote:
> 
> Quoth meta.jxy@gmail.com:
>> What is that ramdisk provides that ramfs does not?
>> Is there any 9p protocol not implemented properly?
> 
> iirc ramfs dynamically allocates data for its files.
> data that is all 0 is not stored in memory.
> ramdisk reserves a section of memory and presents it as a disk device.
> cfs seems to assume the ramfs file is of 0 size.

So you didn't see my dd command.

> 
>> Like I said, putting it in plan9.ini seems to work,
>> but I can't figure out why running it manually does not.
>> What am I supposed to do?
> 
> you are running it with -d. this enables debugging and keeps in in the foreground. it is not hung, it is waiting for a 9p connection.

No.

------

The actual issue is that devsrv disallows read/write
to the file if the channel is already open.
Even if I unmount, I still cannot read/write the srv file.
The following is fine.

; ramfs
; dd -if /dev/zero -of /tmp/cache -bs 1m -count 16
16+0 records in
16+0 records out
; srv 9front.org
post...
; cfs -F /srv/9front.org -dnS -f /tmp/cache
dinit: bsize 0x0<= 0
formatting disk
formatting inodes
<-client: Tversion tag 65535 msize 8216 version '9P2000'
->server: Tversion tag 65535 msize 8216 version '9P2000'
<-server: Rversion tag 65535 msize 8216 version '9P2000'
->client: Rversion tag 65535 msize 8216 version '9P2000'
<-client: Tattach tag 91 fid 1506 afid -1 uname jxy aname 
->server: Tattach tag 91 fid 1506 afid -1 uname jxy aname 
<-server: Rattach tag 91 qid (000000000000e00c 8 d)
->client: Rattach tag 91 qid (000000000000e00c 8 d)
; lc /mnt/cfs/
<-client: Twalk tag 91 fid 1506 newfid 1515 nwname 0 
->server: Twalk tag 91 fid 1506 newfid 1515 nwname 0 
<-server: Rwalk tag 91 nwqid 0 
->client: Rwalk tag 91 nwqid 0 
<-client: Tstat tag 91 fid 1515
->server: Tstat tag 91 fid 1515
<-server: Rstat tag 91  stat 'n' 'sl' 'sys' 'sl' q (000000000000e00c 8 d) m 020000000775 at 1608616529 mt 1608616529 l 0 t 77 d 62
->client: Rstat tag 91  stat 'n' 'sl' 'sys' 'sl' q (000000000000e00c 8 d) m 020000000775 at 1608616529 mt 1608616529 l 0 t 77 d 62
new file 57356.8 ino 0
<-client: Tclunk tag 36 fid 1515
->server: Tclunk tag 36 fid 1515
<-server: Rclunk tag 36
->client: Rclunk tag 36
<-client: Twalk tag 91 fid 1506 newfid 1517 nwname 0 
->server: Twalk tag 91 fid 1506 newfid 1517 nwname 0 
<-server: Rwalk tag 91 nwqid 0 
->client: Rwalk tag 91 nwqid 0 
<-client: Topen tag 91 fid 1517 mode 0
->server: Topen tag 91 fid 1517 mode 0
<-server: Ropen tag 91 qid (000000000000e00c 8 d) iounit 8192 
->client: Ropen tag 91 qid (000000000000e00c 8 d) iounit 8192 
<-client: Tread tag 91 fid 1517 offset 0 count 8192
->server: Tread tag 91 fid 1517 offset 0 count 8192
<-server: Rread tag 91 count 483 '3b004d00 3e000000 80210000 00e8ce00 00000000 00fd0100 80d07fe1 5fd07fe1 5f000000 00000000 0005006c 69737473 0200736c 03007379 73020073 6c3c004d'
->client: Rread tag 91 count 483 '3b004d00 3e000000 80210000 00e8ce00 00000000 00fd0100 80d07fe1 5fd07fe1 5f000000 00000000 0005006c 69737473 0200736c 03007379 73020073 6c3c004d'
<-client: Tread tag 91 fid 1517 offset 483 count 8192
->server: Tread tag 91 fid 1517 offset 483 count 8192
<-server: Rread tag 91 count 0 ''
->client: Rread tag 91 count 0 ''
<-client: Tclunk tag 91 fid 1517
->server: Tclunk tag 91 fid 1517
<-server: Rclunk tag 91
->client: Rclunk tag 91
9front/		extra/		fqa/		hardware/	iso/		lists/		pkg/		sites/
; unmount /mnt/cfs
; <-client: Tclunk tag 70 fid 1506
->server: Tclunk tag 70 fid 1506
<-server: Rclunk tag 70
->client: Rclunk tag 70

; rm /srv/9front.org



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

end of thread, other threads:[~2021-02-13  2:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 15:51 [9front] cfs(4) Stanley Lieber
2021-02-10 15:27 ` james palmer
2021-02-12  3:16   ` Xiao-Yong Jin
2021-02-12  7:30     ` Silas McCroskey
2021-02-12  8:34       ` james palmer
2021-02-12 19:50       ` Xiao-Yong Jin
2021-02-13  0:30         ` james palmer
2021-02-13  2:35           ` Xiao-Yong Jin

9front - general discussion about 9front

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/9front

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9front 9front/ http://inbox.vuxu.org/9front \
		9front@9front.org
	public-inbox-index 9front

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9front


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git