From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q4oVw-0006Er-Kg for garchives@archives.gentoo.org; Wed, 30 Mar 2011 06:04:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 496EE1C089 for ; Wed, 30 Mar 2011 06:04:20 +0000 (UTC) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by pigeon.gentoo.org (Postfix) with ESMTP id 42CBF1C040 for ; Wed, 30 Mar 2011 05:30:14 +0000 (UTC) Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id E99302099B for ; Wed, 30 Mar 2011 01:30:13 -0400 (EDT) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 30 Mar 2011 01:30:13 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:references:in-reply-to:content-type; s=smtpout; bh=dox1b8KW9paWNpWqD0x7Wcr1oh8=; b=NVo3EEvT+2vPnlD1ofL6VDyJ+Xvn5No85SlyOekYpmI2XWwVtIG4Y1yMmKdAh3H+hyitamCNFv9fWJU8koZYA2Hb9QNS7RV0RjY1g6UXJ+4vBfxQ3uyNZTSK/JnrvQGhZPNZOOOpWxgqANjOu6GsDoyoNFoPdsf8vRfq1EZFCEI= X-Sasl-enc: 44V659iPy5YhQJIhYauaXMHtrg8o4dQFhWLIe2E9SF9c 1301463013 Received: from [192.168.5.18] (serv.binarywings.net [83.169.5.6]) by mail.messagingengine.com (Postfix) with ESMTPSA id A534C404F73 for ; Wed, 30 Mar 2011 01:30:12 -0400 (EDT) Message-ID: <4D92BF88.6000807@binarywings.net> Date: Wed, 30 Mar 2011 07:28:40 +0200 From: Florian Philipp User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110313 Lightning/1.0b3pre Thunderbird/3.1.9 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] How to change from one harddrive to software raid References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5F5EACE5D16F93CF2378BB17" X-Archives-Salt: X-Archives-Hash: 094d2638f8379f781c6e37f51af66fc3 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5F5EACE5D16F93CF2378BB17 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 30.03.2011 05:02, schrieb Einux: > Hi, >=20 > I bought a new 1T harddrive which is exactly the same as my previous > harddrive. So I'm planning to make a Raid-1 layout(for security > reasons). But here's the problem: I've already setup LVM2 on the > existing harddrive and I don't want to destroy the existing LVM volume > groups. I tried to google it, but I'm not sure which is the right keywo= rd. > Could you guys help me out? >=20 > Thanks in advance:) >=20 > --=20 > Best Regards, > Einux >=20 1. Create a degenerated RAID1 with your new disk mdadm --create /dev/md0 --level=3D1 --raid-devices=3D2 missing /dev/sdb 2. Partition the raid device 3. Add one of the partitions to your LVM volume group. pvcreate /dev/sdb2 vgextend volume_group /dev/sdb2 4. Move everything from the old physical volumes to the new pv. pvmove /dev/sda3 /dev/sdb2 5. Remove the old and now empty physical volume vgreduce volume_group /dev/sda3 6. Move everything else which is not on LVM to your new raid. Guess you need to go to single user mode to do this safely. 7. Grow your raid to also contain the old disk. mdadm /dev/md0 -a /dev/sda No, I have not tested this and you should double-check everything. No guarantees, etc. One warning, though: pvmove is known to create problems from time to time. Leaking memory, bogging systems with infinite system load and so on. If it gives you trouble, you can abort it with `pvmove --abort` and try it again later by calling `pvmove volume_group` (without physical device specified) to resume it. It SHOULD survive system crashes. Trying another kernel version sometimes helps when pvmove gives you troub= le. Hope this helps, Florian Philipp --------------enig5F5EACE5D16F93CF2378BB17 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2Sv4wACgkQqs4uOUlOuU/fBwCfVpP5YM7BNS6FLK90eogxv0fD MMsAnAw6+reLylieXJtC/yUj5CkgLOb5 =qG+d -----END PGP SIGNATURE----- --------------enig5F5EACE5D16F93CF2378BB17--