Date: Thu, 28 Jun 2012 12:04:55 -0400 From: "Dieter BSD" <dieterbsd@engineer.com> To: freebsd-hackers@freebsd.org Subject: geom metadata (Re: [CFC/CFT] large changes in the loader(8) code) Message-ID: <20120628160456.287270@gmx.com>
next in thread | raw e-mail | index | archive | help
These schemes to just put the metadata in some special location and have all the tools know about it create a lot of problems. There is always some tool that doesn't know. There is always some human that doesn't know. Telling the difference between real metadata and some other data that happens to look similar. Convoluted logic that is prone to bugs. I have seen complaints from people that have lost data when some tool wrote metadata on top of it. Losing data is absolutely unacceptable. There is a time to be clever and a time to just keep it simple. Define a "FreeBSD geom metadata" GPT partition type. Create a 6 sector (3 KiB) "FreeBSD geom metadata" GPT partition just after the GPT header. PMBR pri GPT header pri GPT table FreeBSD geom metadata data partition(s) sec GPT table sec GPT header Advantages: 1) All OSes will know that this space is taken. 2) Humans looking at the GPT partition table will know that this space is taken, and what it is being used for. 3) The 1st data partition becomes 4 KiB aligned, which is important for many recent disks (yes the metadata partition is not 4K aligned, but is presumably accessed only rarely, so it is not a performance problem) Disadvantages 1) uses up a partition type 2) uses up a partition With GPT neither of these disadvantages is significant. Alternately one could make the geom metadata partition smaller and add a spaceholder partition to get 4K alignment. Yes you can just leave a hole, but putting a partition there labled "4K_alignment" makes it obvious why it is there. So, what have I missed?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120628160456.287270>