Re: Still cant talk to USD ports
tgru...@gmail.com (Todd Gruhn) writes: >Is it possible to tell the system to access port-x as a USB-3 or USB-2 port ? You could probably add a feature to disable USB-3 functionality for a port. On older systems the xhci controller only supports USB-3 and the USB-2 functionality is provided by a separate ehci controller. Shouldn't be difficult to disable USB-3 there. On newer systems the xhci controller learned to talk USB-2 as well. I'm not sure if you can disable USB-3 there without disabling USB-2 at the same time.
Re: backspace in wscons console sends ^H to processes
On Mon, 19 Jul 2021, Greg Troxel wrote: "Paul W. Rankin" writes: Out of mere curiosity, how might I retain all this behaviour and also have C-h erase in `cat`, if that is possible? I don't see that as possible, and I have no idea why you would want that. Once you have the key that is logically the delete key sending DEL as original ASCII intended, you just use that for delete, don't use any BS key, and type C-H in emacs for help. What are you trying to accomplish with this? Or are you asking "is there some way to have multiple characters function as erase in the tty"? FreeBSD does this. It has `erase' and `erase2' which are set to `^?' and `^H' in the vt(4) console: ``` $ stty -a speed 9600 baud; 34 rows; 113 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl tab0 -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf rtsdtr cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; eol2 = ; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; ``` -RVP
Confused about setting up MATE desktop
Hi I'm building MATE from pkgsrc 2021Q2 in a VirtualBox machine (amd64) and so far so good. However, I realize that I'm probably missing a lot of steps and I'm not having great luck finding out what all I need to build, enable or add to rc.conf. Dbus is an obvious one, but after that I have no idea. Can anyone fill me in on what configuration steps I need to take after building and installing meta-pkgs/mate? Additionally, I'm not able to find a mixer app or applet to adjust the sound volume from the desktop (or even cli) -it looks like one's not included? What should I build and install ? Thanks!
Re: backspace in wscons console sends ^H to processes
First of all, as another comment - it wasn't really a DEC vs. anyone else with regards to BS vs DEL. DG for example also used DEL (and there were more). But using DEL pretty much just comes naturally from the teletype, so if anyone wants to argue that BS would be more natural than DEL really needs to go back and look at a teletype, and see that it's clearly not the case there. And I guess this reply isn't really as much a comment directly to you, Michael, as a general followup on the topic. But it had to come somewhere... On 2021-07-19 23:34, Michael van Elst wrote: b...@update.uu.se (Johnny Billquist) writes: No idea why they decided on using BS. With teletypes you couldn't "backspace", a DEL would usually print something like a black rectangle or echo the previous character. You can get something similar with 'stty -echoe echoprt' (unless you have a too modern shell that resets the terminal driver). IBM didn't use teletypes. Or at least not uses using ASCII. And DEL is an ASCII character. My point was really that IBM using BS on the PC did not come from their mainframe world, since they didn't even use ASCII on their mainframes... And the teletype itself don't print anything when you send a DEL. DEL was sometimes used as a filler character, if you didn't use NUL. Any kind of echoing when a DEL was sent to a computer was done by the computer echoing back the previous character or whatever. But anyway. The big point is that teletypes actually just had a key labelled "rubout". That key did send a DEL character, though. So obviously, it was pretty natural for any systems back in that day to adopt this by interpreting the DEL character as the user had pressed rubout, and when the user pressed rubout, he was most likely wanting to rub out the character he just typed. When other terminals came around, the convention of using DEL to indicate that you wanted to rub out characters were already established from the teletype, and it was pretty natural to just continue doing the same. The notion of "backspacing" and then overwriting the input probably comes from video displays. And there I only remember the use of BS to erase the last character and move the cursor left while DEL was erasing the character under the cursor and shift the remainder of the line. Yes, using BS most likely came with some manufacturers when video terminals started showing up. But it also meant breaking with an already well established convention. Very unfortunate, if you ask me, and it continues to be an issue to this day. But before IBM did that on the PC, it was a bit uncommon to see BS used for this. But since then, it has become very predominant. I still change my systems back to using DEL everywhere, because I prefer this. But each one to his own. I don't feel a need to mess others up just because I disagree with them. Others obviously feel different about the topic. The original VT100 also chose to have a Backspace and a Delete key next to each other. Yes. And DEC software used BS as a sort of complement to TAB sometimes. So BS was also still possible to have on VT200 and newer terminals, if you ran them in VT100-compatible mode. But I also always configure things around so that that key sends DEL everywhere I am. The majority of all systems nowadays seem to agree on using BS (0x08) for the Backarrow key. USB uses BS, PS/2 uses DEL, but which is older? :) I'd say the teletype beats them all. :-) RedHat once tried to force everything to use DEL, but it probably didn't work out as the patches are gone. Forcing everything to use BS is probably as futile. Agreed. Just let people use whatever they prefer. (Even going back to the Unix # and @ if they really want to.) I have a theory that only emacs users nowadays want it to send DEL so that they can use BS for "Help". Well, anyone using some other operating systems might also want things differently... N.B. The original VT100 also had a linefeed key. Now try to imagine how the world would look like if Richard Stallman had been a Wordstar lover where LF (Ctrl-J) was the help function. Emacs tried, when possible, to use keys which did have some natural association with the function. Thus ^H for HELP actually is sortof proper. ^J is not. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: Still cant talk to USD ports
YES -- on that particular memory-stick, I had not other partitions. But I always told 'mount' to use sd0a. " USB-3.0 and USB-2.0 are logically and physically separate systems that just share the same connector " SOO, how do I differentiate between the two? On the outside of my box, my USB-3.0 ports have a blue tongue inside; my USB-3.1 port has a red tongue; and the orginal ports (USB-1 ?) have a back tongue. Does it matter? Is it possible to tell the system to access port-x as a USB-3 or USB-2 port ? On Mon, Jul 19, 2021 at 5:46 PM Michael van Elst wrote: > > tgru...@gmail.com (Todd Gruhn) writes: > > >HMMM. I stuck a memory stick in a USB-3.0 port connected to the > >motherboard. > > >I did: > > >mount /dev/sd0 /umass1 > > >it worked. But why didnt I need to specify partition 'a' ? > > /dev/sd0 is the same as /dev/sd0d (the raw partition on x86 platform). > > If that works then you probably don't have any partitioning at all > and both sd0d and sd0e represent the whole disk. > > > >If I stuck the stick in tha USB-3,0 port, why did it work? USB-3.0 > >configured as USB-2? > > USB-3.0 and USB-2.0 are logically and physically separate systems > that just share the same connector (one uses the pins on the lower > side, the other uses the pins on the upper side). For your host > adapter that's two separate ports, but usually only one is active. >
Re: ZFS RAIDZ2 and wd uncorrectable data error - why does ZFS not notice the hardware error?
On Sun, 18 Jul 2021 at 00:30, Greg Troxel wrote: > > [snip] > > Ah, interesting point. I find this confusing, because I thought an > uncorrectable read error would, for disks I've dealt with, cause the > sector to be marked as permanently failed and pending reallocation. > It depends where the failure occurs I expect. A drive could read just fine, but then a damaged cable may cause enough noise that the data doesn't always make it to the controller correctly. > I also didn't realize that wd(4) would issue aother read when there is a > failure, but maybe that's in zfs glue code. > wd has retried for years I think, it certanly used to do that with the soft RAID code. Looks to be set at 5 in the source[1], if I'm looking in the right place. :D I expect if you just use wd devices for ZFS there may be some merit in setting the retries to 1 and letting ZFS deal with it, it'd stop the slow I/O, with the effect of ZFS failing the drive. [snip] > >>5 200 140 yes online positiveReallocated sector count0 > > > > I was expecting to see this value greater than 0 if the drive was > > failing, is the drive bad or the cabling? > > Sectors get marked as failed, and then they actually get reallocated > when you write. > I bet after a dd of /dev/zero that will go up. This is useful to know!. :) Ian 1. https://github.com/NetBSD/src/blob/05082e19134c05f2f4b6eca73223cdc6b5ab09bf/sys/dev/ata/wd.c#L94
Re: Still cant talk to USD ports
tgru...@gmail.com (Todd Gruhn) writes: >HMMM. I stuck a memory stick in a USB-3.0 port connected to the >motherboard. >I did: >mount /dev/sd0 /umass1 >it worked. But why didnt I need to specify partition 'a' ? /dev/sd0 is the same as /dev/sd0d (the raw partition on x86 platform). If that works then you probably don't have any partitioning at all and both sd0d and sd0e represent the whole disk. >If I stuck the stick in tha USB-3,0 port, why did it work? USB-3.0 >configured as USB-2? USB-3.0 and USB-2.0 are logically and physically separate systems that just share the same connector (one uses the pins on the lower side, the other uses the pins on the upper side). For your host adapter that's two separate ports, but usually only one is active.
Re: backspace in wscons console sends ^H to processes
b...@update.uu.se (Johnny Billquist) writes: >No idea why they decided on using BS. With teletypes you couldn't "backspace", a DEL would usually print something like a black rectangle or echo the previous character. You can get something similar with 'stty -echoe echoprt' (unless you have a too modern shell that resets the terminal driver). The notion of "backspacing" and then overwriting the input probably comes from video displays. And there I only remember the use of BS to erase the last character and move the cursor left while DEL was erasing the character under the cursor and shift the remainder of the line. The original VT100 also chose to have a Backspace and a Delete key next to each other. >But I also always configure things around so that that key sends DEL >everywhere I am. The majority of all systems nowadays seem to agree on using BS (0x08) for the Backarrow key. USB uses BS, PS/2 uses DEL, but which is older? :) RedHat once tried to force everything to use DEL, but it probably didn't work out as the patches are gone. Forcing everything to use BS is probably as futile. I have a theory that only emacs users nowadays want it to send DEL so that they can use BS for "Help". N.B. The original VT100 also had a linefeed key. Now try to imagine how the world would look like if Richard Stallman had been a Wordstar lover where LF (Ctrl-J) was the help function.
Re: backspace in wscons console sends ^H to processes
Date:Mon, 19 Jul 2021 08:49:31 -0400 From:Greg Troxel Message-ID: | As additional background, IMHO all of this confusion arose from the | differing setups of DEC computers and the IBM PC. It is older than that. | On a real terminal as | one would have used with a PDP-11 or VAX in the 70s/80s/early-90s, "Real terminals" existed long before PDP-11's or VAXen. They had keys that struck paper and made marks. On those backspace moved backwards a character, and typing something else overstruck the previous character (sometimes intentionally, often just making a mess). Delete did nothing at all. Some of those paper terminals also had paper tape punches and readers. This allowed "off line" preparation of input, or messages (these terminals were used for telex / telegraph type operations, more than computers, computers just needed something for interactive input, that is something different than punched cards, and these were available). When preparing a punched paper tape, to erase a mistaken character, one relied on "delete does nothing" along with "delete is 0x7f", which when converted to even parity format, is 0xFF, and since a "1" was recorded on the tape as a hole, punching a delete changed whatever was there before into the delete code (all rows punched), which, as above, did nothing. But to overstrike the previous character, one needed first to move backwards to be over it - that was what a "backspace" accomplished. So, on "real terminals" the sequence to erase the previous character was "backspace delete", and yes, the user had to type both of them - and to erase two characters, one needed backspace backspace delete delete (etc). When "glass ttys" started to become popular, their manufacturers initially provided both keys - but computer systems wouldn't require users to type both chars, but different systems picked differently. Some used DEL (most Digital OS's did that), others used BSP (most other systems, since that was the thing that worked easiest on a glass tty - overstriking was destructive, so to replace one char with another one simply did "backspace, replacement". But DEC had settled on DEL as the preferred choice before glass ttys (or the "modern" form, Tektronix had a storage scope kind of thing, which was more like a paper terminal, just without paper) were invented. Unix used # for the erase character, as on a paper terminal you could see that, count how many # chars, and mentally erase that number of previous other characters (and @ was the line kill character, DEL was "interrupt"). Many unix users (but not all) had come from a DEC background, and in particular a lot of BSD users, where there was "VMS vs BSD unix" type competition all over the place. So when BSD changed the defaults from # and @, they picked the DEC convention (DEL ^U ^C) - which irritated non-DEC users a bit (like me) who used non-DEC glass terminals, with BSP in a convenient location, and DEL somewhere obscure (more obscure, usually smaller key). Never mind, it was user configurable (had been since the very early days, at least for erase and kill - interrupt and quit were not configurable initially - which was one reason many people in the early days used BSP for erase, DEL remained hard wired as interrupt). | That led, I think, i386 unix (386BSD, then early NetBSD) to let the key | send ^H and configure erase to ^H, breaking emacs That alone IMO is the biggest feature. Anything that breaks emacs, even in trivial ways like this, is GOOD. | I don't see that as possible, and I have no idea why you would want | that. Once you have the key that is logically the delete key sending | DEL as original ASCII intended, It certainly intended nothing of the kind, DEL was "deleted" just as NUL was "never entered" (empty space on the paper tape where nothing had been punched). Both were simply ignored and had no effect whatever (and so could be used for padding characters after sending something which the terminal would take a long time to execute, like carriage-return or line feed. If you ever actually used paper tape (I did) the last thing you'd ever want was for DEL to start being interpreted as anything other than "nothing here". On the other hand, as backspace never (usually) ever got onto the tape, it changed its position instead, that one turns out to be a nice choice for the erase character (paper tapes don't need it - the erasing is already done). That using ^H (BSP) as erase screws emacs users is just a bonus point. | What are you trying to | accomplish with this? Or are you asking "is there some way to have | multiple characters function as erase in the tty"? But that's a good question. The tty driver (which is all you get when you're in cat - unlike in a program which uses libedit or readline, or similar where all this is done in those libraries, or in the program itself) has exactly one erase character - you can set it to anything you
Re: cgd + zfs
On Sun, 18 Jul 2021 at 09:29, Pouya Tafti wrote: > > Thanks! This is an interesting suggestion. I'm > > wondering though, wouldn't having a two-drive mirror create > > an assymmetry in how many failed drives you could tolerate? > > If you lost both mirrors the whole pool would be gone (I > > assume disks of the same origin may have correlated > > failures). > > > > But as you say, the 6x RAIDZ2 is worth considering and > > it may be smarter not to use all the disks. ;) > On Mon, Jul 19, 2021 at 10:16:15AM +0100, David Brownlee wrote: > Well the 6x RAIDZ2 gives the same usable space, leaving the simple > mirror for some additional scratch space for less critical data :) Ah, that indeed makes sense. I originally misunderstood and thought you were suggesting a single pool made of a RAIDZ2 and a mirror VDEV. I think I'll follow your approach with a 6x RAIDZ2. If I need more space later on I can always add another disk array. Thanks again for the suggestion! :)
Re: backspace in wscons console sends ^H to processes
Just as an FYI, it was not an IBM thing in general, since IBM didn't usually even use ASCII. (Hello EBCDIC.) No idea why they decided on using BS. But I also always configure things around so that that key sends DEL everywhere I am. Johnny On 2021-07-19 14:49, Greg Troxel wrote: "Paul W. Rankin" writes: Based on our chats in #netbsd, I currently have in a wscons.conf mapfile: keycode 57 = Cmd1 Control_L keycode 42 = Cmd_ResetEmul Delete BackSpace And stty -a reveals erase=^? (without intervention on my part). This setup allows me to have the backspace key erase in both tty and `cat` et al. and have C-h call help in Emacs. As additional background, IMHO all of this confusion arose from the differing setups of DEC computers and the IBM PC. On a real terminal as one would have used with a PDP-11 or VAX in the 70s/80s/early-90s, the key in the upper right that humans push to get rid of the last character is labeled Delete or similar and sends ASCII DEL. Some terminals had a backspace key that sent ASCII BS, but BS was an output carriage control character, and this key was often in the upper left, near the 1 and ~. The IBM PC keybaord has a backarrow key in the upper right, where Delete ought to be, and that world had it send BS (^H). I don't know if that was IBM mainframe culture, or an IBM PC invention, or something else. That led, I think, i386 unix (386BSD, then early NetBSD) to let the key send ^H and configure erase to ^H, breaking emacs help compared to using a real computer :-) I've always tried to remap keys back to 'the key that is where Delete should be sends ASCII DEL and erase is DEL'. Out of mere curiosity, how might I retain all this behaviour and also have C-h erase in `cat`, if that is possible? I don't see that as possible, and I have no idea why you would want that. Once you have the key that is logically the delete key sending DEL as original ASCII intended, you just use that for delete, don't use any BS key, and type C-H in emacs for help. What are you trying to accomplish with this? Or are you asking "is there some way to have multiple characters function as erase in the tty"? Greg -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: backspace in wscons console sends ^H to processes
"Paul W. Rankin" writes: > Based on our chats in #netbsd, I currently have in a wscons.conf > mapfile: > > keycode 57 = Cmd1 Control_L > keycode 42 = Cmd_ResetEmul Delete BackSpace > > And stty -a reveals erase=^? (without intervention on my part). > > This setup allows me to have the backspace key erase in both tty and > `cat` et al. and have C-h call help in Emacs. As additional background, IMHO all of this confusion arose from the differing setups of DEC computers and the IBM PC. On a real terminal as one would have used with a PDP-11 or VAX in the 70s/80s/early-90s, the key in the upper right that humans push to get rid of the last character is labeled Delete or similar and sends ASCII DEL. Some terminals had a backspace key that sent ASCII BS, but BS was an output carriage control character, and this key was often in the upper left, near the 1 and ~. The IBM PC keybaord has a backarrow key in the upper right, where Delete ought to be, and that world had it send BS (^H). I don't know if that was IBM mainframe culture, or an IBM PC invention, or something else. That led, I think, i386 unix (386BSD, then early NetBSD) to let the key send ^H and configure erase to ^H, breaking emacs help compared to using a real computer :-) I've always tried to remap keys back to 'the key that is where Delete should be sends ASCII DEL and erase is DEL'. > Out of mere curiosity, how might I retain all this behaviour and also > have C-h erase in `cat`, if that is possible? I don't see that as possible, and I have no idea why you would want that. Once you have the key that is logically the delete key sending DEL as original ASCII intended, you just use that for delete, don't use any BS key, and type C-H in emacs for help. What are you trying to accomplish with this? Or are you asking "is there some way to have multiple characters function as erase in the tty"? Greg signature.asc Description: PGP signature
Re: Still cant talk to USD ports
HMMM. I stuck a memory stick in a USB-3.0 port connected to the motherboard. I did: mount /dev/sd0 /umass1 it worked. But why didnt I need to specify partition 'a' ? If I stuck the stick in tha USB-3,0 port, why did it work? USB-3.0 configured as USB-2? Is it even possible to use USB-3.0. I am now confused... On Mon, Jul 19, 2021 at 1:53 AM Michael van Elst wrote: > > tgru...@gmail.com (Todd Gruhn) writes: > > >I just upgraded to the latest version of NETBSD-HEAD. > > >When I do: > >mount /dev/sd0a /umass1 OR > >mount /dev/sd1a /umass1 > >I get 'device not configured. > > >When I execute mount -t msdos /dev/sd0e /umass1 > >I can access the Windoze-configured memory stick. > > Sure, a disk with no BSD disklabel but an MBR gets the > 4 primary MBR partitions as 'e'..'h' and extended MBR > partitions starting at 'i'. > > > > > >I can still do: > >fswebcam -r 640x480 output.jpeg > >That partic device needs to connected to the USB-3.1 port > > >xhci0 at pci0 dev 20 function 0: Intel 300 Series USB 3.1 xHCI (rev. 0x10) > >xhci0: 64-bit DMA > >xhci0: interrupting at msi1 vec 0 > >xhci0: xHCI version 1.10 > >usb0 at xhci0: USB revision 3.1 > >usb1 at xhci0: USB revision 2.0 > > >uhub0 at usb0: NetBSD (0x) xHCI root hub (0x), class 9/0, rev > >3.00/1.00, addr 0 > >uhub0: 10 ports with 10 removable, self powered > >uhub1 at usb1: NetBSD (0x) xHCI root hub (0x), class 9/0, rev > >2.00/1.00, addr 0 > >uhub1: 16 ports with 16 removable, self powered > > You have internally 10 USB3 ports and 16 USB2 ports. > > > >uvideo0 at uhub1 port 1 configuration 1 interface 0: vendor 046d (0x046d) > >product 0807 (0x0807), rev 2.00/0.09, addr 1 > >video0 at uvideo0: vendor 046d (0x046d) product 0807 (0x0807), rev > >2.00/0.09, addr 1 > >uaudio0 at uhub1 port 1 configuration 1 interface 2 > >uaudio0: vendor 046d (0x046d) product 0807 (0x0807), rev 2.00/0.09, addr 1 > >uaudio0: audio rev 1.00 > >audio1 at uaudio0: capture > >audio1: slinear_le:16 1ch 48000Hz, blk 11760 bytes (122.5ms) for recording > > That's your camera connected to USB2 port 1. > > > >uhub2 at uhub1 port 9: vendor 05e3 (0x05e3) USB Hub (0x0604), class 9/0, rev > >1.10/3.05, addr 2 > >uhub2: 4 ports with 4 removable, self powered > > That's a USB2 hub connected to USB2 port 9. > > > >uhidev0 at uhub2 port 2 configuration 1 interface 0 > >uhidev0: Logitech (0x046d) USB Receiver (0xc52b), rev 2.00/12.11, addr 3, > >iclass 3/1 > >ukbd0 at uhidev0 > >uhidev1 at uhub2 port 2 configuration 1 interface 1 > >uhidev1: Logitech (0x046d) USB Receiver (0xc52b), rev 2.00/12.11, addr 3, > >iclass 3/1 > >uhidev1: 8 report ids > >ums0 at uhidev1 reportid 2: 16 buttons, W and Z dirs > >uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0 > >uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0 > >uhid2 at uhidev1 reportid 8: input=1, output=0, feature=0 > >uhidev2 at uhub2 port 2 configuration 1 interface 2 > >uhidev2: Logitech (0x046d) USB Receiver (0xc52b), rev 2.00/12.11, addr 3, > >iclass 3/0 > >uhidev2: 33 report ids > >uhid3 at uhidev2 reportid 16: input=6, output=6, feature=0 > >uhid4 at uhidev2 reportid 17: input=19, output=19, feature=0 > >uhid5 at uhidev2 reportid 32: input=14, output=14, feature=0 > >uhid6 at uhidev2 reportid 33: input=31, output=31, feature=0 > > That's a Logitech wireless keyboard/mouse/touchpad connected to that hub. > > > >umass0 at uhub2 port 3 configuration 1 interface 0 > >umass0: Generic (0x14cd) Mass Storage Device (0x125d), rev 2.00/1.00, addr 4 > >umass0: using SCSI over Bulk-Only > > That's a USB disk or stick connected to that hub. > > > >umass1 at uhub1 port 11 configuration 1 interface 0 > >umass1: Generic (0x14cd) Mass Storage Device (0x125d), rev 2.00/1.00, addr 5 > >umass1: using SCSI over Bulk-Only > > That's a USB disk or stick connected to USB2 port 11. > > Nothing uses USB3 in this configuration. >
Re: cgd + zfs
On Sun, 18 Jul 2021 at 09:29, Pouya Tafti wrote: > > On Thu, Jul 15, 2021 at 11:43:55AM +0100, David Brownlee wrote: > > Depending on your upgrade plans you may want to consider one 6x1TB > > RAIDZ2 rather than 2 4x1TB RAIDZ2 - you end up with the same amount of > > usable space and you have two spare bays for when the time comes to > > upgrade. (This suggestion is much relevant if you have other systems > > where you can easily hook up a 4 drive RAIDZ2, but not a 6 drive > > RAIDZ2 :-p) > > > > I have a somewhat similar setup on a Dell T320 - SAS9217-8i with 8 > > drives (plus one on onboard ahcisata), 6 in a RAIDZ2, two in a zfs > > mirror and one for boot > > Thanks! This is an interesting suggestion. I'm wondering though, wouldn't > having a two-drive mirror create an assymmetry in how many failed drives you > could tolerate? If you lost both mirrors the whole pool would be gone (I > assume disks of the same origin may have correlated failures). > > But as you say, the 6x RAIDZ2 is worth considering and it may be smarter not > to use all the disks. ;) Well the 6x RAIDZ2 gives the same usable space, leaving the simple mirror for some additional scratch space for less critical data :) David
Re: backspace in wscons console sends ^H to processes
On Sat, Jul 17, 2021 at 11:17:55PM -, Michael van Elst wrote: > > Nothing changed recently, and the tty driver never changed. > > Can you check if you run the 'tset' program during login ? > No tset anywhere but I can't reproduce this now, it could be a quirk due to a new kernel and old userland dunno. -- Brett Lymn -- Sent from my NetBSD device. "We are were wolves", "You mean werewolves?", "No we were wolves, now we are something else entirely", "Oh"
Re: backspace in wscons console sends ^H to processes
On 2021-07-17 21:29, mlelstv serpens ! de wrote: The keyboard sends character codes. USB keyboards send keycode 42 for the Backspace key and the default ukbd keymap translates this into ASCII code 0x08. PS/2 keyboards send keycode 14 for the Backspace key and the default pckbd keymap translates this into ASCII code 0x7f. The tty driver interprets several characters in canon mode for editing. With stty erase ^H you tell it to 'backspace' when receiving 0x08. With stty erase '^?' you tell it to 'backspace' when receiving 0x7f. This is what you see when running 'cat'. Editors and line-editing libraries or shells run the tty driver in raw or cbreak mode and handle editing on their own. They either copy the behaviour of the tty driver by reading the tty driver settings, or use some hard encoded mapping (often 0x08 and 0x7f are then treated the same) or have a custom configuration. That's why you can edit your shell commands despite getting a ^H from the keyboard while the tty driver is configured for ^?. The tty driver settings are usually set within some login script, either by calling the stty program or by running tset. tset gets its information from the termcap/terminfo database where it looks up an entry for the environment variable TERM. TERM can come from different sources, the default value for a console login comes from /etc/ttys, remote logins usually inherit it from the client. Some other programs also get their information from termcap/terminfo which has the disadvantage that every computer has its own database which might be wrong for remote connections if both computers do not agree. That's often true for e.g. xterm and the reason why xterm can be configured to override the termcap/terminfo database. Graphical programs (other than terminal emulators) usually do not use a tty. So all the above may not have any meaning for them. X11 has an old method (xmodmap) and a new method (xinput) to handle keyboard mappings and semantics, but that's another story. Sorry for the delay, I messaged from off-list so only just saw this. Thank you Michael for such an in-depth explanation :) Based on our chats in #netbsd, I currently have in a wscons.conf mapfile: keycode 57 = Cmd1 Control_L keycode 42 = Cmd_ResetEmul Delete BackSpace And stty -a reveals erase=^? (without intervention on my part). This setup allows me to have the backspace key erase in both tty and `cat` et al. and have C-h call help in Emacs. Out of mere curiosity, how might I retain all this behaviour and also have C-h erase in `cat`, if that is possible? Thank you for all your help!