Re: raidframe and gpt

2024-03-16 Thread Greg Oster




On 2024-03-16 21.58, Paul Goyette wrote:

On Sat, 16 Mar 2024, Paul Goyette wrote:


Does anyone have an example of how to configure raid0 on a GPT disk?

I can easily set the partition type with gpt, but how do I reserve
space for the raid component label?  Do I need to reserve that space?


You don't need to reserve the space.  RAIDframe takes care of that.  So 
you just set the partition type appropriately, and tell RAIDframe about 
the partition...



Also, does raidframe understand the NAME=gpt-label syntax in the
config file?  Or does it require me to specify the particular dk ?
(And what happens if something moves and  changes?)


RAIDframe doesn't understand NAME=gpt-label.  Use /dev/dk , and then 
set the RAID set to autoconfigure.  It'll magically figure out what 
devices need to be glued together.



One more quuestion: the raidctl man page talks about partitioning the
raid device using mbr partitions.  Is it possible to use GPT here?
Will the resulting wedges show up automatically?


You can use GPT instead of mbr.  Wedges should show up automatically 
(I'm pretty sure they do, but since I do NFS exporting of mine, I stuck 
with MBR so the filesystem ID doesn't change every time the n in dk 
for the RAID deivce changes :( )



It seems so much simpler to use ccd(4) but there's a nasty memory
allocation bug which makes it unuseable for now.

Thanks in advance!


If you're using -current, note that you can now use:

 raidctl raid0 create mirror /dev/dk0 /dev/dk1

to do a simple RAID config without needing to use the config file...

Later...

Greg Oster


Re: raidframe and gpt

2024-03-16 Thread Michael van Elst
p...@whooppee.com (Paul Goyette) writes:

>> Does anyone have an example of how to configure raid0 on a GPT disk?

For a manual setup, you can just reference the wedges like:

# raidctl config file for /dev/rraid0

START array
# numRow numCol numSpare
1 2 0

START disks
NAME=raid0.0
NAME=raid0.1

START layout
# sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_1
128 1 1 1

START queue
fifo 100


Auto detection of a RAID works by collecting disks with valid
RAID labels into RAID sets. This also works with wedges, the
actual device or unit number is irrelevant, the RAID set is
identified by the unique serial number in the RAID label.
The serial number is specified with the -I option of raidctl.

Even booting from a RAID on GPT is possible with a recent bootloader
and an autoconfigured RAID set.


Here is more about RAID on GPT:

https://wiki.netbsd.org/users/spz/moderndisk/



>> I can easily set the partition type with gpt, but how do I reserve
>> space for the raid component label?  Do I need to reserve that space?

You don't, the components are the GPT partitions.


>> Also, does raidframe understand the NAME=gpt-label syntax in the
>> config file?  Or does it require me to specify the particular dk ?
>> (And what happens if something moves and  changes?)

I've added support for the NAME= Syntax some time ago.


>One more quuestion: the raidctl man page talks about partitioning the
>raid device using mbr partitions.  Is it possible to use GPT here?
>Will the resulting wedges show up automatically?

Whenever you create a raid device (raidN attaches), it will be
scanned for wedges like a regular disk device.

# dkctl dk4 getwedgeinfo
dk4 at raid2: tank
dk4: 4294967296 blocks at 128, type: ffs

# grep tank /etc/fstab
NAME=tank   /tank   ffs rw,log  1 2

This system configures a RAID1 of two RAID0 sets. That's not supported
by the RAID autoconfiguration, so it is created manually at boot time
and obviously the system can't boot from it.




re: raidframe and gpt

2024-03-16 Thread matthew green
Paul Goyette writes:
> Does anyone have an example of how to configure raid0 on a GPT disk?

these are my notes i refer to every so often:

https://www.netbsd.org/~mrg/gpt-raid-setup.txt

it's gpt on each with type raid, which gives you dkN @ diskN,
you then create a raid with those dkNs, and then you create
another gpt on the raid device itself, with a ffs partition.

(see below; but skip the raidN.conf method, and just use the
newer raidctl create.)

> I can easily set the partition type with gpt, but how do I reserve
> space for the raid component label?  Do I need to reserve that space?

note how i pick "-b 128" above to get my partitions aligned on
at least 64K bounaries.  nvme/sata probably wants higher (check
your disk specs, it can vary a lot, and you could go as high as
6MB alignment to catch all known alignment...)

> Also, does raidframe understand the NAME=gpt-label syntax in the
> config file?  Or does it require me to specify the particular dk ?
> (And what happens if something moves and  changes?)

NAME= works.  use autoconfig raid.. actually just use the new
in -current "raidctl create", since it does all the intro set
and good default choices.

> It seems so much simpler to use ccd(4) but there's a nasty memory
> allocation bug which makes it unuseable for now.

you can't root-on-ccd like you can root-on-raidframe :-)  you
could, using the same initrd method root-on-cgd uses.


.mrg.


Re: raidframe and gpt

2024-03-16 Thread Paul Goyette

On Sat, 16 Mar 2024, Paul Goyette wrote:


Does anyone have an example of how to configure raid0 on a GPT disk?

I can easily set the partition type with gpt, but how do I reserve
space for the raid component label?  Do I need to reserve that space?

Also, does raidframe understand the NAME=gpt-label syntax in the
config file?  Or does it require me to specify the particular dk ?
(And what happens if something moves and  changes?)


One more quuestion: the raidctl man page talks about partitioning the
raid device using mbr partitions.  Is it possible to use GPT here?
Will the resulting wedges show up automatically?


It seems so much simpler to use ccd(4) but there's a nasty memory
allocation bug which makes it unuseable for now.

Thanks in advance!

+-+--+--+
| Paul Goyette (.sig) | PGP Key fingerprint: | E-mail addresses:|
| (Retired)   | 1B11 1849 721C 56C8 F63A | p...@whooppee.com|
| Software Developer  | 6E2E 05FD 15CE 9F2D 5102 | pgoye...@netbsd.org  |
| & Network Engineer  |  | pgoyett...@gmail.com |
+-+--+--+

!DSPAM:65f65ac4122352312412431!




+-+--+--+
| Paul Goyette (.sig) | PGP Key fingerprint: | E-mail addresses:|
| (Retired)   | 1B11 1849 721C 56C8 F63A | p...@whooppee.com|
| Software Developer  | 6E2E 05FD 15CE 9F2D 5102 | pgoye...@netbsd.org  |
| & Network Engineer  |  | pgoyett...@gmail.com |
+-+--+--+


daily CVS update output

2024-03-16 Thread NetBSD source update


Updating src tree:
P src/sys/arch/ia64/include/limits.h
P src/sys/arch/mips/include/limits.h
P src/sys/arch/sparc/include/limits.h
P src/sys/dev/ic/lan9118reg.h
P src/usr.bin/kdump/kdump.c

Updating xsrc tree:


Killing core files:




Updating file list:
-rw-rw-r--  1 srcmastr  netbsd  45773578 Mar 17 03:03 ls-lRA.gz


raidframe and gpt

2024-03-16 Thread Paul Goyette

Does anyone have an example of how to configure raid0 on a GPT disk?

I can easily set the partition type with gpt, but how do I reserve
space for the raid component label?  Do I need to reserve that space?

Also, does raidframe understand the NAME=gpt-label syntax in the
config file?  Or does it require me to specify the particular dk ?
(And what happens if something moves and  changes?)

It seems so much simpler to use ccd(4) but there's a nasty memory
allocation bug which makes it unuseable for now.

Thanks in advance!

+-+--+--+
| Paul Goyette (.sig) | PGP Key fingerprint: | E-mail addresses:|
| (Retired)   | 1B11 1849 721C 56C8 F63A | p...@whooppee.com|
| Software Developer  | 6E2E 05FD 15CE 9F2D 5102 | pgoye...@netbsd.org  |
| & Network Engineer  |  | pgoyett...@gmail.com |
+-+--+--+


Re: USB hubs/controllers detached before umass devices

2024-03-16 Thread John D. Baker
On Sat, 16 Mar 2024, John D. Baker wrote:

> The only difference is that the USB devices with netbsd-10 are
> branded SanDisk and the ones with -current are branded PNY.
> 
> Still updating/checking the netbsd-10/i386 live-USB setup.

Same as my netbsd-10/amd64 live-USB setup.

Seems anything that modifies the filesystem, even something relatively
harmless like a forced 'fsck' on an already-clean file system from
single-user mode will trigger the problem when the machine is then
halted or rebooted.

Below is an example of simply allowing the system to go multi-user,
logging in and rebooting:


$ shutdown -r now ; exit
Shutdown NOW!
shutdown: [pid 1223]
wall: You have write permission turned off; no reply possible
Mar 16 20:16:44 nblive10_i386 shutdown: reboot by live: 

NetBSD/i386 (nblive10_i386) (constty)

login: Mar 16 20:16:52 nblive10_i386 syslogd[442]: Exiting on signal 15
[  75.2656479] syncing disks... done
[  75.3859144] wd5: detached
[  75.4236845] wd4: detached
[  75.4460055] wd3: detached
[  75.4860049] wd2: detached
[  75.5160043] wd1: detached
[  75.5460050] wd0: detached
[  75.5760051] uhub3: detached
[  75.6060050] uhub2: detached
[  75.6460050] uhub1: detached
[  75.6760039] uhub0: detached
[  75.7060038] inphy0: detached
[  75.7460049] fxp0: detached
[  75.7760043] audio0: detached
[  75.8060036] makphy0: detached
[  75.8460037] wm0: detached
[  75.8760037] iic0: detached
[  75.9060045] atabus2: detached
[  75.9460035] atabus1: detached
[  75.9760037] atabus0: detached
[  76.0183341] usb3: detached
[  76.0505600] usb2: detached
[  76.0827866] usb1: detached
[  76.1150118] usb0: detached
[  76.1460037] pci4: detached
[  76.1760030] pci3: detached
[  76.2060036] pci2: detached
[  76.2360028] pci1: detached
[  76.2761541] sysbeep0: detached
[  76.3060036] midi0: detached
[  76.3458067] ichsmb0: detached
[  76.3760032] uhci3: detached
[  76.4060036] uhci2: detached
[  76.4460030] uhci1: detached
[  76.4760022] uhci0: detached
[  76.5060030] ppb3: detached
[  76.5460024] ppb2: detached
[  76.5760030] ppb1: detached
[  76.6109196] ppb0: detached
[  76.6360021] sd0(umass0:0:0:0): generic HBA error
[  77.6097832] sd0a: error writing fsbn 13207857 (sd0 bn 13207858; cn 13103 tn 
0 sn 34)
[  79.5273860] sd0a: error writing fsbn 13207857 (sd0 bn 13207858; cn 13103 tn 
0 sn 34)
[  80.561] sd0a: error writing fsbn 13207858 (sd0 bn 13207859; cn 13103 tn 
0 sn 35)
[  81.4949480] sd0a: error writing fsbn 13207859 of 13207859-13207868 (sd0 bn 
13207860; cn 13103 tn 0 sn 36)
[  82.4786168] sd0a: error writing fsbn 13207869 of 13207869-13207872 (sd0 bn 
13207870; cn 13103 tn 0 sn 46)
[ 343.7188423] sd0a: error writing fsbn 13207873 (sd0 bn 13207874; cn 13103 tn 
0 sn 50)
[ 670.1236467] sd0a: error writing fsbn 13207858 (sd0 bn 13207859; cn 13103 tn 
0 sn 35)
[ 996.5184079] sd0a: error writing fsbn 13207859 of 13207859-13207868 (sd0 bn 
13207860; cn 13103 tn 0 sn 36)
[ 1322.9532457] sd0a: error writing fsbn 13207869 of 13207869-13207872 (sd0 bn 
13207870; cn 13103 tn 0 sn 46)
[ 1649.3679973] sd0a: error writing fsbn 13207873 (sd0 bn 13207874; cn 13103 tn 
0 sn 50)
[ 2176.5780366] sd0: cache synchronization failed
[ 2226.8017161] sd0: detached
[ 2226.8351744] scsibus0: detached
[ 2226.8726040] rebooting...

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: USB hubs/controllers detached before umass devices

2024-03-16 Thread John D. Baker
On Sat, 16 Mar 2024, John D. Baker wrote:

> I will try again on my live-USB drive which has -current on it.

My -current live-USB drives shutdown cleanly (amd64 and i386).

The only difference is that the USB devices with netbsd-10 are
branded SanDisk and the ones with -current are branded PNY.

Still updating/checking the netbsd-10/i386 live-USB setup.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


USB hubs/controllers detached before umass devices

2024-03-16 Thread John D. Baker
I just updated my NetBSD live-USB devices to 10.0_RC6.  They boot
successfully, but when performing an orderly shutdown, the various
uhubN and usbN devices are detached before the USB-resident filesystems
are unmounted and the underlying umassN (sdN) devices are detached.

This leaves the system hung trying to detach the sdN device but then
getting:

  sd0(umass0:0:0:0) Generic HBA error
  sd0a unable to read fsbn  (etc.)

Has anyone else seen this?  It did not happen when my live-USB had
netbsd-9 on it.

I will try again on my live-USB drive which has -current on it.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645