9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Disk Mirroring, or disk composition using fs(3)
@ 2021-06-17 23:54 Lorenzo Bivens
  2021-06-18  8:02 ` Noam Preil
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lorenzo Bivens @ 2021-06-17 23:54 UTC (permalink / raw)
  To: 9front

Hi!

I am attempting to setup a couple of disks as mirrors to store a cwfs'  fsworm partition. I am operating under the assumption that an fs(3) made disk file operates as any other disk.

Starting with two identical blank disks, here is my current process:
echo mirror md0/data /dev/sd01/data /dev/sd02/data >/dev/fs/ctl
disk/mbr -m /386/mbr /dev/md0/data # adding mbr to the mirror set correctly adds mbr to both disks
echo part md0/plan9 /dev/md0/data 0 end >/dev/fs/ctl  # correctly adds a partition to both disks
echo part md0/fsworm /dev/md0/plan9 0 end >/dev/fs/ctl # adds the fsworm subpartition

So far, so good. Now let's try the install
configfs... cwfs64x
partdisk... setup my cache drive
prepdisk... slice the cache drive with 9fat, nvram, other, and fscache
mountfs:
- /dev/sd00/fscache as fscache
- /dev/md0/fsworm as worm (manual input since no suggestions are made)
- /dev/sd00/other as other (and I am not even sure I want this...)
ream the system? (mutual assured destruction) yes
a series of
wrenwrite: block out of range w"/dev/md0/fsworm"(2)
wrenread: block out of range w"/dev/md0/fsworm"(2)
....
w"/dev/md0/fsworm" block 2 WORM SUPER BLOCK READ FAILED
...
and the rest is consequence of that

I suspect this could be a problem of assumptions. If anyone has experience with a similar disk layout... how did you make it work?

Thanks!






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

* Re: [9front] Disk Mirroring, or disk composition using fs(3)
  2021-06-17 23:54 [9front] Disk Mirroring, or disk composition using fs(3) Lorenzo Bivens
@ 2021-06-18  8:02 ` Noam Preil
  2021-06-18 19:09   ` Lorenzo Bivens
  2021-06-18  8:06 ` Noam Preil
  2021-06-18 21:22 ` [9front] " Anthony Martin
  2 siblings, 1 reply; 7+ messages in thread
From: Noam Preil @ 2021-06-18  8:02 UTC (permalink / raw)
  To: Lorenzo Bivens

You want md0 for the name, not md0/data.

that is, 
> echo mirror md0 /dev/sd01/data /dev/sd02/data >/dev/fs/ctl

That creates /dev/fs/md0, which is a raw file.
— Noam Preil 

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

* Re: [9front] Disk Mirroring, or disk composition using fs(3)
  2021-06-17 23:54 [9front] Disk Mirroring, or disk composition using fs(3) Lorenzo Bivens
  2021-06-18  8:02 ` Noam Preil
@ 2021-06-18  8:06 ` Noam Preil
  2021-06-18 21:22 ` [9front] " Anthony Martin
  2 siblings, 0 replies; 7+ messages in thread
From: Noam Preil @ 2021-06-18  8:06 UTC (permalink / raw)
  To: Lorenzo Bivens

Ignore my previous comment. It occurred to me after I sent that it was unrelated and probably wrong . i don't use cwfs and focused on the fs bit .

-Noam

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

* Re: [9front] Disk Mirroring, or disk composition using fs(3)
  2021-06-18  8:02 ` Noam Preil
@ 2021-06-18 19:09   ` Lorenzo Bivens
  0 siblings, 0 replies; 7+ messages in thread
From: Lorenzo Bivens @ 2021-06-18 19:09 UTC (permalink / raw)
  To: 9front

Thanks for your observation. As far as I know, both nomenclatures are correct.

I initially started experimenting with a single file name, with the same results. For me it is more convenient to have the “arrangement” under a unique folder rather than being with other potential arrangements under /dev/fs

________________________________________
From: Noam Preil <noam@pixelhero.dev>
Sent: Friday, June 18, 2021 1:02 AM
To: Lorenzo Bivens
Subject: Re: [9front] Disk Mirroring, or disk composition using fs(3)

You want md0 for the name, not md0/data.

that is,
> echo mirror md0 /dev/sd01/data /dev/sd02/data >/dev/fs/ctl

That creates /dev/fs/md0, which is a raw file.
— Noam Preil

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

* [9front] Re: Disk Mirroring, or disk composition using fs(3)
  2021-06-17 23:54 [9front] Disk Mirroring, or disk composition using fs(3) Lorenzo Bivens
  2021-06-18  8:02 ` Noam Preil
  2021-06-18  8:06 ` Noam Preil
@ 2021-06-18 21:22 ` Anthony Martin
  2021-06-21  5:20   ` Lorenzo Bivens
  2 siblings, 1 reply; 7+ messages in thread
From: Anthony Martin @ 2021-06-18 21:22 UTC (permalink / raw)
  To: 9front

Lorenzo Bivens <izaki@belaska.us> once said:
> echo part md0/plan9 /dev/md0/data 0 end >/dev/fs/ctl  # correctly adds a partition to both disks
> echo part md0/fsworm /dev/md0/plan9 0 end >/dev/fs/ctl # adds the fsworm subpartition

Are you using the literal word "end" here?

It should be an integer. The fs(3) device
uses strtoll to parse the argument and will
silently return 0 if it is not a number
resulting in a zero length partition. This
should probably be an error but it's rare
to manually write to /dev/fs/ctl.

Just use disk/fdisk and disk/prep to figure
out the start and length offsets for the
plan9 and fsworm partitions, respectively.

Cheers,
  Anthony

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

* Re: [9front] Re: Disk Mirroring, or disk composition using fs(3)
  2021-06-18 21:22 ` [9front] " Anthony Martin
@ 2021-06-21  5:20   ` Lorenzo Bivens
  2021-06-21  5:34     ` Lorenzo Bivens
  0 siblings, 1 reply; 7+ messages in thread
From: Lorenzo Bivens @ 2021-06-21  5:20 UTC (permalink / raw)
  To: 9front

Still stuck!

> Are you using the literal word "end" here?

I am using the word end as a placeholder for the size of the disk (sorry I reckon I should have put some bytes in there)
BUT, as a curiosity, I did try to use the word "end" now that you mentioned it... And it fails silently. Thanks for pointing to it!

________________________________________
From: Anthony Martin <ality@pbrane.org>
Sent: Friday, June 18, 2021 2:22 PM
To: 9front@9front.org
Subject: [9front] Re: Disk Mirroring, or disk composition using fs(3)

Lorenzo Bivens <izaki@belaska.us> once said:
> echo part md0/plan9 /dev/md0/data 0 end >/dev/fs/ctl  # correctly adds a partition to both disks
> echo part md0/fsworm /dev/md0/plan9 0 end >/dev/fs/ctl # adds the fsworm subpartition

Are you using the literal word "end" here?

It should be an integer. The fs(3) device
uses strtoll to parse the argument and will
silently return 0 if it is not a number
resulting in a zero length partition. This
should probably be an error but it's rare
to manually write to /dev/fs/ctl.

Just use disk/fdisk and disk/prep to figure
out the start and length offsets for the
plan9 and fsworm partitions, respectively.

Cheers,
  Anthony

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

* Re: [9front] Re: Disk Mirroring, or disk composition using fs(3)
  2021-06-21  5:20   ` Lorenzo Bivens
@ 2021-06-21  5:34     ` Lorenzo Bivens
  0 siblings, 0 replies; 7+ messages in thread
From: Lorenzo Bivens @ 2021-06-21  5:34 UTC (permalink / raw)
  To: 9front

And unstuck. The size of my partitions was off by several million bytes.

Thanks!

________________________________________
From: Lorenzo Bivens on behalf of Lorenzo Bivens <izaki@belaska.us>
Sent: Sunday, June 20, 2021 10:20 PM
To: 9front@9front.org
Subject: Re: [9front] Re: Disk Mirroring, or disk composition using fs(3)

Still stuck!

> Are you using the literal word "end" here?

I am using the word end as a placeholder for the size of the disk (sorry I reckon I should have put some bytes in there)
BUT, as a curiosity, I did try to use the word "end" now that you mentioned it... And it fails silently. Thanks for pointing to it!

________________________________________
From: Anthony Martin <ality@pbrane.org>
Sent: Friday, June 18, 2021 2:22 PM
To: 9front@9front.org
Subject: [9front] Re: Disk Mirroring, or disk composition using fs(3)

Lorenzo Bivens <izaki@belaska.us> once said:
> echo part md0/plan9 /dev/md0/data 0 end >/dev/fs/ctl  # correctly adds a partition to both disks
> echo part md0/fsworm /dev/md0/plan9 0 end >/dev/fs/ctl # adds the fsworm subpartition

Are you using the literal word "end" here?

It should be an integer. The fs(3) device
uses strtoll to parse the argument and will
silently return 0 if it is not a number
resulting in a zero length partition. This
should probably be an error but it's rare
to manually write to /dev/fs/ctl.

Just use disk/fdisk and disk/prep to figure
out the start and length offsets for the
plan9 and fsworm partitions, respectively.

Cheers,
  Anthony

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

end of thread, other threads:[~2021-06-21 19:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 23:54 [9front] Disk Mirroring, or disk composition using fs(3) Lorenzo Bivens
2021-06-18  8:02 ` Noam Preil
2021-06-18 19:09   ` Lorenzo Bivens
2021-06-18  8:06 ` Noam Preil
2021-06-18 21:22 ` [9front] " Anthony Martin
2021-06-21  5:20   ` Lorenzo Bivens
2021-06-21  5:34     ` Lorenzo Bivens

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