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 1Q7nQZ-0000fB-QT for garchives@archives.gentoo.org; Thu, 07 Apr 2011 11:31:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5C352E05AF; Thu, 7 Apr 2011 11:29:05 +0000 (UTC) Received: from mx.virtyou.com (mx.virtyou.com [94.23.166.77]) by pigeon.gentoo.org (Postfix) with ESMTP id 21833E05AF for ; Thu, 7 Apr 2011 11:29:05 +0000 (UTC) Received: from weird.localnet (xdsl-78-35-142-41.netcologne.de [78.35.142.41]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.virtyou.com (Postfix) with ESMTPSA id 4A9893A600E for ; Thu, 7 Apr 2011 13:29:04 +0200 (CEST) From: Alex Schuster To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] LVM for data drives but not the OS Date: Thu, 7 Apr 2011 13:29:02 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.37-ck; KDE/4.6.1; x86_64; ; ) References: <4D9D9071.2050504@gmail.com> In-Reply-To: <4D9D9071.2050504@gmail.com> 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 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104071329.03106.wonko@wonkology.org> X-Archives-Salt: X-Archives-Hash: b91760be0723522afdf7767f97587740 Dale writes: > Quick question about LVM. I have a 750Gb drive that has miscellaneous > stuff on it. Stuff likes videos, music, pictures, ISO files and a few > other things. It's not full yet but it is working on it. I have my OS > on sda. The large drive is on sdc. If I buy another drive it should be > sdd. I think this is possible from what I have read but want to make > sure. Could I put sdc and sdd on LVM but the OS remain as it is with > LVM not involved at all? Basically, my OS stays just like it is and is > not touched my LVM at all but the two larger drives are managed by LVM. > > I want to do it this way because I don't trust LVM enough to put my OS > on. Just my personal opinion on LVM. # create some partitions, or a single one. I prefer to have multiple ones, just in case I want to put other stuff there, like another OS. cfdisk /dev/sdd # create physical volumes (assuming you have /dev/sdd5 to /dev/sdd8) pvcreate /dev/sdd[5678] # create volume group 'stuff', using all those partitions vgcreate stuff /dev/sdd[5678] # create logical volumes. You probably will only have a single one, but here's how you would do this if you want three. lvcreate -L 300G -n music stuff lvcreate -L 100G -n pictures stuff lvcreate -L 100G -n other stuff # create file systems for fs in music pictures other do mke2fs -j -m 1 -L $fs /dev/stuff/$fs done > If there is a better solution to link two large drives, I'm open to > those ideas as well. LVM is all I can think of is why I mention it. RAID would be another solution. Beware, when one drive fails, all data can be lost. # mount the filesystems, and move stuff from sdc to them # call cfdisk and partition sdc (if you like) # create physical volumes: pvcreate /dev/sdc* # extend volume group vgextend stuff /dev/sdc* # want to enlarge file systems? lvresize -L 1000G /dev/stuff/other resize2fs /dev/stuff/other Use pvscan, lvscan and vgscan to check what physical/logical volumes and volume groups you have. {pv,lv,vg}dispklay give more verbose information. You might want to have more than one volume group. Maybe one for not so important data, that spans over two disks, and one or two that reside on a single drive only. So in case one drive fails, you do not lose too much data. What about a volume group that stores backups of each file system on sda? Wonko