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 1Q4oYH-0006XD-63 for garchives@archives.gentoo.org; Wed, 30 Mar 2011 06:06:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BE0781C092 for ; Wed, 30 Mar 2011 06:06:44 +0000 (UTC) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by pigeon.gentoo.org (Postfix) with ESMTP id 3D98D1C00B for ; Wed, 30 Mar 2011 05:52:33 +0000 (UTC) Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id E594B20726 for ; Wed, 30 Mar 2011 01:52:32 -0400 (EDT) Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 30 Mar 2011 01:52:32 -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=mv1LVTYrcazWADKFgZH50s/Ycu4=; b=gV9u/yP/jqGMLDIGHZB9qrae8twfHCmYP14x/qzT0wJg6wfWDC/lEN24BHY5pv2szpIc0b0geubxEXsOjHiduH8drMBmCOYhCBX2+cgw7luW6L5485IkP3tJjwGqwhxxP4Z4EbxlKDem3VX4t6F7JaTHO5694BGspL8tAUw9qGg= X-Sasl-enc: GZ3F91SSCVaCFsH4dxec2zY9fhWMUFiR+EFAKMlpTOIe 1301464352 Received: from [192.168.5.18] (serv.binarywings.net [83.169.5.6]) by mail.messagingengine.com (Postfix) with ESMTPSA id AC6124425E4 for ; Wed, 30 Mar 2011 01:52:31 -0400 (EDT) Message-ID: <4D92C4C3.7040402@binarywings.net> Date: Wed, 30 Mar 2011 07:50:59 +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: <4D92BF88.6000807@binarywings.net> In-Reply-To: <4D92BF88.6000807@binarywings.net> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4A5F89B34AE811F6CDE26560" X-Archives-Salt: X-Archives-Hash: 7ea2c6dba9fc264a09d3bcfc12b12583 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4A5F89B34AE811F6CDE26560 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 30.03.2011 07:28, schrieb Florian Philipp: > Am 30.03.2011 05:02, schrieb Einux: >> Hi, >> >> 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 keyw= ord. >> Could you guys help me out? >> >> Thanks in advance:) >> >> --=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= >=20 > 2. Partition the raid device >=20 > 3. Add one of the partitions to your LVM volume group. > pvcreate /dev/sdb2 > vgextend volume_group /dev/sdb2 >=20 > 4. Move everything from the old physical volumes to the new pv. > pvmove /dev/sda3 /dev/sdb2 >=20 > 5. Remove the old and now empty physical volume > vgreduce volume_group /dev/sda3 >=20 > 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. >=20 > 7. Grow your raid to also contain the old disk. > mdadm /dev/md0 -a /dev/sda >=20 > No, I have not tested this and you should double-check everything. No > guarantees, etc. >=20 > 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 tro= uble. >=20 > Hope this helps, > Florian Philipp >=20 Argh, of course a partition on md0 is not called sdb2. Just if that got you confused ;) --------------enig4A5F89B34AE811F6CDE26560 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/ iEYEARECAAYFAk2SxMcACgkQqs4uOUlOuU+g5gCff0YPSyx5DNp9a5bqlLn+avEp MZAAn1dTtl6MPuRXalQO9MwKZbgxLUGs =LHD0 -----END PGP SIGNATURE----- --------------enig4A5F89B34AE811F6CDE26560--