On Tue, Oct 04, 2005 at 05:16:10PM -0600, Erin Sharmahd wrote: > A few questions related to this and some problems I had with it in the past > > > 3) resize2fs -p /dev/whereverhomewas > > Unless I missed something that would've made my problems a lot easier, > you have to also give this a size. The problem i had was: you have to > give a buffer between the size of the filesystem and the size of the > partition. I couldn't find a good rule of thumb for what this buffer > should be, though.
This isn't true. You must have had some other problem. If you call
resize2fs without specifying a size, it queries the partition size from
the kernel and resizes the filesystem to fit within it.
Of course, if you're shrinking a filesystem, you have to specify the
size because you haven't changed the partition size yet.
In any case, there is no "buffer." Filesystems are designed to fit in
partitions, and the size of the filesystem is the size of the partition
it will fit in.
> When I did this on my old laptop, I just resized the partition and
> resized the filesystem (in opposite directions) until finally it
> booted. (I'm sure that I'm somewhat lucky in that I didn't permanently
> destroy anything in the process). I'm sure that there's got to be a
> more scientific way to figure this out though. All I had found in
> some tutorials I had looked at was that you needed a buffer...
Something sounds very, very, very wrong here. I think you're very lucky
you have any data at all. :)
You should never ever go back and forth between resizing a partition and
resizing a filesystem.
The rule of thumb is this:
Case I) You are increasing your filesystem size:
- First, increase the size of the partition.
- Second, increase the size of the filesystem.
Case II) You are decreasing your filesystem size:
- First, shrink the filesystem.
- Second, shrink the partition.
This is easy to remember when you consider that filesystem tools can't
access data outside of the partition you give them.
Did you do it backwards?
--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
pgpaCLm95WJdr.pgp
Description: PGP signature
-------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
