Re: Fun with SSD and GPT wedges

2019-02-13 Thread Greg Troxel
John Nemeth writes: > } With disklabels, when the label is scanned then the various abcdefgh > } partitions can be used. Ideally, when writing the block with the > } disklabel it would be rescanned. > > What do you mean by "rescanned"? Normally with disklabels > there are no wedges,

Re: Fun with SSD and GPT wedges

2019-02-13 Thread Greg Troxel
John Nemeth writes: > As stated before, gpt(8) is a tool for manipulating on-disk > data structures. This is outside the scope of it. Also, disklabel(8) > lets you do anything you want to a disklabel regardless of whether > the partitons are mounted. Why would you expect gpt(8) to behave

Re: Fun with SSD and GPT wedges

2019-02-13 Thread Michael van Elst
On Wed, Feb 13, 2019 at 08:42:49AM -0800, John Nemeth wrote: > > I recently changed gpt(8) to not run dkctl when it isn't > needed. Ideally one would not be destroying a GPT that contains > active wedges. Active (== in use) wedges cannot be destroy. So destroying the GPT should updated the

Re: Fun with SSD and GPT wedges

2019-02-13 Thread John Nemeth
On Feb 13, 11:56am, Michael van Elst wrote: } g...@lexort.com (Greg Troxel) writes: } } > And when destroying a GPT label, it should } >first remove each partition, and thus remove each wedge. } } Looks like gpt isn't running dkctl after destroying the GPT, } probably neither after creation or

Re: Fun with SSD and GPT wedges

2019-02-13 Thread Robert Nestor
the man page for gpt on NetBSD 8.0_STABLE in the example section shows: Booting from GPT on an BIOS system. This creates a bootable partition that can be manually installed to. Note that sysinst(8) does not yet properly support this setup. xotica# gpt create wd1

Re: Fun with SSD and GPT wedges

2019-02-13 Thread Rhialto
On Tue 12 Feb 2019 at 22:25:34 -0800, John Nemeth wrote: > On Feb 12, 7:03pm, Robert Nestor wrote: > } > } Somewhat related, but the man page on GPT in the example on how > } to set up a BIOS boot indicates that one should newfs dk?, not > } rdk?. A number of people have pointed out to me that I

Re: Fun with SSD and GPT wedges

2019-02-13 Thread Michael van Elst
rnes...@mac.com (Robert Nestor) writes: >Somewhat related, but the man page on GPT in the example on how to set up a >BIOS boot indicates that one should newfs dk?, not rdk?. A number of people >have pointed out to me that I should be running newfs on rdk?, NOT dk?. This >was probably the

Re: Fun with SSD and GPT wedges

2019-02-13 Thread Michael van Elst
g...@lexort.com (Greg Troxel) writes: >I can see how we got here, but the situation seems wrong from a logical >consistency point of view. If gpt(8) is going to create wedges on >adding a new partition, it should delete the wedge corresponding to a >partition that it removes. That's what is

Re: Fun with SSD and GPT wedges

2019-02-12 Thread Martin Husemann
On Tue, Feb 12, 2019 at 09:17:26PM -, Michael van Elst wrote: > The gpt tool learned to run 'dkctl makewedges' automatically after > making changes. Ah, I see - that is what broke sysinst. Easy to fix, thanks! Martin

Re: Fun with SSD and GPT wedges

2019-02-12 Thread John Nemeth
On Feb 12, 7:03pm, Robert Nestor wrote: } } Somewhat related, but the man page on GPT in the example on how } to set up a BIOS boot indicates that one should newfs dk?, not } rdk?. A number of people have pointed out to me that I should } be running newfs on rdk?, NOT dk?. This was probably the

Re: Fun with SSD and GPT wedges

2019-02-12 Thread John Nemeth
On Feb 13, 9:02am, Robert Elz wrote: } } Date:Tue, 12 Feb 2019 19:57:42 -0500 } From:Greg Troxel } Message-ID: } } | I can see how we got here, but the situation seems wrong from a logical } | consistency point of view. If gpt(8) is going to create wedges on }

Re: Fun with SSD and GPT wedges

2019-02-12 Thread John Nemeth
On Feb 12, 7:57pm, Greg Troxel wrote: } Robert Elz writes: } } > | but wiping the GPT header doesn’t seem to always immediately } > | free the corresponding wedges. } > } > It doesn't. You need to be aware of the logical separation here. } > GPT is a disc partitioning scheme (as are MBR

Re: Fun with SSD and GPT wedges

2019-02-12 Thread Robert Nestor
Somewhat related, but the man page on GPT in the example on how to set up a BIOS boot indicates that one should newfs dk?, not rdk?. A number of people have pointed out to me that I should be running newfs on rdk?, NOT dk?. This was probably the source of a lot of my problems, but in my

Re: Fun with SSD and GPT wedges

2019-02-12 Thread Robert Elz
Date:Tue, 12 Feb 2019 19:57:42 -0500 From:Greg Troxel Message-ID: | I can see how we got here, but the situation seems wrong from a logical | consistency point of view. If gpt(8) is going to create wedges on | adding a new partition, it should delete the

Re: Fun with SSD and GPT wedges

2019-02-12 Thread Greg Troxel
Robert Elz writes: > | but wiping the GPT header doesn’t seem to always immediately > | free the corresponding wedges. > > It doesn't. You need to be aware of the logical separation here. > GPT is a disc partitioning scheme (as are MBR and disklabel) which > divides drives into multiple

Re: Fun with SSD and GPT wedges

2019-02-12 Thread Michael van Elst
mar...@duskware.de (Martin Husemann) writes: >IMHO we should have a way to temporarily suspend kernel autoconfiguration >and let the user do all GPT changes, then turn it on again or explicitly >create them with "dkctl makewedges" (which maybe implicitly could also >turn on autodetection again).

Re: Fun with SSD and GPT wedges

2019-02-11 Thread Martin Husemann
On Mon, Feb 11, 2019 at 11:37:57PM -0800, John Nemeth wrote: > Use "-n" to prevent gpt(8) from updating wedges. No, I want to prevent the *kernel* from auto-detecting and updating wedges temporarily. Martin

Re: Fun with SSD and GPT wedges

2019-02-11 Thread John Nemeth
On Feb 12, 7:34am, Martin Husemann wrote: } } I guess part of the confusion you see is because you have a kernel } doing autoconfiguration for GPT partitions (that is automagically } creates new wedges for them if they have certain GPT types), and } explicit "dkctl makewedges" calls in your

Re: Fun with SSD and GPT wedges

2019-02-11 Thread John Nemeth
On Feb 11, 3:42pm, Robert Nestor wrote: } } I've noticed on my system that building packages is very much } I/O bound rather than CPU limited. So in an effort to try and } speed things up I decided to install a cheap SSD as a system } disk. While doing that I noticed some things and I wonder if

Re: Fun with SSD and GPT wedges

2019-02-11 Thread Martin Husemann
I guess part of the confusion you see is because you have a kernel doing autoconfiguration for GPT partitions (that is automagically creates new wedges for them if they have certain GPT types), and explicit "dkctl makewedges" calls in your script. IMHO we should have a way to temporarily suspend

Re: Fun with SSD and GPT wedges

2019-02-11 Thread Michael van Elst
rnes...@mac.com (Robert Nestor) writes: >*) GPT and DKCTL merrily allow me to create wedges that can’t be mapped >because the /dev nodes don’t exist. You can also plug in new disks (e.g. USB) without having the /dev nodes to use them. There are only a small number of nodes pre-created. Creation

Re: Fun with SSD and GPT wedges

2019-02-11 Thread Robert Elz
Date:Mon, 11 Feb 2019 15:42:56 -0600 From:Robert Nestor Message-ID: <3cdc9cf7-291f-481f-88b2-965f4dba0...@mac.com> | *) GPT and DKCTL merrily allow me to create wedges that can’t be | mapped because the /dev nodes don’t exist. There's nothing very interesting

Fun with SSD and GPT wedges

2019-02-11 Thread Robert Nestor
I’ve noticed on my system that building packages is very much I/O bound rather than CPU limited. So in an effort to try and speed things up I decided to install a cheap SSD as a system disk. While doing that I noticed some things and I wonder if they point to problems in NetBSD. I am using