From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.10]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9NJ760s024973 for ; Fri, 23 Oct 2009 15:07:06 -0400 Received: from mail-yx0-f183.google.com (mail-yx0-f183.google.com [209.85.210.183]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9NJ6mjl025585 for ; Fri, 23 Oct 2009 15:06:48 -0400 Received: by yxe13 with SMTP id 13so7964364yxe.23 for ; Fri, 23 Oct 2009 12:06:47 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20091023065219.GA8733@maude.comedia.it> References: <20091023065219.GA8733@maude.comedia.it> Date: Fri, 23 Oct 2009 12:06:47 -0700 Message-ID: Subject: Re: [linux-lvm] Total free space using added VGs and LVs From: Lou Arnold Content-Type: multipart/alternative; boundary=001636c926cde42d8604769ee91c Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: LVM general discussion and development --001636c926cde42d8604769ee91c Content-Type: text/plain; charset=ISO-8859-1 Luca, your comments make sense. After my last message I considered just what you said, but I don't know how to prove it. I know there is no data on the drive that I added, because I just added the drive and never put data on it. I am sure "busy" means that it is mounted. Because it is included in the default group/volume (VolGroup00 - LogVol00) and because that LV is mounted at root ("/"), I cannot reduce the filesystem with resize2fs; there is no way to unmount "/", that I know of, anyway. Unless of course someone knows how? On Thu, Oct 22, 2009 at 11:52 PM, Luca Berra wrote: > On Wed, Oct 21, 2009 at 03:03:24PM -0400, Lou Arnold wrote: > >> I read the How-To. It doesn't talk about the specific case or being >> mounted >> > I hate how-tos, they are a collection of particular cases and leave the > luser with a feeling of knowledge. which is not. > > > at root, so I had to experiment. It is likely that commands were in the >> wrong order, but I don't know what the right order is. >> I have attached the terminal session I used. In the end it did not work. >> > > the commands were not in the wrong order, > they were just the wrong commands, unless your aim was reinstalling. > > > There was still 66 GB free, and when I rebooted, the file system failed. >> The >> superblock was too big. >> >> I obviously don't understand the difference between pvresize, lvreduce and >> vgreduce, and how resize2fs is related to these commands. >> > > I think you need to go over the basics again > LVM is used to abstract storage management > it is done by creating layers > Physical Volumes: which represent disks (or partitions, or whatever > block device...) > Volume Group: which is a collection of disks > Logical Volume: which is a portion of a volume group > > LVM allows to add/remove PVs to/from a VG. Add/remove/increase/shrink > LVs in a VG. > This is done by dividing each PV in Physical Extents (PE), and then > mapping those to Logical Extenst (LE) in a LV, so a LV is composed of > chunks of disk taken from one or more PV in a VG. > > When using lvm you create filesystems over logical volumes instead of > creating them on disk (or partition....) > > Lvm has no knowledge of what lays over it, a logical volume > is just a block device. > > The above sentence means that if you use a logical volume to host a > filesystem and want to resize the lv, you have to deal with the > filesystem yourself. > i.e. > if you enlarge a LV, you have to tell the filesystem that the space > available has increased. > if you want to reduce an LV, you have to ensure _before_ doing it that > the space removed does not contain any data. > so if you want to reduce an LV containing a filesystem you _have_ to > tell the filesystem _before_ to let that space alone. if you fail to do > this you will loose all data that was on the portion of disk you > removed, and the filesystem will still think it can use that portion of > data, until it will actually try, then sudden realization will hit like > a brick. as you just discovered. > > btw, let pvresize alone, it is used only in the particular case in which > you are able to resize the disk underlying a volume group, which is > impossible for a plain disk. > > L. > > > > > > _______________________________________________ > 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/ > --001636c926cde42d8604769ee91c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Luca, your comments make sense. After my last message I considered jus= t what you said, but I don't know how to prove it.
=A0
I know there is no data on the drive that I added, because I just adde= d the drive and never put data on it. I am sure "busy" means that= it is mounted.=A0Because it is=A0included in the default group/volume (Vol= Group00 - LogVol00) and because that LV is mounted at root ("/"),= I cannot reduce the filesystem with resize2fs; there is no way to unmount = "/", that I know of, anyway.=A0=A0 Unless of course someone knows= how?
On Thu, Oct 22, 2009 at 11:52 PM, Luca Berra <bluca@comedia.it= > wrote:
On Wed, Oct 21, 2009 at 03:03:24PM -0400, Lou Arnold wrot= e:
I read the How-To. It doesn'= t talk about the specific case or being mounted
I hat= e how-tos, they are a collection of particular cases and leave the
luser with a feeling of knowledge. which is not.=20


at root, so I had to experiment.= It is likely that commands were in the
wrong order, but I don't kno= w what the right order is.
I have attached the terminal session I used. In the end it did not work.

the commands were not in the wrong order,
they w= ere just the wrong commands, unless your aim was reinstalling.=20


There was still 66 GB free, and = when I rebooted, the file system failed. The
superblock was too big.

I obviously don't understand the difference between pvresize, lvred= uce and
vgreduce, and how =A0resize2fs =A0is related to these commands.<= br>

I think you need to go over the basics again
L= VM is used to abstract storage management
it is done by creating layers
Physical Volumes: which represent disks (o= r partitions, or whatever
block device...)
Volume Group: which is a c= ollection of disks
Logical Volume: which is a portion of a volume group<= br>
LVM allows to add/remove PVs to/from a VG. Add/remove/increase/shrinkLVs in a VG.
This is done by dividing each PV in Physical Extents (PE)= , and then
mapping those to Logical Extenst (LE) in a LV, so a LV is com= posed of
chunks of disk taken from one or more PV in a VG.

When using lvm you= create filesystems over logical volumes instead of
creating them on dis= k (or partition....)

Lvm has no knowledge of what lays over it, a lo= gical volume
is just a block device.

The above sentence means that if you use a l= ogical volume to host a
filesystem and want to resize the lv, you have t= o deal with the
filesystem yourself.
i.e.
if you enlarge a LV, you= have to tell the filesystem that the space
available has increased.
if you want to reduce an LV, you have to ensure= _before_ doing it that
the space removed does not contain any data.
= so if you want to reduce an LV containing a filesystem you _have_ to
tell the filesystem _before_ to let that space alone. if you fail to do
= this you will loose all data that was on the portion of disk you
removed= , and the filesystem will still think it can use that portion of
data, u= ntil it will actually try, then sudden realization will hit like
a brick. as you just discovered.

btw, let pvresize alone, it is used= only in the particular case in which
you are able to resize the disk un= derlying a volume group, which is
impossible for a plain disk.

L.=20





_____________________________________= __________
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/

--001636c926cde42d8604769ee91c--