Intro: Disk and partition management with NetBSD
The NetBSD Project
Status: Closed
Time to complete: 192 hrs
Mentors: Martin Husemann, Julian Coleman, Julian Fagir
Additionally to the gpt and mbr confusion, NetBSD has two other systems that add complexity to disk management: Disk wedges (dk(4)) and Unix disklabels (disklabel(5)).
You should write an article that introduces the reader to these systems, how they interact, and what their use cases are. You should also mention how they interact with additional disk subsystems like cgd(4) and ccd(4).
Uploaded Work
| File name/URL | File size | Date submitted | |
|---|---|---|---|
| Introduction to disk and partition management with NetBSD.txt | 4.2 KB | December 29 2012 00:34 UTC | |
| Introduction to disk and partition management with NetBSD (1).txt | 5.6 KB | January 02 2013 08:58 UTC |
I would like to work on this task.
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
This task has been assigned to Ashish. You have 192 hours to complete this task, good luck!
I understood the second part of the question but the part which is "Additionally to the gpt and mbr confusion, NetBSD has two other systems that add complexity to disk management: Disk wedges (dk(4)) and Unix disklabels (disklabel(5))." i dont get it Please help me get a grasp at it !!
This is a bit tricky.
Conceptually you can divide "slicing" of a disk into two parts:
Historically these have been a bit mangled and both called "disklabel" - but actually there is a (sometimes slightly variying from arch to arch) on-disk "disklabel" structure, and a disklabel structure used inside the kernel.
Nowadays you can separate those two parts - in which case the second item is called a "wedge" and you have multiple choises for the first one. A typicall example is the GUID Partition Table, gpt, which is manipulated from userland with the http://netbsd.gw.com/cgi-bin/man-cgi?gpt++NetBSD-current tool.
The runtime device for a "part" of the disk is http://netbsd.gw.com/cgi-bin/man-cgi?dk+4+NetBSD-current and you can add or remove them with http://netbsd.gw.com/cgi-bin/man-cgi?dkctl++NetBSD-current.
The interaction (and additional tools available) is what you should describe in your article.
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
This task has been assigned to JuanJe. You have 192 hours to complete this task, good luck!
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
This task has been assigned to hackpert. You have 192 hours to complete this task, good luck!
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
This task has been assigned to Kliment. You have 192 hours to complete this task, good luck!
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
This task has been assigned to Hobn. You have 192 hours to complete this task, good luck!
I've uploaded what I have so far but I'm still confused over wedges. Are they "secret" partitions not listed on the main partition table but somewhere else, thus following its own format? Wouldn't something following the main partition table unintentionally write over the wedge, in that case? That's sort of the idea I get from these old mails (here and here), but Martin Husemann's comment makes me think it's something of a partition table. Do wedges contain actual data or is it just a table of where things are?
A wedge is just a "kernel-internal" partition. You create a wedge which then points to certain blocks on the disk.
Wedges in NetBSD are used in conjunction with the GPT. Think of something like this: The GPT defines partitions, but they have no representation to the kernel. Instead, wedges are assigned for each of the GPT partitions. You would end up with having e.g. dk1 for the first partition, dk2 for the second, etc.
But you could also use wedges for anything else where you want to partition disks without actually writing a partition table to the disk. It gives you the opportunity to use a count of blocks on the hard disk of your choice as a separate block device.
Are disk wedges limited to use with GPT? Can they be used with MBR or disklabel or maybe even an empty disk with no partition table?
They are not limited to GPT, but they are used for them. For MBRs and disklabels, the kernel has a representation (which is the disk numbering scheme sd0a, sd0b, ... and sd0e, ... for MBR partitions). You could of course assign wedges to partitions as well, but you could also assign wedges to empty disks, right.
If you look at the dkctl(8) manpage, then the command `addwedge` allows you to specify a start block and the block count. This is exactly what it does. A disk wedge refers to a sequential count of blocks.
GPT just assigns the disk wedges automatically.
The work on this task is ready to be reviewed.
Thank you! The article is fine so far, there's just one major caveat:
A ccd is just a concatenation of disks as compared to a raid0 which "churns" two disks together. You won't get extra data security or performance except for special use cases, but just a larger block device, and it has the chance to save some data even when one disk failed.
Anyway, you did well. If you liked the disk representation things, you could also have a look at these tasks. They are more practical, but you will also gain knowledge about how a computer boots:
Congratulations, this task has been completed successfully.