* [linux-lvm] LVM Problems :)
@ 2004-02-13 9:13 Christian Reiss
2004-02-13 9:38 ` Heinz Mauelshagen
2004-02-13 9:47 ` AJ Lewis
0 siblings, 2 replies; 14+ messages in thread
From: Christian Reiss @ 2004-02-13 9:13 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]
Greetings!
I am trying to dissolve a running LVM, so i am doing
the e2fsadm, lvreduce, pvmove thingy. But ever since I
removed the first hdd, I am unable to resize the lvm
any more. The error can be seen below, with e2fsadm.
I also included the vg&lvdisplay commands.
I am running the LVM1 sources (non-cvs, approx mid last
year), as i am unable to run LVM2 (need to downgrade kernel
to 2.4.22 (no patch included in lvm2 for 2.4.23)).
Also, I am (too dumb/unable) to locate a e2fsadm alike
tool for lvm2, as e2fsadm needs the lvm-tab thingy,
which lvm2 no longer provides.
Any help is greatly appreciated. :)
-Christian.
::::::::::::::::::
::: vgdisplay ::::
--- Volume group ---
VG Name share
VG Access read/write
VG Status available/NOT resizable
VG # 0
MAX LV 256
Cur LV 1
Open LV 1
MAX LV Size 2 TB
Max PV 256
Cur PV 11
Act PV 11
VG Size 1.12 TB
PE Size 32 MB
Total PE 36668
Alloc PE / Size 34108 / 1.04 TB
Free PE / Size 2560 / 80 GB
VG UUID PSYbaQ-bl8d-xvHp-6re2-hoKd-9mE5-Wa5Tqz
:::::::::::::::
:: lvdisplay ::
--- Logical volume ---
LV Name /dev/share/data
VG Name share
LV Write Access read/write
LV Status available
LV # 1
# open 1
LV Size 1.04 TB
Current LE 34108
Allocated LE 34108
Allocation next free
Read ahead sectors 1024
Block device 58:0
:::::::::::::
:: e2fsadm ::
e2fsadm -L-10G /dev/share/data
e2fsadm -- logical volume size for "/dev/share/data" invalid
:::::::::::
:: df -h ::
Filesystem Size Used Avail Use% Mounted on
/dev/share/data 941G 910G 32G 97% /share/filebase
--
Christian Reiss <email@demonlord.de>
demonserver.de
Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
Public Key can be obtained here: http://www.demonlord.de/pgp.txt
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 9:13 [linux-lvm] LVM Problems :) Christian Reiss
@ 2004-02-13 9:38 ` Heinz Mauelshagen
2004-02-13 12:05 ` Christian Reiss
` (2 more replies)
2004-02-13 9:47 ` AJ Lewis
1 sibling, 3 replies; 14+ messages in thread
From: Heinz Mauelshagen @ 2004-02-13 9:38 UTC (permalink / raw)
To: linux-lvm
Christian,
the size of your filesystem and logical volume differs already.
That's why e2fsadm fails.
Did you eventually run resize2fs in order to shrink the filesystem ?
Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
filesystem size is 963584GB (941GB * 1024MB/GB; check with
"tune2fs -l" and look for the block count and block size to calculate
this correctly).
In case the result shows, that your filesystem is already smaller than the LV,
lvreduce the logical volume appropriately.
Use the block count * block size result and round it up to the next PE!
Regards,
Heinz -- The LVM Guy --
On Fri, Feb 13, 2004 at 03:06:28PM +0100, Christian Reiss wrote:
> Greetings!
>
> I am trying to dissolve a running LVM, so i am doing
> the e2fsadm, lvreduce, pvmove thingy. But ever since I
> removed the first hdd, I am unable to resize the lvm
> any more. The error can be seen below, with e2fsadm.
> I also included the vg&lvdisplay commands.
>
> I am running the LVM1 sources (non-cvs, approx mid last
> year), as i am unable to run LVM2 (need to downgrade kernel
> to 2.4.22 (no patch included in lvm2 for 2.4.23)).
> Also, I am (too dumb/unable) to locate a e2fsadm alike
> tool for lvm2, as e2fsadm needs the lvm-tab thingy,
> which lvm2 no longer provides.
>
> Any help is greatly appreciated. :)
>
> -Christian.
>
>
> ::::::::::::::::::
> ::: vgdisplay ::::
>
> --- Volume group ---
> VG Name share
> VG Access read/write
> VG Status available/NOT resizable
> VG # 0
> MAX LV 256
> Cur LV 1
> Open LV 1
> MAX LV Size 2 TB
> Max PV 256
> Cur PV 11
> Act PV 11
> VG Size 1.12 TB
> PE Size 32 MB
> Total PE 36668
> Alloc PE / Size 34108 / 1.04 TB
> Free PE / Size 2560 / 80 GB
> VG UUID PSYbaQ-bl8d-xvHp-6re2-hoKd-9mE5-Wa5Tqz
>
> :::::::::::::::
> :: lvdisplay ::
>
> --- Logical volume ---
> LV Name /dev/share/data
> VG Name share
> LV Write Access read/write
> LV Status available
> LV # 1
> # open 1
> LV Size 1.04 TB
> Current LE 34108
> Allocated LE 34108
> Allocation next free
> Read ahead sectors 1024
> Block device 58:0
>
> :::::::::::::
> :: e2fsadm ::
>
> e2fsadm -L-10G /dev/share/data
> e2fsadm -- logical volume size for "/dev/share/data" invalid
>
> :::::::::::
> :: df -h ::
>
> Filesystem Size Used Avail Use% Mounted on
> /dev/share/data 941G 910G 32G 97% /share/filebase
>
>
> --
> Christian Reiss <email@demonlord.de>
> demonserver.de
>
> Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
> Public Key can be obtained here: http://www.demonlord.de/pgp.txt
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Red Hat, Inc.
Consulting Development Engineer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@RedHat.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 9:13 [linux-lvm] LVM Problems :) Christian Reiss
2004-02-13 9:38 ` Heinz Mauelshagen
@ 2004-02-13 9:47 ` AJ Lewis
1 sibling, 0 replies; 14+ messages in thread
From: AJ Lewis @ 2004-02-13 9:47 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]
On Fri, Feb 13, 2004 at 03:06:28PM +0100, Christian Reiss wrote:
> I am trying to dissolve a running LVM, so i am doing
> the e2fsadm, lvreduce, pvmove thingy. But ever since I
> removed the first hdd, I am unable to resize the lvm
> any more. The error can be seen below, with e2fsadm.
> I also included the vg&lvdisplay commands.
>
> I am running the LVM1 sources (non-cvs, approx mid last
> year), as i am unable to run LVM2 (need to downgrade kernel
> to 2.4.22 (no patch included in lvm2 for 2.4.23)).
> Also, I am (too dumb/unable) to locate a e2fsadm alike
> tool for lvm2, as e2fsadm needs the lvm-tab thingy,
> which lvm2 no longer provides.
Well, AFAIK, the 2.4.22 patches work fine with 2.4.23. As far as e2fsadm,
there is currently no equivilant for LVM2, so you have to do the resizing by
hand (shrink fs then shrink lv).
regards,
--
AJ Lewis Voice: 612-638-0500
Red Hat Inc. E-Mail: alewis@redhat.com
720 Washington Ave. SE, Suite 200
Minneapolis, MN 55414
Current GPG fingerprint = FE77 4B43 6A9B F982 A731 02FA 2BF5 7574 294A AA5A
Grab the key at: http://people.redhat.com/alewis/gpg.html or one of the
many keyservers out there...
-----Begin Obligatory Humorous Quote----------------------------------------
Computers make very fast, very accurate mistakes.
-----End Obligatory Humorous Quote------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 9:38 ` Heinz Mauelshagen
@ 2004-02-13 12:05 ` Christian Reiss
2004-02-13 12:31 ` Heinz Mauelshagen
2004-02-13 12:08 ` Christian Reiss
2004-02-13 16:14 ` Ken Fuchs
2 siblings, 1 reply; 14+ messages in thread
From: Christian Reiss @ 2004-02-13 12:05 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 6105 bytes --]
Greetings again,
Curious, I replied, but did not recive a copy of my reply,
maybe it got lost in the internet? :) Killed by a rogue lvm,
I assume ;) - If this was/is only me missing my reply, then
I am deeply sorry for spamming - not intentionally, really.
---
Hi there!
Big thanks for the very fast answer!!
Much appreciated!
Just to be VERY sure, tune2fs -l says:
tune2fs -l /dev/share/data
tune2fs 1.32 (09-Nov-2002)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: e89bf0d8-31fc-4ef0-945a-8cc4bb0c1d4c
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: filetype sparse_super large_file
Default mount options: (none)
Filesystem state: not clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 125288448
Block count: 250576896
Reserved block count: 0
Free blocks: 8128738
Free inodes: 125210458
First block: 0
Block size: 4096
Fragment size: 4096
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Filesystem created: Fri May 30 17:14:27 2003
Last mount time: Fri Feb 13 14:58:30 2004
Last write time: Fri Feb 13 14:58:30 2004
Mount count: 12
Maximum mount count: 20
Last checked: Thu Feb 12 18:53:36 2004
Check interval: 15552000 (6 months)
Next check after: Tue Aug 10 19:53:36 2004
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
----
So What lvreduce size should i use to shrink it?
I better have a guru look over it, better safe than
sorry
-Christian.
Heinz Mauelshagen wrote:
> Christian,
>
> the size of your filesystem and logical volume differs already.
> That's why e2fsadm fails.
> Did you eventually run resize2fs in order to shrink the filesystem ?
>
> Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
> filesystem size is 963584GB (941GB * 1024MB/GB; check with
> "tune2fs -l" and look for the block count and block size to calculate
> this correctly).
>
> In case the result shows, that your filesystem is already smaller
than the LV,
> lvreduce the logical volume appropriately.
>
> Use the block count * block size result and round it up to the next PE!
>
> Regards,
> Heinz -- The LVM Guy --
>
>
>
>
> On Fri, Feb 13, 2004 at 03:06:28PM +0100, Christian Reiss wrote:
>
>> Greetings!
>>
>> I am trying to dissolve a running LVM, so i am doing
>> the e2fsadm, lvreduce, pvmove thingy. But ever since I
>> removed the first hdd, I am unable to resize the lvm
>> any more. The error can be seen below, with e2fsadm.
>> I also included the vg&lvdisplay commands.
>>
>> I am running the LVM1 sources (non-cvs, approx mid last
>> year), as i am unable to run LVM2 (need to downgrade kernel
>> to 2.4.22 (no patch included in lvm2 for 2.4.23)).
>> Also, I am (too dumb/unable) to locate a e2fsadm alike
>> tool for lvm2, as e2fsadm needs the lvm-tab thingy,
>> which lvm2 no longer provides.
>>
>> Any help is greatly appreciated.
>>
>> -Christian.
>>
>>
>> ::::::::::::::::::
>> ::: vgdisplay ::::
>>
>> --- Volume group ---
>> VG Name share
>> VG Access read/write
>> VG Status available/NOT resizable
>> VG # 0
>> MAX LV 256
>> Cur LV 1
>> Open LV 1
>> MAX LV Size 2 TB
>> Max PV 256
>> Cur PV 11
>> Act PV 11
>> VG Size 1.12 TB
>> PE Size 32 MB
>> Total PE 36668
>> Alloc PE / Size 34108 / 1.04 TB
>> Free PE / Size 2560 / 80 GB
>> VG UUID PSYbaQ-bl8d-xvHp-6re2-hoKd-9mE5-Wa5Tqz
>>
>> :::::::::::::::
>> :: lvdisplay ::
>>
>> --- Logical volume ---
>> LV Name /dev/share/data
>> VG Name share
>> LV Write Access read/write
>> LV Status available
>> LV # 1
>> # open 1
>> LV Size 1.04 TB
>> Current LE 34108
>> Allocated LE 34108
>> Allocation next free
>> Read ahead sectors 1024
>> Block device 58:0
>>
>> :::::::::::::
>> :: e2fsadm ::
>>
>> e2fsadm -L-10G /dev/share/data
>> e2fsadm -- logical volume size for "/dev/share/data" invalid
>>
>> :::::::::::
>> :: df -h ::
>>
>> Filesystem Size Used Avail Use% Mounted on
>> /dev/share/data 941G 910G 32G 97% /share/filebase
>>
>>
>> --
>> Christian Reiss <email@demonlord.de>
>> demonserver.de
>>
>> Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
>> Public Key can be obtained here: http://www.demonlord.de/pgp.txt
>
>
>
> *** Software bugs are stupid.
> Nevertheless it needs not so stupid people to solve them ***
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> Heinz Mauelshagen Red Hat, Inc.
> Consulting Development Engineer Am Sonnenhang 11
> 56242 Marienrachdorf
> Germany
> Mauelshagen@RedHat.com +49 2626 141200
> FAX 924446
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Christian Reiss <email@demonlord.de>
demonserver.de
Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
Public Key can be obtained here: http://www.demonlord.de/pgp.txt
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 9:38 ` Heinz Mauelshagen
2004-02-13 12:05 ` Christian Reiss
@ 2004-02-13 12:08 ` Christian Reiss
2004-02-13 16:14 ` Ken Fuchs
2 siblings, 0 replies; 14+ messages in thread
From: Christian Reiss @ 2004-02-13 12:08 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 5672 bytes --]
Hi there!
Big thanks for the very fast answer!!
Much appreciated!
Just to be VERY sure, tune2fs -l says:
tune2fs -l /dev/share/data
tune2fs 1.32 (09-Nov-2002)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: e89bf0d8-31fc-4ef0-945a-8cc4bb0c1d4c
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: filetype sparse_super large_file
Default mount options: (none)
Filesystem state: not clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 125288448
Block count: 250576896
Reserved block count: 0
Free blocks: 8128738
Free inodes: 125210458
First block: 0
Block size: 4096
Fragment size: 4096
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Filesystem created: Fri May 30 17:14:27 2003
Last mount time: Fri Feb 13 14:58:30 2004
Last write time: Fri Feb 13 14:58:30 2004
Mount count: 12
Maximum mount count: 20
Last checked: Thu Feb 12 18:53:36 2004
Check interval: 15552000 (6 months)
Next check after: Tue Aug 10 19:53:36 2004
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
----
So What lvreduce size should i use to shrink it?
I better have a guru look over it, better safe than
sorry :)
-Christian.
Heinz Mauelshagen wrote:
> Christian,
>
> the size of your filesystem and logical volume differs already.
> That's why e2fsadm fails.
> Did you eventually run resize2fs in order to shrink the filesystem ?
>
> Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
> filesystem size is 963584GB (941GB * 1024MB/GB; check with
> "tune2fs -l" and look for the block count and block size to calculate
> this correctly).
>
> In case the result shows, that your filesystem is already smaller than the LV,
> lvreduce the logical volume appropriately.
>
> Use the block count * block size result and round it up to the next PE!
>
> Regards,
> Heinz -- The LVM Guy --
>
>
>
>
> On Fri, Feb 13, 2004 at 03:06:28PM +0100, Christian Reiss wrote:
>
>>Greetings!
>>
>>I am trying to dissolve a running LVM, so i am doing
>>the e2fsadm, lvreduce, pvmove thingy. But ever since I
>>removed the first hdd, I am unable to resize the lvm
>>any more. The error can be seen below, with e2fsadm.
>>I also included the vg&lvdisplay commands.
>>
>>I am running the LVM1 sources (non-cvs, approx mid last
>>year), as i am unable to run LVM2 (need to downgrade kernel
>>to 2.4.22 (no patch included in lvm2 for 2.4.23)).
>>Also, I am (too dumb/unable) to locate a e2fsadm alike
>>tool for lvm2, as e2fsadm needs the lvm-tab thingy,
>>which lvm2 no longer provides.
>>
>>Any help is greatly appreciated. :)
>>
>>-Christian.
>>
>>
>>::::::::::::::::::
>>::: vgdisplay ::::
>>
>>--- Volume group ---
>>VG Name share
>>VG Access read/write
>>VG Status available/NOT resizable
>>VG # 0
>>MAX LV 256
>>Cur LV 1
>>Open LV 1
>>MAX LV Size 2 TB
>>Max PV 256
>>Cur PV 11
>>Act PV 11
>>VG Size 1.12 TB
>>PE Size 32 MB
>>Total PE 36668
>>Alloc PE / Size 34108 / 1.04 TB
>>Free PE / Size 2560 / 80 GB
>>VG UUID PSYbaQ-bl8d-xvHp-6re2-hoKd-9mE5-Wa5Tqz
>>
>>:::::::::::::::
>>:: lvdisplay ::
>>
>>--- Logical volume ---
>>LV Name /dev/share/data
>>VG Name share
>>LV Write Access read/write
>>LV Status available
>>LV # 1
>># open 1
>>LV Size 1.04 TB
>>Current LE 34108
>>Allocated LE 34108
>>Allocation next free
>>Read ahead sectors 1024
>>Block device 58:0
>>
>>:::::::::::::
>>:: e2fsadm ::
>>
>>e2fsadm -L-10G /dev/share/data
>>e2fsadm -- logical volume size for "/dev/share/data" invalid
>>
>>:::::::::::
>>:: df -h ::
>>
>>Filesystem Size Used Avail Use% Mounted on
>>/dev/share/data 941G 910G 32G 97% /share/filebase
>>
>>
>>--
>>Christian Reiss <email@demonlord.de>
>>demonserver.de
>>
>>Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
>>Public Key can be obtained here: http://www.demonlord.de/pgp.txt
>
>
> *** Software bugs are stupid.
> Nevertheless it needs not so stupid people to solve them ***
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> Heinz Mauelshagen Red Hat, Inc.
> Consulting Development Engineer Am Sonnenhang 11
> 56242 Marienrachdorf
> Germany
> Mauelshagen@RedHat.com +49 2626 141200
> FAX 924446
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Christian Reiss <email@demonlord.de>
demonserver.de
Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
Public Key can be obtained here: http://www.demonlord.de/pgp.txt
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 12:05 ` Christian Reiss
@ 2004-02-13 12:31 ` Heinz Mauelshagen
2004-02-13 13:13 ` Christian Reiss
2004-02-13 16:40 ` Chris Cox
0 siblings, 2 replies; 14+ messages in thread
From: Heinz Mauelshagen @ 2004-02-13 12:31 UTC (permalink / raw)
To: linux-lvm
On Fri, Feb 13, 2004 at 06:06:59PM +0100, Christian Reiss wrote:
> Greetings again,
>
> Curious, I replied, but did not recive a copy of my reply,
> maybe it got lost in the internet? :) Killed by a rogue lvm,
> I assume ;) - If this was/is only me missing my reply, then
> I am deeply sorry for spamming - not intentionally, really.
Christian,
as long as you agree that it wasn't LVM it is no problem ;-)
>
> ---
>
> Hi there!
>
> Big thanks for the very fast answer!!
> Much appreciated!
>
> Just to be VERY sure, tune2fs -l says:
>
<SNIP>
> Block count: 250576896
<SNIP>
> Block size: 4096
<SNIP>
> So What lvreduce size should i use to shrink it?
> I better have a guru look over it, better safe than
> sorry
250576896 * 4KB / 1024MB/KB= 978816MB (which is a multiple of 32MB)
->
# lvreduce -L 978816M /dev/share/data
That should free 112640MB or 3520 PEs in your VG.
BTW: you should either run e2fsadm to grow/shrink the unmounted
filesystem _and_ the logical volume in one go
-or-
use the filesystem resizer and lvextend/lvreduce in the correct order
(lvextend + grow fs -or- shrink fs + lvreduce).
Problem with the later is getting the size arguments right ;-)
Regards,
Heinz -- The LVM Guy --
>
> -Christian.
>
> Heinz Mauelshagen wrote:
>
> > Christian,
> >
> > the size of your filesystem and logical volume differs already.
> > That's why e2fsadm fails.
> > Did you eventually run resize2fs in order to shrink the filesystem ?
> >
> > Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
> > filesystem size is 963584GB (941GB * 1024MB/GB; check with
> > "tune2fs -l" and look for the block count and block size to calculate
> > this correctly).
> >
> > In case the result shows, that your filesystem is already smaller
> than the LV,
> > lvreduce the logical volume appropriately.
> >
> > Use the block count * block size result and round it up to the next PE!
> >
> > Regards,
> > Heinz -- The LVM Guy --
> >
> >
> >
> >
> > On Fri, Feb 13, 2004 at 03:06:28PM +0100, Christian Reiss wrote:
> >
> >> Greetings!
> >>
> >> I am trying to dissolve a running LVM, so i am doing
> >> the e2fsadm, lvreduce, pvmove thingy. But ever since I
> >> removed the first hdd, I am unable to resize the lvm
> >> any more. The error can be seen below, with e2fsadm.
> >> I also included the vg&lvdisplay commands.
> >>
> >> I am running the LVM1 sources (non-cvs, approx mid last
> >> year), as i am unable to run LVM2 (need to downgrade kernel
> >> to 2.4.22 (no patch included in lvm2 for 2.4.23)).
> >> Also, I am (too dumb/unable) to locate a e2fsadm alike
> >> tool for lvm2, as e2fsadm needs the lvm-tab thingy,
> >> which lvm2 no longer provides.
> >>
> >> Any help is greatly appreciated.
> >>
> >> -Christian.
> >>
> >>
> >> ::::::::::::::::::
> >> ::: vgdisplay ::::
> >>
> >> --- Volume group ---
> >> VG Name share
> >> VG Access read/write
> >> VG Status available/NOT resizable
> >> VG # 0
> >> MAX LV 256
> >> Cur LV 1
> >> Open LV 1
> >> MAX LV Size 2 TB
> >> Max PV 256
> >> Cur PV 11
> >> Act PV 11
> >> VG Size 1.12 TB
> >> PE Size 32 MB
> >> Total PE 36668
> >> Alloc PE / Size 34108 / 1.04 TB
> >> Free PE / Size 2560 / 80 GB
> >> VG UUID PSYbaQ-bl8d-xvHp-6re2-hoKd-9mE5-Wa5Tqz
> >>
> >> :::::::::::::::
> >> :: lvdisplay ::
> >>
> >> --- Logical volume ---
> >> LV Name /dev/share/data
> >> VG Name share
> >> LV Write Access read/write
> >> LV Status available
> >> LV # 1
> >> # open 1
> >> LV Size 1.04 TB
> >> Current LE 34108
> >> Allocated LE 34108
> >> Allocation next free
> >> Read ahead sectors 1024
> >> Block device 58:0
> >>
> >> :::::::::::::
> >> :: e2fsadm ::
> >>
> >> e2fsadm -L-10G /dev/share/data
> >> e2fsadm -- logical volume size for "/dev/share/data" invalid
> >>
> >> :::::::::::
> >> :: df -h ::
> >>
> >> Filesystem Size Used Avail Use% Mounted on
> >> /dev/share/data 941G 910G 32G 97% /share/filebase
> >>
> >>
> >> --
> >> Christian Reiss <email@demonlord.de>
> >> demonserver.de
> >>
> >> Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
> >> Public Key can be obtained here: http://www.demonlord.de/pgp.txt
> >
> >
> >
> > *** Software bugs are stupid.
> > Nevertheless it needs not so stupid people to solve them ***
> >
> >
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> >
> > Heinz Mauelshagen Red Hat, Inc.
> > Consulting Development Engineer Am Sonnenhang 11
> > 56242 Marienrachdorf
> > Germany
> > Mauelshagen@RedHat.com +49 2626 141200
> > FAX 924446
> >
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> >
> > _______________________________________________
> > linux-lvm mailing list
> > linux-lvm@redhat.com
> > https://www.redhat.com/mailman/listinfo/linux-lvm
> > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>
> --
> Christian Reiss <email@demonlord.de>
> demonserver.de
>
> Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
> Public Key can be obtained here: http://www.demonlord.de/pgp.txt
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Red Hat, Inc.
Consulting Development Engineer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@RedHat.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 12:31 ` Heinz Mauelshagen
@ 2004-02-13 13:13 ` Christian Reiss
2004-02-14 5:10 ` Heinz Mauelshagen
2004-02-13 16:40 ` Chris Cox
1 sibling, 1 reply; 14+ messages in thread
From: Christian Reiss @ 2004-02-13 13:13 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 7448 bytes --]
Greetings again,
Yes, of course it was not a rogue lvm ;)
Fun is a must, eh?
Anyway,
Here is my recipe of shrinking the lvm.
I hope i got it right, now with the e2fsadm thingy:
1. unmount it
2. e2fsadm -L-(SIZE)G /dev/share/data
3. pvmove /dev/(HDD)
4. vgchange -a n ; vgchange -x y
5. vgreduce share /dev/(HDD)
6. vgchange -x n ; vgchange -a y
7. fdisk /dev/(HDD)
8. mkfs.ext2 auf /dev/(HDD)
9. Copy files to reduce data amount on LVM
10. repeat
Or am i missing anything? :)
If not, i will spent some hours of GREAT FUN
shrinking it. Ahh, the fsck's, movings and.. :)
-Christian.
BTW: Awesome support! :)
Heinz Mauelshagen wrote:
> On Fri, Feb 13, 2004 at 06:06:59PM +0100, Christian Reiss wrote:
>
>>Greetings again,
>>
>>Curious, I replied, but did not recive a copy of my reply,
>>maybe it got lost in the internet? :) Killed by a rogue lvm,
>>I assume ;) - If this was/is only me missing my reply, then
>>I am deeply sorry for spamming - not intentionally, really.
>
>
> Christian,
>
> as long as you agree that it wasn't LVM it is no problem ;-)
>
>
>>---
>>
>>Hi there!
>>
>>Big thanks for the very fast answer!!
>>Much appreciated!
>>
>>Just to be VERY sure, tune2fs -l says:
>>
>
> <SNIP>
>
>>Block count: 250576896
>
> <SNIP>
>
>>Block size: 4096
>
> <SNIP>
>
>>So What lvreduce size should i use to shrink it?
>>I better have a guru look over it, better safe than
>>sorry
>
>
> 250576896 * 4KB / 1024MB/KB= 978816MB (which is a multiple of 32MB)
>
> ->
>
> # lvreduce -L 978816M /dev/share/data
>
> That should free 112640MB or 3520 PEs in your VG.
>
>
> BTW: you should either run e2fsadm to grow/shrink the unmounted
> filesystem _and_ the logical volume in one go
> -or-
> use the filesystem resizer and lvextend/lvreduce in the correct order
> (lvextend + grow fs -or- shrink fs + lvreduce).
>
> Problem with the later is getting the size arguments right ;-)
>
>
> Regards,
> Heinz -- The LVM Guy --
>
>
>
>
>>-Christian.
>>
>>Heinz Mauelshagen wrote:
>>
>>
>>>Christian,
>>>
>>>the size of your filesystem and logical volume differs already.
>>>That's why e2fsadm fails.
>>>Did you eventually run resize2fs in order to shrink the filesystem ?
>>>
>>>Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
>>>filesystem size is 963584GB (941GB * 1024MB/GB; check with
>>>"tune2fs -l" and look for the block count and block size to calculate
>>>this correctly).
>>>
>>>In case the result shows, that your filesystem is already smaller
>>
>>than the LV,
>>
>>>lvreduce the logical volume appropriately.
>>>
>>>Use the block count * block size result and round it up to the next PE!
>>>
>>>Regards,
>>>Heinz -- The LVM Guy --
>>>
>>>
>>>
>>>
>>>On Fri, Feb 13, 2004 at 03:06:28PM +0100, Christian Reiss wrote:
>>>
>>>
>>>>Greetings!
>>>>
>>>>I am trying to dissolve a running LVM, so i am doing
>>>>the e2fsadm, lvreduce, pvmove thingy. But ever since I
>>>>removed the first hdd, I am unable to resize the lvm
>>>>any more. The error can be seen below, with e2fsadm.
>>>>I also included the vg&lvdisplay commands.
>>>>
>>>>I am running the LVM1 sources (non-cvs, approx mid last
>>>>year), as i am unable to run LVM2 (need to downgrade kernel
>>>>to 2.4.22 (no patch included in lvm2 for 2.4.23)).
>>>>Also, I am (too dumb/unable) to locate a e2fsadm alike
>>>>tool for lvm2, as e2fsadm needs the lvm-tab thingy,
>>>>which lvm2 no longer provides.
>>>>
>>>>Any help is greatly appreciated.
>>>>
>>>>-Christian.
>>>>
>>>>
>>>>::::::::::::::::::
>>>>::: vgdisplay ::::
>>>>
>>>>--- Volume group ---
>>>>VG Name share
>>>>VG Access read/write
>>>>VG Status available/NOT resizable
>>>>VG # 0
>>>>MAX LV 256
>>>>Cur LV 1
>>>>Open LV 1
>>>>MAX LV Size 2 TB
>>>>Max PV 256
>>>>Cur PV 11
>>>>Act PV 11
>>>>VG Size 1.12 TB
>>>>PE Size 32 MB
>>>>Total PE 36668
>>>>Alloc PE / Size 34108 / 1.04 TB
>>>>Free PE / Size 2560 / 80 GB
>>>>VG UUID PSYbaQ-bl8d-xvHp-6re2-hoKd-9mE5-Wa5Tqz
>>>>
>>>>:::::::::::::::
>>>>:: lvdisplay ::
>>>>
>>>>--- Logical volume ---
>>>>LV Name /dev/share/data
>>>>VG Name share
>>>>LV Write Access read/write
>>>>LV Status available
>>>>LV # 1
>>>># open 1
>>>>LV Size 1.04 TB
>>>>Current LE 34108
>>>>Allocated LE 34108
>>>>Allocation next free
>>>>Read ahead sectors 1024
>>>>Block device 58:0
>>>>
>>>>:::::::::::::
>>>>:: e2fsadm ::
>>>>
>>>>e2fsadm -L-10G /dev/share/data
>>>>e2fsadm -- logical volume size for "/dev/share/data" invalid
>>>>
>>>>:::::::::::
>>>>:: df -h ::
>>>>
>>>>Filesystem Size Used Avail Use% Mounted on
>>>>/dev/share/data 941G 910G 32G 97% /share/filebase
>>>>
>>>>
>>>>--
>>>>Christian Reiss <email@demonlord.de>
>>>>demonserver.de
>>>>
>>>>Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
>>>>Public Key can be obtained here: http://www.demonlord.de/pgp.txt
>>>
>>>
>>>
>>>*** Software bugs are stupid.
>>> Nevertheless it needs not so stupid people to solve them ***
>>>
>>>
>>
>>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>>
>>>Heinz Mauelshagen Red Hat, Inc.
>>>Consulting Development Engineer Am Sonnenhang 11
>>> 56242 Marienrachdorf
>>> Germany
>>>Mauelshagen@RedHat.com +49 2626 141200
>>> FAX 924446
>>>
>>
>>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>>
>>>_______________________________________________
>>>linux-lvm mailing list
>>>linux-lvm@redhat.com
>>>https://www.redhat.com/mailman/listinfo/linux-lvm
>>>read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>>
>>--
>>Christian Reiss <email@demonlord.de>
>>demonserver.de
>>
>>Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
>>Public Key can be obtained here: http://www.demonlord.de/pgp.txt
>
>
> *** Software bugs are stupid.
> Nevertheless it needs not so stupid people to solve them ***
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> Heinz Mauelshagen Red Hat, Inc.
> Consulting Development Engineer Am Sonnenhang 11
> 56242 Marienrachdorf
> Germany
> Mauelshagen@RedHat.com +49 2626 141200
> FAX 924446
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Christian Reiss <email@demonlord.de>
demonserver.de
Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
Public Key can be obtained here: http://www.demonlord.de/pgp.txt
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 9:38 ` Heinz Mauelshagen
2004-02-13 12:05 ` Christian Reiss
2004-02-13 12:08 ` Christian Reiss
@ 2004-02-13 16:14 ` Ken Fuchs
2004-02-14 5:18 ` Heinz Mauelshagen
2 siblings, 1 reply; 14+ messages in thread
From: Ken Fuchs @ 2004-02-13 16:14 UTC (permalink / raw)
To: linux-lvm
Heinz Mauelshagen wrote:
>the size of your filesystem and logical volume differs already.
>That's why e2fsadm fails.
>Did you eventually run resize2fs in order to shrink the filesystem ?
>Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
>filesystem size is 963584GB (941GB * 1024MB/GB; check with
>"tune2fs -l" and look for the block count and block size to calculate
>this correctly).
>In case the result shows, that your filesystem is already smaller than the LV,
>lvreduce the logical volume appropriately.
>Use the block count * block size result and round it up to the next PE!
To avoid an error in calculating the correct number of logical extents,
and possibly doing an lvreduce(8) to a size smaller than the filesystem:
Use resize_ext2(8) without a size argument. This will resize the ext2
or ext3 filesystem to be the same size as the logical volume containing
it. After doing this, e2fsadm(8) can be used to resize the filesystem
and logical volume "simultaneously" to any desired size (that can
contain the filesystem's data).
Sincerely,
Ken Fuchs <kfuchs@winternet.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 12:31 ` Heinz Mauelshagen
2004-02-13 13:13 ` Christian Reiss
@ 2004-02-13 16:40 ` Chris Cox
1 sibling, 0 replies; 14+ messages in thread
From: Chris Cox @ 2004-02-13 16:40 UTC (permalink / raw)
To: linux-lvm
Heinz Mauelshagen wrote:
...
> BTW: you should either run e2fsadm to grow/shrink the unmounted
> filesystem _and_ the logical volume in one go
> -or-
> use the filesystem resizer and lvextend/lvreduce in the correct order
> (lvextend + grow fs -or- shrink fs + lvreduce).
>
> Problem with the later is getting the size arguments right ;-)
Be overly conservative and just grow the filesystem to fill the
leftover space afterwards. So overguess on shrinking the filesystem,
choose something safe for the lv shrink, then grow the filesystem
to fill.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 13:13 ` Christian Reiss
@ 2004-02-14 5:10 ` Heinz Mauelshagen
0 siblings, 0 replies; 14+ messages in thread
From: Heinz Mauelshagen @ 2004-02-14 5:10 UTC (permalink / raw)
To: linux-lvm
On Fri, Feb 13, 2004 at 07:15:14PM +0100, Christian Reiss wrote:
> Greetings again,
>
> Yes, of course it was not a rogue lvm ;)
> Fun is a must, eh?
:)
>
> Anyway,
> Here is my recipe of shrinking the lvm.
> I hope i got it right, now with the e2fsadm thingy:
If you want to shrink a VG in order to reduce it by PVs, there's
no need to deactivate the VG (see below).
Regards,
Heinz -- The LVM Guy --
>
> 1. unmount it
> 2. e2fsadm -L-(SIZE)G /dev/share/data
> 3. pvmove /dev/(HDD)
Not needed > 4. vgchange -a n
4. vgchange -x y
> 5. vgreduce share /dev/(HDD)
Not needed > 6. vgchange -a y
6. vgchange -x n
> 7. fdisk /dev/(HDD)
> 8. mkfs.ext2 auf /dev/(HDD)
> 9. Copy files to reduce data amount on LVM
> 10. repeat
>
> Or am i missing anything? :)
> If not, i will spent some hours of GREAT FUN
> shrinking it. Ahh, the fsck's, movings and.. :)
>
> -Christian.
> BTW: Awesome support! :)
>
>
>
>
> Heinz Mauelshagen wrote:
> >On Fri, Feb 13, 2004 at 06:06:59PM +0100, Christian Reiss wrote:
> >
> >>Greetings again,
> >>
> >>Curious, I replied, but did not recive a copy of my reply,
> >>maybe it got lost in the internet? :) Killed by a rogue lvm,
> >>I assume ;) - If this was/is only me missing my reply, then
> >>I am deeply sorry for spamming - not intentionally, really.
> >
> >
> >Christian,
> >
> >as long as you agree that it wasn't LVM it is no problem ;-)
> >
> >
> >>---
> >>
> >>Hi there!
> >>
> >>Big thanks for the very fast answer!!
> >>Much appreciated!
> >>
> >>Just to be VERY sure, tune2fs -l says:
> >>
> >
> ><SNIP>
> >
> >>Block count: 250576896
> >
> ><SNIP>
> >
> >>Block size: 4096
> >
> ><SNIP>
> >
> >>So What lvreduce size should i use to shrink it?
> >>I better have a guru look over it, better safe than
> >>sorry
> >
> >
> >250576896 * 4KB / 1024MB/KB= 978816MB (which is a multiple of 32MB)
> >
> >->
> >
> ># lvreduce -L 978816M /dev/share/data
> >
> >That should free 112640MB or 3520 PEs in your VG.
> >
> >
> >BTW: you should either run e2fsadm to grow/shrink the unmounted
> > filesystem _and_ the logical volume in one go
> > -or-
> > use the filesystem resizer and lvextend/lvreduce in the correct order
> > (lvextend + grow fs -or- shrink fs + lvreduce).
> >
> > Problem with the later is getting the size arguments right ;-)
> >
> >
> >Regards,
> >Heinz -- The LVM Guy --
> >
> >
> >
> >
> >>-Christian.
> >>
> >>Heinz Mauelshagen wrote:
> >>
> >>
> >>>Christian,
> >>>
> >>>the size of your filesystem and logical volume differs already.
> >>>That's why e2fsadm fails.
> >>>Did you eventually run resize2fs in order to shrink the filesystem ?
> >>>
> >>>Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
> >>>filesystem size is 963584GB (941GB * 1024MB/GB; check with
> >>>"tune2fs -l" and look for the block count and block size to calculate
> >>>this correctly).
> >>>
> >>>In case the result shows, that your filesystem is already smaller
> >>
> >>than the LV,
> >>
> >>>lvreduce the logical volume appropriately.
> >>>
> >>>Use the block count * block size result and round it up to the next PE!
> >>>
> >>>Regards,
> >>>Heinz -- The LVM Guy --
> >>>
> >>>
> >>>
> >>>
> >>>On Fri, Feb 13, 2004 at 03:06:28PM +0100, Christian Reiss wrote:
> >>>
> >>>
> >>>>Greetings!
> >>>>
> >>>>I am trying to dissolve a running LVM, so i am doing
> >>>>the e2fsadm, lvreduce, pvmove thingy. But ever since I
> >>>>removed the first hdd, I am unable to resize the lvm
> >>>>any more. The error can be seen below, with e2fsadm.
> >>>>I also included the vg&lvdisplay commands.
> >>>>
> >>>>I am running the LVM1 sources (non-cvs, approx mid last
> >>>>year), as i am unable to run LVM2 (need to downgrade kernel
> >>>>to 2.4.22 (no patch included in lvm2 for 2.4.23)).
> >>>>Also, I am (too dumb/unable) to locate a e2fsadm alike
> >>>>tool for lvm2, as e2fsadm needs the lvm-tab thingy,
> >>>>which lvm2 no longer provides.
> >>>>
> >>>>Any help is greatly appreciated.
> >>>>
> >>>>-Christian.
> >>>>
> >>>>
> >>>>::::::::::::::::::
> >>>>::: vgdisplay ::::
> >>>>
> >>>>--- Volume group ---
> >>>>VG Name share
> >>>>VG Access read/write
> >>>>VG Status available/NOT resizable
> >>>>VG # 0
> >>>>MAX LV 256
> >>>>Cur LV 1
> >>>>Open LV 1
> >>>>MAX LV Size 2 TB
> >>>>Max PV 256
> >>>>Cur PV 11
> >>>>Act PV 11
> >>>>VG Size 1.12 TB
> >>>>PE Size 32 MB
> >>>>Total PE 36668
> >>>>Alloc PE / Size 34108 / 1.04 TB
> >>>>Free PE / Size 2560 / 80 GB
> >>>>VG UUID PSYbaQ-bl8d-xvHp-6re2-hoKd-9mE5-Wa5Tqz
> >>>>
> >>>>:::::::::::::::
> >>>>:: lvdisplay ::
> >>>>
> >>>>--- Logical volume ---
> >>>>LV Name /dev/share/data
> >>>>VG Name share
> >>>>LV Write Access read/write
> >>>>LV Status available
> >>>>LV # 1
> >>>># open 1
> >>>>LV Size 1.04 TB
> >>>>Current LE 34108
> >>>>Allocated LE 34108
> >>>>Allocation next free
> >>>>Read ahead sectors 1024
> >>>>Block device 58:0
> >>>>
> >>>>:::::::::::::
> >>>>:: e2fsadm ::
> >>>>
> >>>>e2fsadm -L-10G /dev/share/data
> >>>>e2fsadm -- logical volume size for "/dev/share/data" invalid
> >>>>
> >>>>:::::::::::
> >>>>:: df -h ::
> >>>>
> >>>>Filesystem Size Used Avail Use% Mounted on
> >>>>/dev/share/data 941G 910G 32G 97% /share/filebase
> >>>>
> >>>>
> >>>>--
> >>>>Christian Reiss <email@demonlord.de>
> >>>>demonserver.de
> >>>>
> >>>>Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
> >>>>Public Key can be obtained here: http://www.demonlord.de/pgp.txt
> >>>_______________________________________________
> >>>linux-lvm mailing list
> >>>linux-lvm@redhat.com
> >>>https://www.redhat.com/mailman/listinfo/linux-lvm
> >>>read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> >>--
> >>Christian Reiss <email@demonlord.de>
> >>demonserver.de
> >>
> >>Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
> >>Public Key can be obtained here: http://www.demonlord.de/pgp.txt
> >_______________________________________________
> >linux-lvm mailing list
> >linux-lvm@redhat.com
> >https://www.redhat.com/mailman/listinfo/linux-lvm
> >read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>
> --
> Christian Reiss <email@demonlord.de>
> demonserver.de
>
> Key fingerprint = 2999 B7CD A218 06DF D658 5BE3 18B6 B232 02FF 71B2
> Public Key can be obtained here: http://www.demonlord.de/pgp.txt
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Red Hat, Inc.
Consulting Development Engineer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@RedHat.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-13 16:14 ` Ken Fuchs
@ 2004-02-14 5:18 ` Heinz Mauelshagen
2004-02-15 12:59 ` Ken Fuchs
0 siblings, 1 reply; 14+ messages in thread
From: Heinz Mauelshagen @ 2004-02-14 5:18 UTC (permalink / raw)
To: linux-lvm
Ken,
the missing task was to shrink the LV.
On Fri, Feb 13, 2004 at 03:23:41PM -0600, Ken Fuchs wrote:
> Heinz Mauelshagen wrote:
>
> >the size of your filesystem and logical volume differs already.
> >That's why e2fsadm fails.
> >Did you eventually run resize2fs in order to shrink the filesystem ?
>
> >Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
> >filesystem size is 963584GB (941GB * 1024MB/GB; check with
> >"tune2fs -l" and look for the block count and block size to calculate
> >this correctly).
>
> >In case the result shows, that your filesystem is already smaller than the LV,
> >lvreduce the logical volume appropriately.
>
> >Use the block count * block size result and round it up to the next PE!
>
> To avoid an error in calculating the correct number of logical extents,
> and possibly doing an lvreduce(8) to a size smaller than the filesystem:
>
> Use resize_ext2(8) without a size argument. This will resize the ext2
> or ext3 filesystem to be the same size as the logical volume containing
> it. After doing this, e2fsadm(8) can be used to resize the filesystem
> and logical volume "simultaneously" to any desired size (that can
> contain the filesystem's data).
>
> Sincerely,
>
> Ken Fuchs <kfuchs@winternet.com>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Red Hat, Inc.
Consulting Development Engineer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@RedHat.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-14 5:18 ` Heinz Mauelshagen
@ 2004-02-15 12:59 ` Ken Fuchs
2004-02-16 4:27 ` Heinz Mauelshagen
0 siblings, 1 reply; 14+ messages in thread
From: Ken Fuchs @ 2004-02-15 12:59 UTC (permalink / raw)
To: linux-lvm
Heinz Mauelshagen wrote:
>the missing task was to shrink the LV.
Yes, I know. The following does that (indirectly):
# resize_ext2 /<LV path>
Without the size argument this command resizes the ext2 or ext3
filesystem to fit the LV (obviating the need to calculate a new size of
the LV that fits the filesystem size which may not even be optimal if
the filesystem size is not a multiple of the extent size).
# e2fsadm --size <desired size> /<LV path>
or
# e2fsadm --extents <desired size in extents> /<LV path>
Used to resize the LV and ext2 or ext3 filesystem in a single step.
The whole point of the above two step sequence is to avoid the
possibility of miscalculating the new size of the LV when using
lvreduce(8). It is a safer, though longer way to effectively do a
lvreduce(8) or lvextent(8) when the contained filesystem is ext2 or
ext3.
In my opinion, this is a better solution when one is uncertain about the
correct size to use with lvreduce(8) to shrink the LV to fit either an
ext2 or ext3 filesystem.
The previous message is quoted below.
Sincerely,
Ken Fuchs <kfuchs@winternet.com>
>On Fri, Feb 13, 2004 at 03:23:41PM -0600, Ken Fuchs wrote:
>> Heinz Mauelshagen wrote:
>>
>> >the size of your filesystem and logical volume differs already.
>> >That's why e2fsadm fails.
>> >Did you eventually run resize2fs in order to shrink the filesystem ?
>>
>> >Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
>> >filesystem size is 963584GB (941GB * 1024MB/GB; check with
>> >"tune2fs -l" and look for the block count and block size to calculate
>> >this correctly).
>>
>> >In case the result shows, that your filesystem is already smaller than the LV,
>> >lvreduce the logical volume appropriately.
>>
>> >Use the block count * block size result and round it up to the next PE!
>>
>> To avoid an error in calculating the correct number of logical extents,
>> and possibly doing an lvreduce(8) to a size smaller than the filesystem:
>>
>> Use resize_ext2(8) without a size argument. This will resize the ext2
>> or ext3 filesystem to be the same size as the logical volume containing
>> it. After doing this, e2fsadm(8) can be used to resize the filesystem
>> and logical volume "simultaneously" to any desired size (that can
>> contain the filesystem's data).
>>
>> Sincerely,
>>
>> Ken Fuchs <kfuchs@winternet.com>
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>--
>
>Regards,
>Heinz -- The LVM Guy --
>
>*** Software bugs are stupid.
> Nevertheless it needs not so stupid people to solve them ***
>
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>Heinz Mauelshagen Red Hat, Inc.
>Consulting Development Engineer Am Sonnenhang 11
> 56242 Marienrachdorf
> Germany
>Mauelshagen@RedHat.com +49 2626 141200
> FAX 924446
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>_______________________________________________
>linux-lvm mailing list
>linux-lvm@redhat.com
>https://www.redhat.com/mailman/listinfo/linux-lvm
>read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-15 12:59 ` Ken Fuchs
@ 2004-02-16 4:27 ` Heinz Mauelshagen
2004-02-16 18:10 ` Ken Fuchs
0 siblings, 1 reply; 14+ messages in thread
From: Heinz Mauelshagen @ 2004-02-16 4:27 UTC (permalink / raw)
To: linux-lvm
On Sun, Feb 15, 2004 at 12:09:46PM -0600, Ken Fuchs wrote:
> Heinz Mauelshagen wrote:
>
> >the missing task was to shrink the LV.
>
> Yes, I know. The following does that (indirectly):
>
> # resize_ext2 /<LV path>
That would grow the FS back to the LV size, not shrink it down to the FS size
which is the intention in this particular case.
>
> Without the size argument this command resizes the ext2 or ext3
> filesystem to fit the LV (obviating the need to calculate a new size of
> the LV that fits the filesystem size which may not even be optimal if
> the filesystem size is not a multiple of the extent size).
>
> # e2fsadm --size <desired size> /<LV path>
>
> or
>
> # e2fsadm --extents <desired size in extents> /<LV path>
>
> Used to resize the LV and ext2 or ext3 filesystem in a single step.
>
> The whole point of the above two step sequence is to avoid the
> possibility of miscalculating the new size of the LV when using
> lvreduce(8). It is a safer, though longer way to effectively do a
> lvreduce(8) or lvextent(8) when the contained filesystem is ext2 or
> ext3.
I know. I wrote it ;)
The FS was smaller than the LV already due to some unknown problem.
>
> In my opinion, this is a better solution when one is uncertain about the
> correct size to use with lvreduce(8) to shrink the LV to fit either an
> ext2 or ext3 filesystem.
Absolutely users should prefer using e2fsadm doing LV + ext2/ext3 resizing
(presumably they can, because the FS and LV have the same size).
Regards,
Heinz -- The LVM Guy --
>
> The previous message is quoted below.
>
> Sincerely,
>
> Ken Fuchs <kfuchs@winternet.com>
>
>
> >On Fri, Feb 13, 2004 at 03:23:41PM -0600, Ken Fuchs wrote:
> >> Heinz Mauelshagen wrote:
> >>
> >> >the size of your filesystem and logical volume differs already.
> >> >That's why e2fsadm fails.
> >> >Did you eventually run resize2fs in order to shrink the filesystem ?
> >>
> >> >Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
> >> >filesystem size is 963584GB (941GB * 1024MB/GB; check with
> >> >"tune2fs -l" and look for the block count and block size to calculate
> >> >this correctly).
> >>
> >> >In case the result shows, that your filesystem is already smaller than the LV,
> >> >lvreduce the logical volume appropriately.
> >>
> >> >Use the block count * block size result and round it up to the next PE!
> >>
> >> To avoid an error in calculating the correct number of logical extents,
> >> and possibly doing an lvreduce(8) to a size smaller than the filesystem:
> >>
> >> Use resize_ext2(8) without a size argument. This will resize the ext2
> >> or ext3 filesystem to be the same size as the logical volume containing
> >> it. After doing this, e2fsadm(8) can be used to resize the filesystem
> >> and logical volume "simultaneously" to any desired size (that can
> >> contain the filesystem's data).
> >>
> >> Sincerely,
> >>
> >> Ken Fuchs <kfuchs@winternet.com>
> >>
> >> _______________________________________________
> >> linux-lvm mailing list
> >> linux-lvm@redhat.com
> >> https://www.redhat.com/mailman/listinfo/linux-lvm
> >> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> >
> >--
> >
> >Regards,
> >Heinz -- The LVM Guy --
> >
> >*** Software bugs are stupid.
> > Nevertheless it needs not so stupid people to solve them ***
> >
> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> >
> >Heinz Mauelshagen Red Hat, Inc.
> >Consulting Development Engineer Am Sonnenhang 11
> > 56242 Marienrachdorf
> > Germany
> >Mauelshagen@RedHat.com +49 2626 141200
> > FAX 924446
> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> >
> >_______________________________________________
> >linux-lvm mailing list
> >linux-lvm@redhat.com
> >https://www.redhat.com/mailman/listinfo/linux-lvm
> >read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> >
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Red Hat, Inc.
Consulting Development Engineer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@RedHat.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [linux-lvm] LVM Problems :)
2004-02-16 4:27 ` Heinz Mauelshagen
@ 2004-02-16 18:10 ` Ken Fuchs
0 siblings, 0 replies; 14+ messages in thread
From: Ken Fuchs @ 2004-02-16 18:10 UTC (permalink / raw)
To: linux-lvm
>> Heinz Mauelshagen wrote:
>> >the missing task was to shrink the LV.
>On Sun, Feb 15, 2004 at 12:09:46PM -0600, Ken Fuchs wrote:
>> Yes, I know. The following does that (indirectly):
>>
>> # resize_ext2 /<LV path>
Sorry, I didn't make it clear that the above command is only the first
of a two command sequence. The second command of the sequence as
posted earlier and quoted further down in this message was:
# e2fsadm --extents <desired size in extents> /<LV path>
Heinz Mauelshagen wrote:
>That would grow the FS back to the LV size, not shrink it down to the FS size
>which is the intention in this particular case.
Actually, as I recall (also implied by quoted text at the end of this
message), the person who started this thread wanted to use e2fsadm(8) to
resize a ext2/ext3 filesystem/logical volume, but e2fsadm failed
complaining that the filesystem was smaller than the logical volume.
There are at least three potential solutions to this problem:
1) Grow the ext2/ext3 filesystem to fit the logical volume using
resize_ext2(8). The default FS size for resize_ext2 is the
containing block device size, making this a safe and easy solution.
# resize_ext2 /<LV path>
2) Shrink the LV to fit the current ext2/ext3 filesystem size, but
lvreduce(8) has no awareness of the containing filesystem (if any)
and thus can't have an option to reduce the logical volume to the fit
the containing filesystem.
# lvreduce --extents `<command that computes size in extents>` /<LV path>
3) Modify e2fsadm(8), so rather than failing when the ext2/ext3
filesystem is initially smaller than the containing LV, it issues a
warning and optionally asks whether or not to proceed. This or a
similar solution is probably the best.
Shrinking the LV size down to the _exact_ size of the FS may not even be
possible if the filesystem size is not an even multiple of the extent
size of the containing VG. Thus, growing the (ext2 or ext3) filesystem
to fit the current LV size using resize_ext2(8) may be a better
preliminary step to using e2fsadm(8), since an ext2/ext3 filesystem has
a finer granularity than LVM.
The entire previous message is quoted below.
Sincerely,
Ken Fuchs <kfuchs@winternet.com>
------------------------------------------------------------------------
>On Sun, Feb 15, 2004 at 12:09:46PM -0600, Ken Fuchs wrote:
>> Heinz Mauelshagen wrote:
>>
>> >the missing task was to shrink the LV.
>>
>> Yes, I know. The following does that (indirectly):
>>
>> # resize_ext2 /<LV path>
>
>That would grow the FS back to the LV size, not shrink it down to the FS size
>which is the intention in this particular case.
>
>>
>> Without the size argument this command resizes the ext2 or ext3
>> filesystem to fit the LV (obviating the need to calculate a new size of
>> the LV that fits the filesystem size which may not even be optimal if
>> the filesystem size is not a multiple of the extent size).
>>
>> # e2fsadm --size <desired size> /<LV path>
>>
>> or
>>
>> # e2fsadm --extents <desired size in extents> /<LV path>
>>
>> Used to resize the LV and ext2 or ext3 filesystem in a single step.
>>
>> The whole point of the above two step sequence is to avoid the
>> possibility of miscalculating the new size of the LV when using
>> lvreduce(8). It is a safer, though longer way to effectively do a
>> lvreduce(8) or lvextent(8) when the contained filesystem is ext2 or
>> ext3.
>
>I know. I wrote it ;)
>
>The FS was smaller than the LV already due to some unknown problem.
>
>>
>> In my opinion, this is a better solution when one is uncertain about the
>> correct size to use with lvreduce(8) to shrink the LV to fit either an
>> ext2 or ext3 filesystem.
>
>Absolutely users should prefer using e2fsadm doing LV + ext2/ext3 resizing
>(presumably they can, because the FS and LV have the same size).
>
>Regards,
>Heinz -- The LVM Guy --
>
>
>>
>> The previous message is quoted below.
>>
>> Sincerely,
>>
>> Ken Fuchs <kfuchs@winternet.com>
>>
>>
>> >On Fri, Feb 13, 2004 at 03:23:41PM -0600, Ken Fuchs wrote:
>> >> Heinz Mauelshagen wrote:
>> >>
>> >> >the size of your filesystem and logical volume differs already.
>> >> >That's why e2fsadm fails.
>> >> >Did you eventually run resize2fs in order to shrink the filesystem ?
>> >>
>> >> >Your logical volume size is 1091456MB (32MB/PE * 34108 PE) but your
>> >> >filesystem size is 963584GB (941GB * 1024MB/GB; check with
>> >> >"tune2fs -l" and look for the block count and block size to calculate
>> >> >this correctly).
>> >>
>> >> >In case the result shows, that your filesystem is already smaller than the LV,
>> >> >lvreduce the logical volume appropriately.
>> >>
>> >> >Use the block count * block size result and round it up to the next PE!
>> >>
>> >> To avoid an error in calculating the correct number of logical extents,
>> >> and possibly doing an lvreduce(8) to a size smaller than the filesystem:
>> >>
>> >> Use resize_ext2(8) without a size argument. This will resize the ext2
>> >> or ext3 filesystem to be the same size as the logical volume containing
>> >> it. After doing this, e2fsadm(8) can be used to resize the filesystem
>> >> and logical volume "simultaneously" to any desired size (that can
>> >> contain the filesystem's data).
>> >>
>> >> Sincerely,
>> >>
>> >> Ken Fuchs <kfuchs@winternet.com>
>> >>
>> >> _______________________________________________
>> >> linux-lvm mailing list
>> >> linux-lvm@redhat.com
>> >> https://www.redhat.com/mailman/listinfo/linux-lvm
>> >> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>> >
>> >--
>> >
>> >Regards,
>> >Heinz -- The LVM Guy --
>> >
>> >*** Software bugs are stupid.
>> > Nevertheless it needs not so stupid people to solve them ***
>> >
>> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>> >
>> >Heinz Mauelshagen Red Hat, Inc.
>> >Consulting Development Engineer Am Sonnenhang 11
>> > 56242 Marienrachdorf
>> > Germany
>> >Mauelshagen@RedHat.com +49 2626 141200
>> > FAX 924446
>> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>> >
>> >_______________________________________________
>> >linux-lvm mailing list
>> >linux-lvm@redhat.com
>> >https://www.redhat.com/mailman/listinfo/linux-lvm
>> >read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>> >
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>*** Software bugs are stupid.
> Nevertheless it needs not so stupid people to solve them ***
>
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>Heinz Mauelshagen Red Hat, Inc.
>Consulting Development Engineer Am Sonnenhang 11
> 56242 Marienrachdorf
> Germany
>Mauelshagen@RedHat.com +49 2626 141200
> FAX 924446
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>_______________________________________________
>linux-lvm mailing list
>linux-lvm@redhat.com
>https://www.redhat.com/mailman/listinfo/linux-lvm
>read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2004-02-16 23:11 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-13 9:13 [linux-lvm] LVM Problems :) Christian Reiss
2004-02-13 9:38 ` Heinz Mauelshagen
2004-02-13 12:05 ` Christian Reiss
2004-02-13 12:31 ` Heinz Mauelshagen
2004-02-13 13:13 ` Christian Reiss
2004-02-14 5:10 ` Heinz Mauelshagen
2004-02-13 16:40 ` Chris Cox
2004-02-13 12:08 ` Christian Reiss
2004-02-13 16:14 ` Ken Fuchs
2004-02-14 5:18 ` Heinz Mauelshagen
2004-02-15 12:59 ` Ken Fuchs
2004-02-16 4:27 ` Heinz Mauelshagen
2004-02-16 18:10 ` Ken Fuchs
2004-02-13 9:47 ` AJ Lewis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.