linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] lvreduce
@ 2001-09-18  9:09 G'abor Luk'acs
  2001-09-18 10:20 ` Heinz J . Mauelshagen
  0 siblings, 1 reply; 9+ messages in thread
From: G'abor Luk'acs @ 2001-09-18  9:09 UTC (permalink / raw)
  To: Linux-LVM

Hi,


I am in the process of installin Linux 8.0, and I have downloaded and
compiled lvm version 1.0, I patched the kernel, compiled it, etc. So
everything semes to work, except for one thing: lvreduce somehow damages
the whole volume group in a way that it becomes inconsistent.

Everything else seems to work fine, so I really cannot understand why it
is happening. The whole message of lvreduce seems to be strange a bit:

when I am redicing an LV when it is enabled then it askes for
confirmation, but when I disabled it just to see what happens, it wrote me
that since it is not active I cannot reduce it.

I am completely aware to the fact that first I have to resize the FS
inside, but it is not the question, as resize2fs seems to work pefectly
well.

Somehow my feeling is that something is wroking with the consistency
checking mechanism.

I would really apprecaite if you could advise me about it.


I am looking forward to hearing from you.


Thanks in advance,

Gabor Lukacs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] lvreduce
  2001-09-18  9:09 [linux-lvm] lvreduce G'abor Luk'acs
@ 2001-09-18 10:20 ` Heinz J . Mauelshagen
  0 siblings, 0 replies; 9+ messages in thread
From: Heinz J . Mauelshagen @ 2001-09-18 10:20 UTC (permalink / raw)
  To: linux-lvm

G'abor,

the warning lvreduce displays is ment to make the user aware, that the end
of the LV, which could still hold valid data, will be dropped.

BTW: you can avoid the confirmation with "lvreduce -f".

On Tue, Sep 18, 2001 at 05:09:36AM -0400, G'abor Luk'acs wrote:
> Hi,
> 
> 
> I am in the process of installin Linux 8.0, and I have downloaded and
> compiled lvm version 1.0, I patched the kernel, compiled it, etc. So
> everything semes to work, except for one thing: lvreduce somehow damages
> the whole volume group in a way that it becomes inconsistent.

What does vgck tell you about it?

> 
> Everything else seems to work fine, so I really cannot understand why it
> is happening. The whole message of lvreduce seems to be strange a bit:
> 
> when I am redicing an LV when it is enabled then it askes for
> confirmation, but when I disabled it just to see what happens, it wrote me
> that since it is not active I cannot reduce it.
> 
> I am completely aware to the fact that first I have to resize the FS
> inside, but it is not the question, as resize2fs seems to work pefectly
> well.

Alright.

> 
> Somehow my feeling is that something is wroking with the consistency
> checking mechanism.
> 
> I would really apprecaite if you could advise me about it.
> 
> 
> I am looking forward to hearing from you.
> 
> 
> Thanks in advance,
> 
> Gabor Lukacs
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [linux-lvm] lvreduce
@ 2003-06-26 11:37 Bradley M Alexander
  2003-06-27  4:41 ` Heinz J . Mauelshagen
  0 siblings, 1 reply; 9+ messages in thread
From: Bradley M Alexander @ 2003-06-26 11:37 UTC (permalink / raw)
  To: linux-lvm

I ran across this today, and wanted some clarification if I could. I am
running kernel 2.4.21 and lvm 1.0.7.

I needed to resize a partition, reducing it by 1GB. As I have done in the
past, went into single user mode, umounted the partition did a
resize_reiserfs -s-1GB /dev/vg00/var

This went fine, then I tried to reduce the size of the lv, using 
lvreduce -L-1G /dev/vg00/var

lvreduce -- WARNING: Reducing active logical volume to 1 GB
lvreduce -- THIS MAY DESTROY YOUR DATA (filesystem etc.)
lvreduce -- do you really want to reduce "/dev/vg00/var"? [y/n]:

Isn't the -L-1G option for lvreduce supposed to reduce the lv _by_ the
requested amount rather than _to_ that size? If specify -L1G, that should
be an absolute value rather than a relative value.

Am I missing something here? Would this be better addressed to the Debian
maintainer for the lvm tools?

Thanks,
-- 
--Brad
============================================================================
Bradley M. Alexander                |
gTLD SysAdmin, Security Engineer    |   storm [at] tux.org
Debian/GNU Linux Developer          |   storm [at] debian.org
============================================================================
Key fingerprints:
DSA 0x54434E65: 37F6 BCA6 621D 920C E02E  E3C8 73B2 C019 5443 4E65
RSA 0xC3BCBA91: 3F 0E 26 C1 90 14 AD 0A  C8 9C F0 93 75 A0 01 34
============================================================================
If all you can see out of the window is ground that's going
round and round and all you can hear is commotion coming from the
passenger compartment, things are not at all as they should be.
					--Rules of the Air, #18

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] lvreduce
  2003-06-26 11:37 Bradley M Alexander
@ 2003-06-27  4:41 ` Heinz J . Mauelshagen
  2003-06-27  6:28   ` Bradley Alexander
  0 siblings, 1 reply; 9+ messages in thread
From: Heinz J . Mauelshagen @ 2003-06-27  4:41 UTC (permalink / raw)
  To: linux-lvm

Bradley,

could it accidentially be, that your LV was 2GB large before ?

That'ld explain the resulting 1GB, because lvreduce shows the absolute
resulting size.


On Thu, Jun 26, 2003 at 12:36:44PM -0400, Bradley M Alexander wrote:
> I ran across this today, and wanted some clarification if I could. I am
> running kernel 2.4.21 and lvm 1.0.7.
> 
> I needed to resize a partition, reducing it by 1GB. As I have done in the
> past, went into single user mode, umounted the partition did a
> resize_reiserfs -s-1GB /dev/vg00/var
> 
> This went fine, then I tried to reduce the size of the lv, using 
> lvreduce -L-1G /dev/vg00/var
> 
> lvreduce -- WARNING: Reducing active logical volume to 1 GB
> lvreduce -- THIS MAY DESTROY YOUR DATA (filesystem etc.)
> lvreduce -- do you really want to reduce "/dev/vg00/var"? [y/n]:
> 
> Isn't the -L-1G option for lvreduce supposed to reduce the lv _by_ the
> requested amount rather than _to_ that size?

Yes.

> If specify -L1G, that should
> be an absolute value rather than a relative value.

Correct.

> 
> Am I missing something here?

No.

> Would this be better addressed to the Debian
> maintainer for the lvm tools?

Well, that's Patrick Caulfield and he's on my team reading this mail as well :)

> 
> Thanks,
> -- 
> --Brad
> ============================================================================
> Bradley M. Alexander                |
> gTLD SysAdmin, Security Engineer    |   storm [at] tux.org
> Debian/GNU Linux Developer          |   storm [at] debian.org
> ============================================================================
> Key fingerprints:
> DSA 0x54434E65: 37F6 BCA6 621D 920C E02E  E3C8 73B2 C019 5443 4E65
> RSA 0xC3BCBA91: 3F 0E 26 C1 90 14 AD 0A  C8 9C F0 93 75 A0 01 34
> ============================================================================
> If all you can see out of the window is ground that's going
> round and round and all you can hear is commotion coming from the
> passenger compartment, things are not at all as they should be.
> 					--Rules of the Air, #18
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.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                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] lvreduce
  2003-06-27  4:41 ` Heinz J . Mauelshagen
@ 2003-06-27  6:28   ` Bradley Alexander
  0 siblings, 0 replies; 9+ messages in thread
From: Bradley Alexander @ 2003-06-27  6:28 UTC (permalink / raw)
  To: linux-lvm

On Fri, 2003-06-27 at 05:25, Heinz J . Mauelshagen wrote:
> Bradley,
> 
> could it accidentially be, that your LV was 2GB large before ?
> 
> That'ld explain the resulting 1GB, because lvreduce shows the absolute
> resulting size.

It seems to be. te case. A few weeks ago, I was on travel, and reduced a
partition, and it did not come back after reduction. I did it the same
way as I always do...resize, reduce, remount. When I tried to remount,
it gave me the bad filesystem error...
so I thought that might be the problem.

Thanks for clarifying.

> 
> On Thu, Jun 26, 2003 at 12:36:44PM -0400, Bradley M Alexander wrote:
> > I ran across this today, and wanted some clarification if I could. I am
> > running kernel 2.4.21 and lvm 1.0.7.
> > 
> > I needed to resize a partition, reducing it by 1GB. As I have done in the
> > past, went into single user mode, umounted the partition did a
> > resize_reiserfs -s-1GB /dev/vg00/var
> > 
> > This went fine, then I tried to reduce the size of the lv, using 
> > lvreduce -L-1G /dev/vg00/var
> > 
> > lvreduce -- WARNING: Reducing active logical volume to 1 GB
> > lvreduce -- THIS MAY DESTROY YOUR DATA (filesystem etc.)
> > lvreduce -- do you really want to reduce "/dev/vg00/var"? [y/n]:
> > 
> > Isn't the -L-1G option for lvreduce supposed to reduce the lv _by_ the
> > requested amount rather than _to_ that size?
> 
> Yes.
> 
> > If specify -L1G, that should
> > be an absolute value rather than a relative value.
> 
> Correct.
> 
> > 
> > Am I missing something here?
> 
> No.
> 
> > Would this be better addressed to the Debian
> > maintainer for the lvm tools?
> 
> Well, that's Patrick Caulfield and he's on my team reading this mail as well :)
> 
> > 
> > Thanks,
> > -- 
> > --Brad
> > ============================================================================
> > Bradley M. Alexander                |
> > gTLD SysAdmin, Security Engineer    |   storm [at] tux.org
> > Debian/GNU Linux Developer          |   storm [at] debian.org
> > ============================================================================
> > Key fingerprints:
> > DSA 0x54434E65: 37F6 BCA6 621D 920C E02E  E3C8 73B2 C019 5443 4E65
> > RSA 0xC3BCBA91: 3F 0E 26 C1 90 14 AD 0A  C8 9C F0 93 75 A0 01 34
> > ============================================================================
> > If all you can see out of the window is ground that's going
> > round and round and all you can hear is commotion coming from the
> > passenger compartment, things are not at all as they should be.
> > 					--Rules of the Air, #18
> > 
> > _______________________________________________
> > linux-lvm mailing list
> > linux-lvm@sistina.com
> > http://lists.sistina.com/mailman/listinfo/linux-lvm
> > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
-- 
--Brad
============================================================================
Bradley M. Alexander                |
gTLD SysAdmin, Security Engineer    |   storm [at] tux.org
Debian/GNU Linux Developer          |   storm [at] debian.org
============================================================================
Key fingerprints:
DSA 0x54434E65: 37F6 BCA6 621D 920C E02E  E3C8 73B2 C019 5443 4E65
RSA 0xC3BCBA91: 3F 0E 26 C1 90 14 AD 0A  C8 9C F0 93 75 A0 01 34
============================================================================
Those who trade liberty for security have neither.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [linux-lvm] lvreduce
@ 2007-10-22  4:41 Humble Chirammal
  2007-10-22  6:14 ` Itamar Reis Peixoto
  2007-10-23  0:36 ` Stuart D. Gathman
  0 siblings, 2 replies; 9+ messages in thread
From: Humble Chirammal @ 2007-10-22  4:41 UTC (permalink / raw)
  To: linux-lvm

Hi All,
  One of the customer ran  "lvreduce" command without reducing the 
filesystem (resize2fs ).  After the system was rebooted got this error.

<<snip>>

The filesystem size (according to the superblock) is 19922944 blocks
The physical size of the device is 13369344 blocks
Either the superblock or the partition table is likely to be corrupt!
 <<snip>>

Is there any way for data recovery???

Welcomes your valid responses

Regards
Humble

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] lvreduce
  2007-10-22  4:41 Humble Chirammal
@ 2007-10-22  6:14 ` Itamar Reis Peixoto
  2007-10-23  0:36 ` Stuart D. Gathman
  1 sibling, 0 replies; 9+ messages in thread
From: Itamar Reis Peixoto @ 2007-10-22  6:14 UTC (permalink / raw)
  To: LVM general discussion and development

try to grow the partition again

make a backup first (dd is your friend)


--------------------

Itamar Reis Peixoto

e-mail/msn: itamar@ispbrasil.com.br
skype: itamarjp 
icq: 81053601
+55 11 4063 5033
----- Original Message ----- 
From: "Humble Chirammal" <hchiramm@redhat.com>
To: <linux-lvm@redhat.com>
Sent: Monday, October 22, 2007 1:41 AM
Subject: [linux-lvm] lvreduce


> Hi All,
>  One of the customer ran  "lvreduce" command without reducing the 
> filesystem (resize2fs ).  After the system was rebooted got this error.
> 
> <<snip>>
> 
> The filesystem size (according to the superblock) is 19922944 blocks
> The physical size of the device is 13369344 blocks
> Either the superblock or the partition table is likely to be corrupt!
> <<snip>>
> 
> Is there any way for data recovery???
> 
> Welcomes your valid responses
> 
> Regards
> Humble
> 
> _______________________________________________
> 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] 9+ messages in thread

* Re: [linux-lvm] lvreduce
  2007-10-22  4:41 Humble Chirammal
  2007-10-22  6:14 ` Itamar Reis Peixoto
@ 2007-10-23  0:36 ` Stuart D. Gathman
  2007-10-23  1:08   ` Alasdair G Kergon
  1 sibling, 1 reply; 9+ messages in thread
From: Stuart D. Gathman @ 2007-10-23  0:36 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, 22 Oct 2007, Humble Chirammal wrote:

>   One of the customer ran  "lvreduce" command without reducing the 
> filesystem (resize2fs ).  After the system was rebooted got this error.
> 
> <<snip>>
> 
> The filesystem size (according to the superblock) is 19922944 blocks
> The physical size of the device is 13369344 blocks
> Either the superblock or the partition table is likely to be corrupt!
>  <<snip>>
> 
> Is there any way for data recovery???

Stop them from doing anymore LVM operations until recovery.
If nothing else has been done, undo the lvreduce with vgrestore.
LVM keeps backup versions of the metadata (/etc/lvm/archive on my
system).  I'll let the experts provide the exact syntax.  I haven't
had to do it yet :-)
If they have used the freed extents (lvextend or lvcreate or ...),
then they are hosed.

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] lvreduce
  2007-10-23  0:36 ` Stuart D. Gathman
@ 2007-10-23  1:08   ` Alasdair G Kergon
  0 siblings, 0 replies; 9+ messages in thread
From: Alasdair G Kergon @ 2007-10-23  1:08 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, Oct 22, 2007 at 08:36:26PM -0400, Stuart D. Gathman wrote:
> On Mon, 22 Oct 2007, Humble Chirammal wrote:
> >   One of the customer ran  "lvreduce" command without reducing the 
> > filesystem (resize2fs ).  After the system was rebooted got this error.
> > <<snip>>
> > The filesystem size (according to the superblock) is 19922944 blocks
> > The physical size of the device is 13369344 blocks
> > Either the superblock or the partition table is likely to be corrupt!
> >  <<snip>>
> > Is there any way for data recovery???
> Stop them from doing anymore LVM operations until recovery.
> If nothing else has been done, undo the lvreduce with vgrestore.
> LVM keeps backup versions of the metadata (/etc/lvm/archive on my
> system).  I'll let the experts provide the exact syntax.  I haven't
> had to do it yet :-)
> If they have used the freed extents (lvextend or lvcreate or ...),
> then they are hosed.
 
Indeed - as long as they made no other changes, 'vgcfgrestore' will undo the
lvreduce operation.  You can use '-ll' to check.

If they're using X, suggest trying the GUI (packages system-config-lvm)
interface to carry out resizing.

Alasdair
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-10-23  1:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-18  9:09 [linux-lvm] lvreduce G'abor Luk'acs
2001-09-18 10:20 ` Heinz J . Mauelshagen
  -- strict thread matches above, loose matches on Subject: below --
2003-06-26 11:37 Bradley M Alexander
2003-06-27  4:41 ` Heinz J . Mauelshagen
2003-06-27  6:28   ` Bradley Alexander
2007-10-22  4:41 Humble Chirammal
2007-10-22  6:14 ` Itamar Reis Peixoto
2007-10-23  0:36 ` Stuart D. Gathman
2007-10-23  1:08   ` Alasdair G Kergon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).