From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.13]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JFhSxh003528 for ; Wed, 19 May 2010 11:43:28 -0400 Received: from mail-qy0-f198.google.com (mail-qy0-f198.google.com [209.85.221.198]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JFhHgI008290 for ; Wed, 19 May 2010 11:43:17 -0400 Received: by qyk36 with SMTP id 36so4978497qyk.19 for ; Wed, 19 May 2010 08:43:17 -0700 (PDT) From: "kevin" Date: Wed, 19 May 2010 11:43:09 -0400 Message-ID: <059801caf769$fc848350$f58d89f0$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0599_01CAF748.7572E350" Content-Language: en-us Subject: [linux-lvm] Adding a disk to expand an existing logical volume 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: linux-lvm@redhat.com This is a multi-part message in MIME format. ------=_NextPart_000_0599_01CAF748.7572E350 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Howdy, I have a live production system w/ logical volume that i want to add a drive to. I just wanted to confirm that adding a drive (fdisk+mkfs+pvcreate+vgextend+lvextend) is the right way to go about adding a disk to logical volumes? I want to ensure that the existing data on the logical volume isn't compromised and have never done this before. If theres something I should be aware of or if my process is incorrect, please let me know. Any help is extremely appreciated J Thanks, Kevin ------=_NextPart_000_0599_01CAF748.7572E350 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Howdy,

 

 

I have a live production system w/ logical volume = that i want to add a drive to. I just wanted to confirm that adding a drive (fdisk+mkfs+pvcreate+vgextend+lvextend) is the right way to go about = adding a disk to logical volumes? I want to ensure that the existing data on the = logical volume isn’t compromised and have never done this = before.

 

If theres something I should be aware of or if my = process is incorrect, please let me know. Any help is extremely appreciated J

 

 

Thanks,

 

Kevin

 

------=_NextPart_000_0599_01CAF748.7572E350-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.12]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JFwHQL009716 for ; Wed, 19 May 2010 11:58:18 -0400 Received: from smtp.iplink.net (smtp.iplink.net [192.139.81.186]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JFw8Ea011041 for ; Wed, 19 May 2010 11:58:08 -0400 Message-ID: <4BF40A8B.2000201@alteeve.com> Date: Wed, 19 May 2010 11:58:03 -0400 From: Digimer MIME-Version: 1.0 References: <059801caf769$fc848350$f58d89f0$@com> In-Reply-To: <059801caf769$fc848350$f58d89f0$@com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development Cc: kevin On 10-05-19 11:43 AM, kevin wrote: > Howdy, > > (fdisk+mkfs+pvcreate+vgextend+lvextend) is the right way to go about adding The mkfs isn't supposed to be there, just set the new drive's partition to type '8e' (Linux LVM). -- Digimer E-Mail: linux@alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.8]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JFwXpt008097 for ; Wed, 19 May 2010 11:58:34 -0400 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JFwPHJ016877 for ; Wed, 19 May 2010 11:58:25 -0400 Received: by pwi5 with SMTP id 5so1700113pwi.33 for ; Wed, 19 May 2010 08:58:24 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <059801caf769$fc848350$f58d89f0$@com> References: <059801caf769$fc848350$f58d89f0$@com> Date: Wed, 19 May 2010 11:58:24 -0400 Message-ID: From: Richard Jerrido Content-Transfer-Encoding: quoted-printable Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="windows-1252" To: LVM general discussion and development On Wed, May 19, 2010 at 11:43 AM, kevin wrote: > Howdy, > > > > > > I have a live production system w/ logical volume that i want to add a dr= ive > to. I just wanted to confirm that adding a drive > (fdisk+mkfs+pvcreate+vgextend+lvextend) is the right way to go about addi= ng > a disk to logical volumes? I want to ensure that the existing data on the > logical volume isn=E2=80=99t compromised and have never done this before. > > > > If theres something I should be aware of or if my process is incorrect, > please let me know. Any help is extremely appreciated J > > > > > > Thanks, > > > > Kevin > > > > _______________________________________________ > 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/ > The "mkfs" step isnt needed if you are expanding an existing logical volume. A revised procedure would be the following: - Add disk to system - Partition it via fdisk. Set partition type to 8e (Linux LVM) - run pvcreate initialize the partition for LVM - run vgextend to expand your existing volume group with the new device. - run lvextend to grow your logical volume. - finally, run resize2fs (assuming you are using ext3/4) to grow the file system. Rich From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.13]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGA4Yv012269 for ; Wed, 19 May 2010 12:10:04 -0400 Received: from mail-qy0-f198.google.com (mail-qy0-f198.google.com [209.85.221.198]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JG9sU8013093 for ; Wed, 19 May 2010 12:09:54 -0400 Received: by qyk36 with SMTP id 36so5016322qyk.19 for ; Wed, 19 May 2010 09:09:53 -0700 (PDT) From: "kevin" References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> In-Reply-To: <4BF40A8B.2000201@alteeve.com> Date: Wed, 19 May 2010 12:09:46 -0400 Message-ID: <05bd01caf76d$b45892c0$1d09b840$@com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Language: en-us Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" To: 'Digimer' , 'LVM general discussion and development' >The mkfs isn't supposed to be there, just set the new drive's partition >to type '8e' (Linux LVM). Thanks for the quick response. So to recap, for a 144gb drive (/dev/sda1) : 1. fdisk /dev/sda1 type 8e 2. pvcreate /dev/sda1 3. vgextend existing_group_name /dev/sda1 4. lvextend -L+144G /dev/VolGroup00/existing_group_name Does that look correct? Thanks so much once again, Kevin http://blog.stardothosting.com From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.13]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGCQxb010079 for ; Wed, 19 May 2010 12:12:26 -0400 Received: from mail-gx0-f216.google.com (mail-gx0-f216.google.com [209.85.217.216]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGCEtP013591 for ; Wed, 19 May 2010 12:12:14 -0400 Received: by gxk8 with SMTP id 8so4155071gxk.9 for ; Wed, 19 May 2010 09:12:12 -0700 (PDT) From: "kevin" References: <059801caf769$fc848350$f58d89f0$@com> In-Reply-To: Date: Wed, 19 May 2010 12:12:04 -0400 Message-ID: <05c001caf76e$06b7ea20$1427be60$@com> MIME-Version: 1.0 Content-Language: en-us Content-Transfer-Encoding: quoted-printable Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="windows-1252" To: 'LVM general discussion and development' > - Add disk to system > - Partition it via fdisk. Set partition type to 8e (Linux LVM) > - run pvcreate initialize the partition for LVM > - run vgextend to expand your existing volume group with the new device. > - run lvextend to grow your logical volume. > - finally, run resize2fs (assuming you are using ext3/4) to grow the > file system. > >Rich I should note that this is a logical volume for a collection of Xen virtual= ized environments so its not an actual EXT3 filesystem. I wouldn=E2=80=99t = need to run the last step I imagine. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.5]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGQ56Z024489 for ; Wed, 19 May 2010 12:26:05 -0400 Received: from e9.ny.us.ibm.com (e9.ny.us.ibm.com [32.97.182.139]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGPuBa022752 for ; Wed, 19 May 2010 12:25:56 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e9.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id o4JGCNsr014222 for ; Wed, 19 May 2010 12:12:23 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o4JGPobq2416656 for ; Wed, 19 May 2010 12:25:50 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o4JGPnoY027133 for ; Wed, 19 May 2010 12:25:49 -0400 Received: from malahal (malahal.beaverton.ibm.com [9.47.17.130]) by d01av04.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o4JGPn3q026999 for ; Wed, 19 May 2010 12:25:49 -0400 Date: Wed, 19 May 2010 09:26:01 -0700 From: Malahal Naineni Message-ID: <20100519162601.GA18162@us.ibm.com> References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4BF40A8B.2000201@alteeve.com> Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-lvm@redhat.com Digimer [linux@alteeve.com] wrote: > On 10-05-19 11:43 AM, kevin wrote: > >Howdy, > > > >(fdisk+mkfs+pvcreate+vgextend+lvextend) is the right way to go about adding > > The mkfs isn't supposed to be there, just set the new drive's > partition to type '8e' (Linux LVM). If I were you, I would not bother with partition(s). I will add the whole disk to LVM. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.12]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGSp1M018005 for ; Wed, 19 May 2010 12:28:51 -0400 Received: from smtp.iplink.net (smtp.iplink.net [192.139.81.186]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGSfil016575 for ; Wed, 19 May 2010 12:28:42 -0400 Message-ID: <4BF411B5.1020408@alteeve.com> Date: Wed, 19 May 2010 12:28:37 -0400 From: Digimer MIME-Version: 1.0 References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <05bd01caf76d$b45892c0$1d09b840$@com> In-Reply-To: <05bd01caf76d$b45892c0$1d09b840$@com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development Cc: kevin On 10-05-19 12:09 PM, kevin wrote: >> The mkfs isn't supposed to be there, just set the new drive's partition >> to type '8e' (Linux LVM). > > Thanks for the quick response. So to recap, for a 144gb drive (/dev/sda1) : > > 1. fdisk /dev/sda1 type 8e > 2. pvcreate /dev/sda1 > 3. vgextend existing_group_name /dev/sda1 > 4. lvextend -L+144G /dev/VolGroup00/existing_group_name > > Does that look correct? > > Thanks so much once again, > > Kevin Hi Kevin, I've been meaning to add this process to my wiki for a while now. This is as good a time as any, so take a gander here: http://wiki.alteeve.com/index.php/Adding_Space_to_an_LVM Note that it's a copy-pasted from some of my other docs, so some of it will reference non-existing things, but the steps should all be there. -- Digimer E-Mail: linux@alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.12]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGcHJs020444 for ; Wed, 19 May 2010 12:38:17 -0400 Received: from mail-yw0-f197.google.com (mail-yw0-f197.google.com [209.85.211.197]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGc7Zp018205 for ; Wed, 19 May 2010 12:38:07 -0400 Received: by ywh35 with SMTP id 35so2722092ywh.24 for ; Wed, 19 May 2010 09:38:06 -0700 (PDT) From: "kevin" References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162601.GA18162@us.ibm.com> In-Reply-To: <20100519162601.GA18162@us.ibm.com> Date: Wed, 19 May 2010 12:37:54 -0400 Message-ID: <05c901caf771$a3161920$e9424b60$@com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Language: en-us Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" To: 'LVM general discussion and development' >If I were you, I would not bother with partition(s). I will add the >whole disk to LVM. I intend for the entire disk to be used -- so I should just skip the fdisk step? Thanks, Kevin http://blog.stardothosting.com From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.8]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGkovH024407 for ; Wed, 19 May 2010 12:46:50 -0400 Received: from mail.bmsi.com (www.bmsi.com [24.248.44.156]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGkejf025750 for ; Wed, 19 May 2010 12:46:41 -0400 Received: from bmsred.bmsi.com (bmsred.bmsi.com [192.168.9.50]) by mail.bmsi.com (8.14.3/8.14.3) with ESMTP id o4JGkXdW028999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 19 May 2010 12:46:40 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by bmsred.bmsi.com (8.14.3/8.14.3) with ESMTP id o4JGkVTA028212 for ; Wed, 19 May 2010 12:46:31 -0400 Date: Wed, 19 May 2010 12:46:31 -0400 (EDT) From: "Stuart D. Gathman" In-Reply-To: <059801caf769$fc848350$f58d89f0$@com> Message-ID: References: <059801caf769$fc848350$f58d89f0$@com> MIME-Version: 1.0 Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: TEXT/PLAIN; charset="us-ascii" Content-Transfer-Encoding: 7bit To: LVM general discussion and development On Wed, 19 May 2010, kevin wrote: > a disk to logical volumes? I want to ensure that the existing data on the > logical volume isn't compromised and have never done this before. > > If theres something I should be aware of or if my process is incorrect, > please let me know. Any help is extremely appreciated J While others have given you the procedure, I'll be the killjoy and point out that the reliability of the VG as a whole goes down with additional drives - unless you incorporate some kind of RAID. For instance, if the uptime ratio of a single drive is .99999 (5 sigmas), the uptime of the system with two such drives is .99998. This is not so bad with just 2 drives (even 2 sigmas gives you .99^2 == .98), but is something to keep in mind before adding the 3rd. I prefer software RAID1, it provides a lot of flexibility including "cloning" a drive by simply removing it and is simple. Other configurations will provide better performance. -- Stuart D. Gathman 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGl81r022680 for ; Wed, 19 May 2010 12:47:08 -0400 Received: from smtp.iplink.net (smtp.iplink.net [192.139.81.186]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGkxci020697 for ; Wed, 19 May 2010 12:46:59 -0400 Received: from [10.255.0.247] (fw.iplink.net [192.139.81.98]) by smtp.iplink.net (Postfix) with ESMTP id 9D6DDA99450 for ; Wed, 19 May 2010 12:46:54 -0400 (EDT) Message-ID: <4BF415FE.5060806@alteeve.com> Date: Wed, 19 May 2010 12:46:54 -0400 From: Digimer MIME-Version: 1.0 References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162601.GA18162@us.ibm.com> <05c901caf771$a3161920$e9424b60$@com> In-Reply-To: <05c901caf771$a3161920$e9424b60$@com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development On 10-05-19 12:37 PM, kevin wrote: > >> If I were you, I would not bother with partition(s). I will add the >> whole disk to LVM. > > > I intend for the entire disk to be used -- so I should just skip the fdisk > step? > > > > Thanks, > > > Kevin > http://blog.stardothosting.com Unless Malahal knows something I don't (which is always possible), then you still need to create a single partition that consumes the whole disk and then assign that to you VG. -- Digimer E-Mail: linux@alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.9]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGobVZ020487 for ; Wed, 19 May 2010 12:50:37 -0400 Received: from lvps87-230-0-242.dedicated.hosteurope.de (lvps87-230-0-242.dedicated.hosteurope.de [87.230.0.242]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGoPgW024120 for ; Wed, 19 May 2010 12:50:25 -0400 Date: Wed, 19 May 2010 18:24:01 +0200 From: Michael Guntsche Message-ID: <20100519162401.GA4163@trillian.comsick.at> References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4BF40A8B.2000201@alteeve.com> Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: LVM general discussion and development On 2010.05.19 11:58:03 , Digimer wrote: > On 10-05-19 11:43 AM, kevin wrote: > >Howdy, > > > >(fdisk+mkfs+pvcreate+vgextend+lvextend) is the right way to go about adding > > The mkfs isn't supposed to be there, just set the new drive's > partition to type '8e' (Linux LVM). Or use the full device without any partition at all. /Michael From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.9]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGpa7M022659 for ; Wed, 19 May 2010 12:51:36 -0400 Received: from mail.bmsi.com (www.bmsi.com [24.248.44.156]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGpQ7t024277 for ; Wed, 19 May 2010 12:51:26 -0400 Received: from bmsred.bmsi.com (bmsred.bmsi.com [192.168.9.50]) by mail.bmsi.com (8.14.3/8.14.3) with ESMTP id o4JGpPDL029223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 19 May 2010 12:51:26 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by bmsred.bmsi.com (8.14.3/8.14.3) with ESMTP id o4JGpPRv028239 for ; Wed, 19 May 2010 12:51:25 -0400 Date: Wed, 19 May 2010 12:51:25 -0400 (EDT) From: "Stuart D. Gathman" In-Reply-To: <05c901caf771$a3161920$e9424b60$@com> Message-ID: References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162601.GA18162@us.ibm.com> <05c901caf771$a3161920$e9424b60$@com> MIME-Version: 1.0 Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: TEXT/PLAIN; charset="us-ascii" Content-Transfer-Encoding: 7bit To: LVM general discussion and development On Wed, 19 May 2010, kevin wrote: > >If I were you, I would not bother with partition(s). I will add the > >whole disk to LVM. > > I intend for the entire disk to be used -- so I should just skip the fdisk > step? Yes, just do the pvcreate directly on /dev/sdc (instead of /dev/sdc1). I would only recommend this if the drive is permanently attached to your server. If there is any possibility of it getting moved to another system, especially another OS, it is likely to appear "unformatted" and the other OS will offer to create a partition table, etc, destroying the data. The partition table, although otherwise useless for LVM (and a pain when trying to align PPs to some lower lever boundary), does serve the purpose of telling other PC operating systems that there is something there. -- Stuart D. Gathman 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGvsfZ025798 for ; Wed, 19 May 2010 12:57:54 -0400 Received: from smtp.iplink.net (smtp.iplink.net [192.139.81.186]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JGvi0J022483 for ; Wed, 19 May 2010 12:57:45 -0400 Message-ID: <4BF41884.4080000@alteeve.com> Date: Wed, 19 May 2010 12:57:40 -0400 From: Digimer MIME-Version: 1.0 References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162601.GA18162@us.ibm.com> <05c901caf771$a3161920$e9424b60$@com> In-Reply-To: Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development On 10-05-19 12:51 PM, Stuart D. Gathman wrote: > On Wed, 19 May 2010, kevin wrote: > >>> If I were you, I would not bother with partition(s). I will add the >>> whole disk to LVM. >> >> I intend for the entire disk to be used -- so I should just skip the fdisk >> step? > > Yes, just do the pvcreate directly on /dev/sdc (instead of /dev/sdc1). > > I would only recommend this if the drive is permanently attached to your > server. If there is any possibility of it getting moved to another system, > especially another OS, it is likely to appear "unformatted" and the other > OS will offer to create a partition table, etc, destroying the data. > The partition table, although otherwise useless for LVM (and a pain when > trying to align PPs to some lower lever boundary), does serve the purpose > of telling other PC operating systems that there is something there. There ya go, I learn something new every day. :) -- Digimer E-Mail: linux@alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from breeves.fab.redhat.com (breeves.fab.redhat.com [10.33.0.40]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JH3GNu025850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 19 May 2010 13:03:17 -0400 Message-ID: <4BF419C7.8050401@redhat.com> Date: Wed, 19 May 2010 18:03:03 +0100 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162601.GA18162@us.ibm.com> <05c901caf771$a3161920$e9424b60$@com> In-Reply-To: <05c901caf771$a3161920$e9424b60$@com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" To: LVM general discussion and development On 05/19/2010 05:37 PM, kevin wrote: > >> If I were you, I would not bother with partition(s). I will add the >> whole disk to LVM. > > > I intend for the entire disk to be used -- so I should just skip the fdisk > step? You can either create a partition that spans the entire disk or create the PV directly on the whole-disk device. Both approaches have their advantages; with a partition table you are less likely to run into problems with (buggy) software that assumes the disks are "unformatted" because they do not contain an MBR-format partition table and handily initialises them for you. On the other hand it's somewhat easier (at least with older tools) to get alignment constraints right when creating things on the bare disk (although you still need to make sure that the start of the data area of the PV is aligned properly if you want to get the best performance). Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from breeves.fab.redhat.com (breeves.fab.redhat.com [10.33.0.40]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JH5fdR026891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 19 May 2010 13:05:42 -0400 Message-ID: <4BF41A57.5010507@redhat.com> Date: Wed, 19 May 2010 18:05:27 +0100 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162601.GA18162@us.ibm.com> <05c901caf771$a3161920$e9424b60$@com> <4BF415FE.5060806@alteeve.com> In-Reply-To: <4BF415FE.5060806@alteeve.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" To: LVM general discussion and development On 05/19/2010 05:46 PM, Digimer wrote: > On 10-05-19 12:37 PM, kevin wrote: >> >>> If I were you, I would not bother with partition(s). I will add the >>> whole disk to LVM. >> >> >> I intend for the entire disk to be used -- so I should just skip the fdisk >> step? >> >> >> >> Thanks, >> >> >> Kevin >> http://blog.stardothosting.com > > Unless Malahal knows something I don't (which is always possible), then > you still need to create a single partition that consumes the whole disk > and then assign that to you VG. > Running pvcreate on a whole disk works just fine. Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.6]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JH7euS027712 for ; Wed, 19 May 2010 13:07:40 -0400 Received: from mail-gx0-f216.google.com (mail-gx0-f216.google.com [209.85.217.216]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JH7Tnw025305 for ; Wed, 19 May 2010 13:07:29 -0400 Received: by gxk8 with SMTP id 8so4205623gxk.9 for ; Wed, 19 May 2010 10:07:28 -0700 (PDT) From: "kevin" References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162601.GA18162@us.ibm.com> <05c901caf771$a3161920$e9424b60$@com> <4BF41884.4080000@alteeve.com> In-Reply-To: <4BF41884.4080000@alteeve.com> Date: Wed, 19 May 2010 13:07:17 -0400 Message-ID: <05cf01caf775$bdf90b90$39eb22b0$@com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Language: en-us Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" To: 'LVM general discussion and development' > I would only recommend this if the drive is permanently attached to your > server. If there is any possibility of it getting moved to another system, > especially another OS, it is likely to appear "unformatted" and the other > OS will offer to create a partition table, etc, destroying the data. > The partition table, although otherwise useless for LVM (and a pain when > trying to align PPs to some lower lever boundary), does serve the purpose > of telling other PC operating systems that there is something there. This drive is to be permanently attached to the system so I don't think I need to worry about marking it as 8e in fdisk. Thanks all for your help. This clarifies a lot of things for me. ~k From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JHABwf029900 for ; Wed, 19 May 2010 13:10:11 -0400 Received: from mail-gx0-f216.google.com (mail-gx0-f216.google.com [209.85.217.216]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JH9xFd025137 for ; Wed, 19 May 2010 13:10:00 -0400 Received: by gxk8 with SMTP id 8so4207959gxk.9 for ; Wed, 19 May 2010 10:09:56 -0700 (PDT) From: "kevin" References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162601.GA18162@us.ibm.com> <05c901caf771$a3161920$e9424b60$@com> <4BF41884.4080000@alteeve.com> In-Reply-To: <4BF41884.4080000@alteeve.com> Date: Wed, 19 May 2010 13:09:48 -0400 Message-ID: <05d201caf776$17abb110$47031330$@com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Language: en-us Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" To: 'LVM general discussion and development' One last thing I want to confirm is the lvextend command to 'grow' the logical volume : lvextend -L+144G /dev/VolGroup00/my_volume After all said steps in previous messages on this thread are complete, is the above command correct for my particular scenario? Do I want to 'extend' the volume size or 'grow' it? Not sure what the difference is. ~k From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.5]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JHNcZb001472 for ; Wed, 19 May 2010 13:23:38 -0400 Received: from ps536.phatservers.com (ps536.phatservers.com [216.17.105.202]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JHNVNQ003029 for ; Wed, 19 May 2010 13:23:31 -0400 Received: from r74-192-24-94.bcstcmta01.clsttx.tl.dh.suddenlink.net ([74.192.24.94] helo=raydesk1.bettercgi.com) by ps536.phatservers.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1OEmzM-0001wD-Tc for linux-lvm@redhat.com; Wed, 19 May 2010 10:23:25 -0700 Date: Wed, 19 May 2010 12:23:23 -0500 From: Ray Morris In-Reply-To: <4BF41884.4080000@alteeve.com> (from linux@alteeve.com on Wed May 19 11:57:40 2010) Message-Id: <1274289803.16893.12@raydesk1.bettercgi.com> MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii"; delsp="Yes"; format="Flowed" To: LVM general discussion and development >> The partition table, although otherwise useless for LVM (and a pain >> when >> trying to align PPs to some lower lever boundary), does serve the >> purpose >> of telling other PC operating systems that there is something there. It's also useful during the boot process. If, for example, you later add another disk, this disk might become sdd, where it used to be sdc. That can confuse initrd and friends and result in an unbootable system. On almost every machine where I've skipped creating partitions for RAID or LVM, this kind of thing has come back to bite me later - maybe years later. Now, I always create "Linux LVM" partitions for LVM and "Linux raid autodetect" partitions for RAID. It makes booting an recovering much more reliable in case of changes or problems. > a pain when trying to align PPs to some lower lever boundary A trick to avoid all of the math of alignment is to just start the first partition on sector 512 every time, rather than sector 63. Sometimes you can save a few KB by doing the math and finding a lower offset, but it's just a few KB - who cares. That works because 512 sectors is 256KB - a perfect multiple of any RAID size you might use. -- Ray Morris support@bettercgi.com Strongbox - The next generation in site security: http://www.bettercgi.com/strongbox/ Throttlebox - Intelligent Bandwidth Control http://www.bettercgi.com/throttlebox/ Strongbox / Throttlebox affiliate program: http://www.bettercgi.com/affiliates/user/register.php On 05/19/2010 11:57:40 AM, Digimer wrote: > On 10-05-19 12:51 PM, Stuart D. Gathman wrote: >> On Wed, 19 May 2010, kevin wrote: >> >>>> If I were you, I would not bother with partition(s). I will add the >>>> whole disk to LVM. >>> >>> I intend for the entire disk to be used -- so I should just skip >>> the fdisk >>> step? >> >> Yes, just do the pvcreate directly on /dev/sdc (instead of >> /dev/sdc1). >> >> I would only recommend this if the drive is permanently attached to >> your >> server. If there is any possibility of it getting moved to another >> system, >> especially another OS, it is likely to appear "unformatted" and the >> other >> OS will offer to create a partition table, etc, destroying the data. >> The partition table, although otherwise useless for LVM (and a pain >> when >> trying to align PPs to some lower lever boundary), does serve the >> purpose >> of telling other PC operating systems that there is something there. > > There ya go, I learn something new every day. :) > >-- > Digimer > E-Mail: linux@alteeve.com > AN!Whitepapers: http://alteeve.com > Node Assassin: http://nodeassassin.org > > _______________________________________________ > 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/ > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.12]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JHZfh0014237 for ; Wed, 19 May 2010 13:35:41 -0400 Received: from ps536.phatservers.com (ps536.phatservers.com [216.17.105.202]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JHZXi3029544 for ; Wed, 19 May 2010 13:35:33 -0400 Received: from r74-192-24-94.bcstcmta01.clsttx.tl.dh.suddenlink.net ([74.192.24.94] helo=raydesk1.bettercgi.com) by ps536.phatservers.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1OEnB5-0002DG-Om for linux-lvm@redhat.com; Wed, 19 May 2010 10:35:31 -0700 Date: Wed, 19 May 2010 12:35:30 -0500 From: Ray Morris In-Reply-To: <05d201caf776$17abb110$47031330$@com> (from k@kevinkevin.com on Wed May 19 12:09:48 2010) Message-Id: <1274290530.16893.13@raydesk1.bettercgi.com> MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="windows-1252"; delsp="Yes"; format="Flowed" To: LVM general discussion and development > lvextend -L+144G /dev/VolGroup00/my_volume If you want to use all available space: lvextend -L+100%FREE /dev/VolGroup00/my_volume > I should note that this is a logical volume for a > collection of Xen virtualized environments so its > not an actual EXT3 filesystem. I wouldn=E2=80=99t need to > run the last step I imagine. Typically Xen images are files on the filesystem of the host, so yes, you'd need to resize the host filesystem, if you are creating Xen image files. Howver, as long as you are making changes to your LVM, there is another way which we use, because we think it's better. Rather than having one huge LV which contains files which are accessed as though they were block devices, we create a LV for each guest. If you have only one big LV, that's kind of pointless indirection, overhead that gains you nothing. It's also problematic for recovery because you have multiple overlapping ext3 filesystems - one inside the other, meaning that recovery utilities will find bogus superblocks belonging to the wrong filesystem. -- Ray Morris support@bettercgi.com Strongbox - The next generation in site security: http://www.bettercgi.com/strongbox/ Throttlebox - Intelligent Bandwidth Control http://www.bettercgi.com/throttlebox/ Strongbox / Throttlebox affiliate program: http://www.bettercgi.com/affiliates/user/register.php On 05/19/2010 12:09:48 PM, kevin wrote: > One last thing I want to confirm is the lvextend command to 'grow' the > logical volume : >=20 >=20 > lvextend -L+144G /dev/VolGroup00/my_volume >=20 > After all said steps in previous messages on this thread are =20 > complete, is > the above command correct for my particular scenario? Do I want to =20 > 'extend' > the volume size or 'grow' it? >=20 > Not sure what the difference is. >=20 >=20 > ~k >=20 >=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/ >=20 >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.7]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JHoZXP018585 for ; Wed, 19 May 2010 13:50:36 -0400 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JHoP2h003710 for ; Wed, 19 May 2010 13:50:25 -0400 Received: by wyg36 with SMTP id 36so672842wyg.33 for ; Wed, 19 May 2010 10:50:24 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <05d201caf776$17abb110$47031330$@com> References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162601.GA18162@us.ibm.com> <05c901caf771$a3161920$e9424b60$@com> <4BF41884.4080000@alteeve.com> <05d201caf776$17abb110$47031330$@com> Date: Wed, 19 May 2010 12:28:43 -0500 Message-ID: From: Richard Shaw Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: LVM general discussion and development On Wed, May 19, 2010 at 12:09 PM, kevin wrote: > One last thing I want to confirm is the lvextend command to 'grow' the > logical volume : > > > lvextend -L+144G /dev/VolGroup00/my_volume > > After all said steps in previous messages on this thread are complete, is > the above command correct for my particular scenario? Do I want to 'extend' > the volume size or 'grow' it? > > Not sure what the difference is. Chiming in a little late here but I would suggest the following (although I'm certainly not a LVM expert): lvextend -l +100%FREE /dev/VolGroup00/my_volume (notice the lower case l in -l, not upper) This should make sure you add 100% of the extents of the new drive to your logical volume. As I've said, I'm not an expert so I don't know the innards of "lvextend" but I would be concerned that if you specify the size of the expansion in gigabytes instead of as a percentage that you might get some unallocated extents due to rounding. Richard From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.14]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JIPPwR015536 for ; Wed, 19 May 2010 14:25:25 -0400 Received: from smtp.iplink.net (smtp.iplink.net [192.139.81.186]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JIPF6F003990 for ; Wed, 19 May 2010 14:25:16 -0400 Message-ID: <4BF42D06.7040100@alteeve.com> Date: Wed, 19 May 2010 14:25:10 -0400 From: Digimer MIME-Version: 1.0 References: <1274290530.16893.13@raydesk1.bettercgi.com> In-Reply-To: <1274290530.16893.13@raydesk1.bettercgi.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development Cc: Ray Morris On 10-05-19 01:35 PM, Ray Morris wrote: >> lvextend -L+144G /dev/VolGroup00/my_volume > > If you want to use all available space: > > lvextend -L+100%FREE /dev/VolGroup00/my_volume As Richard pointed out, using '+100%FREE' calls for the small 'l', not L. The capital L is used when specifying a fixed size. -- Digimer E-Mail: linux@alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.13]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JJYmeo004362 for ; Wed, 19 May 2010 15:34:48 -0400 Received: from mail.bmsi.com (www.bmsi.com [24.248.44.156]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JJYcvc017117 for ; Wed, 19 May 2010 15:34:39 -0400 Received: from bmsred.bmsi.com (bmsred.bmsi.com [192.168.9.50]) by mail.bmsi.com (8.14.3/8.14.3) with ESMTP id o4JJYcIf003935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 19 May 2010 15:34:38 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by bmsred.bmsi.com (8.14.3/8.14.3) with ESMTP id o4JJYcb9029679 for ; Wed, 19 May 2010 15:34:38 -0400 Date: Wed, 19 May 2010 15:34:38 -0400 (EDT) From: "Stuart D. Gathman" In-Reply-To: <1274289803.16893.12@raydesk1.bettercgi.com> Message-ID: References: <1274289803.16893.12@raydesk1.bettercgi.com> MIME-Version: 1.0 Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: TEXT/PLAIN; charset="us-ascii" Content-Transfer-Encoding: 7bit To: LVM general discussion and development On Wed, 19 May 2010, Ray Morris wrote: > It's also useful during the boot process. If, for example, you > later add another disk, this disk might become sdd, where it used to > be sdc. That can confuse initrd and friends and result in an > unbootable system. On almost every machine where I've skipped > creating partitions for RAID or LVM, this kind of thing has come > back to bite me later - maybe years later. Now, I always create > "Linux LVM" partitions for LVM and "Linux raid autodetect" partitions > for RAID. It makes booting an recovering much more reliable in > case of changes or problems. PVs are identified by UUID. It doesn't matter whether they change names. And changing names from sdc1 to sdd1 is just as bad as changing names from sdc to sdd. However, you are correct that the default device searching rules used by lvm might work correctly with a Linux LVM labeled partition where they might otherwise skip a device. If you aren't familiar with lvm.conf, then using labeled partitions is a safer course. (initrd uses a copy of lvm.conf to find PVs so it can activate the volume group of the root filesystem if necessary.) -- Stuart D. Gathman 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.14]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JMSgNt015344 for ; Wed, 19 May 2010 18:28:42 -0400 Received: from eastrmmtao101.cox.net (eastrmmtao101.cox.net [68.230.240.7]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JMSTD4012469 for ; Wed, 19 May 2010 18:28:29 -0400 Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao101.cox.net (InterMail vM.8.00.01.00 201-2244-105-20090324) with ESMTP id <20100519222829.CSCC14747.eastrmmtao101.cox.net@eastrmimpo02.cox.net> for ; Wed, 19 May 2010 18:28:29 -0400 Message-ID: <4BF4660C.60307@cox.net> Date: Wed, 19 May 2010 17:28:28 -0500 From: Ron Johnson MIME-Version: 1.0 References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162401.GA4163@trillian.comsick.at> In-Reply-To: <20100519162401.GA4163@trillian.comsick.at> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-lvm@redhat.com On 05/19/2010 11:24 AM, Michael Guntsche wrote: > On 2010.05.19 11:58:03 , Digimer wrote: >> On 10-05-19 11:43 AM, kevin wrote: >>> Howdy, >>> >>> (fdisk+mkfs+pvcreate+vgextend+lvextend) is the right way to go about adding >> >> The mkfs isn't supposed to be there, just set the new drive's >> partition to type '8e' (Linux LVM). > Or use the full device without any partition at all. > I wonder if this will have any adverse affects on drives with 4KB sectors? -- Dissent is patriotic, remember? 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-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4K5OViJ022946 for ; Thu, 20 May 2010 01:24:31 -0400 Received: from maude.comedia.it (mail.comedia.it [77.93.254.181]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4K5OLwK011448 for ; Thu, 20 May 2010 01:24:22 -0400 Received: from localhost (localhost [127.0.0.1]) by maude.comedia.it (Postfix) with ESMTP id 47B1E86FDB for ; Thu, 20 May 2010 07:24:20 +0200 (CEST) Received: from maude.comedia.it ([127.0.0.1]) by localhost (maude.comedia.it [127.0.0.1]) (amavisd-new, port 10025) with LMTP id Ca8NLlJ7Aj3o for ; Thu, 20 May 2010 07:24:15 +0200 (CEST) Date: Thu, 20 May 2010 07:24:15 +0200 From: Luca Berra Message-ID: <20100520052415.GA27154@maude.comedia.it> References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162401.GA4163@trillian.comsick.at> <4BF4660C.60307@cox.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4BF4660C.60307@cox.net> Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit To: linux-lvm@redhat.com On Wed, May 19, 2010 at 05:28:28PM -0500, Ron Johnson wrote: > On 05/19/2010 11:24 AM, Michael Guntsche wrote: >> On 2010.05.19 11:58:03 , Digimer wrote: >>> On 10-05-19 11:43 AM, kevin wrote: >>>> Howdy, >>>> >>>> (fdisk+mkfs+pvcreate+vgextend+lvextend) is the right way to go about adding >>> >>> The mkfs isn't supposed to be there, just set the new drive's >>> partition to type '8e' (Linux LVM). >> Or use the full device without any partition at all. >> > > I wonder if this will have any adverse affects on drives with 4KB sectors? it depends on a disk with 4k sector, using the whole device is more likely to have a correct alignment (0 is a multiple of 4k) on a disk with 4k sector and the first sector shifted (some drives have a jumper to achieve this, it might be called something like "XP compatibility") using the whole device, or anything not aligned to 63x512byte will result in unaligned data. afair recent kernels should expose the alignment and sector size under /sys/block/..., (if the drive exposes that info and does not lie, that is.) and fdisk/parted/lvm/md should correctly align data start. On a personal note, i really despise partition tables, it is a broken design from the early eighties, we should be able to move on. If you must use a GPT partition, at least it has a backup block. L. -- Luca Berra -- bluca@comedia.it Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \ From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from breeves.fab.redhat.com (breeves.fab.redhat.com [10.33.0.40]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4KBLlZp004478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 20 May 2010 07:21:49 -0400 Message-ID: <4BF51B3D.5010005@redhat.com> Date: Thu, 20 May 2010 12:21:33 +0100 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <059801caf769$fc848350$f58d89f0$@com> <4BF40A8B.2000201@alteeve.com> <20100519162401.GA4163@trillian.comsick.at> <4BF4660C.60307@cox.net> In-Reply-To: <4BF4660C.60307@cox.net> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii" To: LVM general discussion and development On 05/19/2010 11:28 PM, Ron Johnson wrote: > On 05/19/2010 11:24 AM, Michael Guntsche wrote: >> On 2010.05.19 11:58:03 , Digimer wrote: >>> On 10-05-19 11:43 AM, kevin wrote: >>>> Howdy, >>>> >>>> (fdisk+mkfs+pvcreate+vgextend+lvextend) is the right way to go about adding >>> >>> The mkfs isn't supposed to be there, just set the new drive's >>> partition to type '8e' (Linux LVM). >> Or use the full device without any partition at all. >> > > I wonder if this will have any adverse affects on drives with 4KB > sectors? > Not really, if anything it simplifies getting correct alignment for the data region of the PV. Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.6]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4SNGkCP012316 for ; Fri, 28 May 2010 19:16:46 -0400 Received: from ps536.phatservers.com (ps536.phatservers.com [216.17.105.202]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4SNGbBG027658 for ; Fri, 28 May 2010 19:16:38 -0400 Received: from r74-192-24-94.bcstcmta01.clsttx.tl.dh.suddenlink.net ([74.192.24.94] helo=raydesk1.bettercgi.com) by ps536.phatservers.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1OI8n4-0003a4-Lf for linux-lvm@redhat.com; Fri, 28 May 2010 16:16:35 -0700 Date: Fri, 28 May 2010 18:16:33 -0500 From: Ray Morris In-Reply-To: (from stuart@bmsi.com on Wed May 19 14:34:38 2010) Message-Id: <1275088593.18190.5@raydesk1.bettercgi.com> MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Subject: Re: [linux-lvm] Adding a disk to expand an existing logical volume 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: Content-Type: text/plain; charset="us-ascii"; delsp="Yes"; format="Flowed" To: LVM general discussion and development > If you aren't familiar with lvm.conf, then using labeled partitions > is a safer course. (initrd uses a copy of lvm.conf to find PVs so it > can activate the volume group of the root filesystem if necessary.) Perhaps my point was obscured by my other text, so I'll highlight it: > > It makes booting an recovering much more reliable in case of > > changes or problems. Agreed, if all the devices are listed in lvm.conf, mdadm.conf, etc. and nothing changes or has any problems then whole devices work fine. As long as all of the configuration files list everything and initrd knows about any changes. It's when something's not exactly how it was originally configured that it's really handy for raid devices to be marked as such by using partition type "fd", LVM devices to be marked as such by using partition type "8e", etc. That's been my experience. Your experience may differ, but that's my experience from dealing with a lot of "won't boot" situations. Having said that, if you use partitions it's important that the partition types not be WRONG. I once spent far too long trying to figure out why my devices were undetected. It turned out a RAID or LVM partition was marked with the default "83". -- Ray Morris support@bettercgi.com Strongbox - The next generation in site security: http://www.bettercgi.com/strongbox/ Throttlebox - Intelligent Bandwidth Control http://www.bettercgi.com/throttlebox/ Strongbox / Throttlebox affiliate program: http://www.bettercgi.com/affiliates/user/register.php On 05/19/2010 02:34:38 PM, Stuart D. Gathman wrote: > On Wed, 19 May 2010, Ray Morris wrote: > > > It's also useful during the boot process. If, for example, you > > later add another disk, this disk might become sdd, where it used to > > be sdc. That can confuse initrd and friends and result in an > > unbootable system. On almost every machine where I've skipped > > creating partitions for RAID or LVM, this kind of thing has come > > back to bite me later - maybe years later. Now, I always create > > "Linux LVM" partitions for LVM and "Linux raid autodetect" > partitions > > for RAID. It makes booting an recovering much more reliable in > > case of changes or problems. > > PVs are identified by UUID. It doesn't matter whether they change > names. And changing names from sdc1 to sdd1 is just as bad as > changing > names from sdc to sdd. > > However, you are correct that the default device searching rules used > by > lvm might work correctly with a Linux LVM labeled partition where > they might > otherwise skip a device. If you aren't familiar with lvm.conf, then > using labeled partitions is a safer course. (initrd uses a copy > of lvm.conf to find PVs so it can activate the volume group of the > root filesystem if necessary.) > > -- > Stuart D. Gathman > 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. > > _______________________________________________ > 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/ > >