From: Andries Brouwer <Andries.Brouwer@cwi.nl>
To: Neil Brown <neilb@suse.de>
Cc: linux-kernel@vger.kernel.org, Andries.Brouwer@cwi.nl,
Jens Axboe <jens.axboe@oracle.com>
Subject: Re: Why aren't partitions limited to fit within the device?
Date: Fri, 13 Oct 2006 03:02:59 +0200 [thread overview]
Message-ID: <20061013010259.GA3791@apps.cwi.nl> (raw)
In-Reply-To: <17710.54489.486265.487078@cse.unsw.edu.au>
On Fri, Oct 13, 2006 at 09:50:49AM +1000, Neil Brown wrote:
> So: Is there any good reason to not clip the partitions to fit
> within the device - and discard those that are completely beyond
> the end of the device??
Almost precisely this issue came up recently.
If I recall correctly at that time the idea was to discard
partitions that do not fit on the known disk. A bad idea.
Your idea is better, namely to clip partitions.
Still, there are a few reasons why one should be careful.
One is the existence of clipped disks. There are various ways of
making a disk appear smaller than it really is - there may be
a HPA or DCO or so, or just a capacity-limiting jumper.
This may mean that the kernel does not really know the size
of the disk. The jumper may cause IDENTIFY to return a small size
while actual I/O succeeds beyond that. Or, a SETMAX command is
needed to make all of a partition available. Etc.
One is the numbering of partitions. People are very unhappy
when something causes their partitions to be renumbered.
That is an argument against the discarding.
In the forensics situation you want to take a copy of a disk.
But often that is impractical - copying this 500GB disk takes too long,
or the scratch disk is not large enough, and the copy only holds the
initial part of a disk.
You do not want to discard such partial partitions - maybe clipping is OK,
although I would prefer to see precisely the same data on the copy as on
the original, except of course that actually accessing nonexistent data
returns an I/O error, but discarding would again cause renumbering. Bad.
[As an aside: for the past twelve years or so I have muttered once a year
that it is bad that Linux does automatic probing for partitions.
It will be mistaken every now and then.
With some partition types there is a fairly large probability
that random data is seen as a partition table.
A correct system does not guess (unless asked to guess by the user).
A correct system is set up in such a way that the boot parameters tell it
1. the root disk, 2. the partition type of the root disk,
3. the root partition, 4. the filesystem type of the root filesystem.
Now the root disk can contain configuration data that causes the system
to look at specified disks in specified ways, or to do default things.
With a system that was set up correctly, your nonsense partitions
would never have been found by the kernel, and I suppose mount by label
would not have encountered any problems.]
Andries
next prev parent reply other threads:[~2006-10-13 1:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 23:50 Why aren't partitions limited to fit within the device? Neil Brown
2006-10-13 1:02 ` Andries Brouwer [this message]
2006-10-13 1:31 ` Neil Brown
2006-10-13 15:07 ` Alan Cox
2006-10-13 18:16 ` jdow
2006-10-16 0:08 ` Neil Brown
2006-10-16 1:22 ` Wakko Warner
2006-10-16 1:31 ` Randy Dunlap
2006-10-16 4:09 ` Kyle Moffett
2006-10-16 6:40 ` Andries Brouwer
2006-10-16 6:43 ` dean gaudet
2006-10-16 7:28 ` Xavier Bestel
2006-10-16 10:54 ` Alan Cox
2006-10-17 6:05 ` Chris Wedgwood
2006-10-15 8:29 ` Ville Herva
2006-10-15 23:50 ` Neil Brown
2006-10-16 5:27 ` Ville Herva
2006-10-16 6:02 ` Andries Brouwer
2006-10-16 6:20 ` Ville Herva
2006-10-16 6:27 ` dean gaudet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061013010259.GA3791@apps.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox