1 |
On Wed, Apr 2, 2008 at 2:13 AM, Alan McKinnon <alan.mckinnon@×××××.com> |
2 |
wrote: |
3 |
|
4 |
> On Tuesday 01 April 2008, fei huang wrote: |
5 |
> > thank you for the reply, actually I've heard about this solution, and |
6 |
> > tried to use resize2fs to expand my filesystem (ext3), the problem is |
7 |
> > I didn't know how to use it, what does the "new size" parameter mean? |
8 |
> > the additional size or the new complete size? and the device must be |
9 |
> > a partition rather than the whole disk, otherwise, it complains "Bad |
10 |
> > magic number in super-block", and for a partition, it complains size |
11 |
> > not match or too large. any ideas? |
12 |
> |
13 |
> You have to resize the "thing" on which the filesystem resides. In other |
14 |
> words, this is the first parameter you would supply when mounting it. |
15 |
> If your filesystem is a whole disk, then you resize the disk. If it's a |
16 |
> partition, then supply the partition device node as parameter. Similar |
17 |
> with LVM volumes, raid volumes or whatever other gadget your filesystem |
18 |
> is on. |
19 |
> |
20 |
> resize2fs is quite smart, if you don't supply a size, it expands the |
21 |
> filesystem to take up the entire device. Let's say the filesystem is |
22 |
> on /dev/sda3, you would then just do: |
23 |
> |
24 |
> resize2fs /dev/sda3 |
25 |
> |
26 |
> Don't worry about unmounting the device or anything like that, growing a |
27 |
> filesystem can be done live and on-line |
28 |
> |
29 |
|
30 |
I think this probably only works in the case that the raw free space is |
31 |
phyically located beside the specified partition, imagine there are sda1, |
32 |
sda2 in sequence, when new space |
33 |
available, resize only possible to sda2, and with a disk with 4 primary |
34 |
partitions, this won't help either.. am I right? ~ |
35 |
|
36 |
resize didn't work for me, I backup my data, and recreated the partition |
37 |
with a new size, old way but make more sense to me. thanks so much, I'll try |
38 |
it later in another VM in my office. |
39 |
|
40 |
regards |
41 |
fei |
42 |
|
43 |
|
44 |
> -- |
45 |
> Alan McKinnon |
46 |
> alan dot mckinnon at gmail dot com |
47 |
> |
48 |
> -- |
49 |
> gentoo-user@l.g.o mailing list |
50 |
> |
51 |
> |