Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.16]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s47ErJDv005775 for ; Wed, 7 May 2014 10:53:19 -0400 Received: from nm18-vm0.bullet.mail.bf1.yahoo.com (nm18-vm0.bullet.mail.bf1.yahoo.com [98.139.213.138]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s47ErHKx006297 for ; Wed, 7 May 2014 10:53:17 -0400 References: <1399447987.73696.YahooMailNeo@web141603.mail.bf1.yahoo.com> <5369FFAB.2040701@redhat.com> <1399457072.41382.YahooMailNeo@web141606.mail.bf1.yahoo.com> <536A24FC.4010907@redhat.com> Message-ID: <1399474396.32446.YahooMailNeo@web141604.mail.bf1.yahoo.com> Date: Wed, 7 May 2014 07:53:16 -0700 (PDT) From: Mahmood Naderan In-Reply-To: <536A24FC.4010907@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [linux-lvm] Add a disk from remote node to LVM Reply-To: Mahmood Naderan , 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="iso-8859-1" To: Peter Rajnoha Cc: LVM general discussion and development >One option here is to export the sdb on N2 as iscsi target and then connec= t it to N1 node. Seems to be good. I will try that =EF=BF=BD Regards, Mahmood On Wednesday, May 7, 2014 4:50 PM, Peter Rajnoha wrot= e: On 05/07/2014 12:04 PM, Mahmood Naderan wrote: >=20 >=20 >=20 >> How do you mean "remote drive" exactly? What type is it - is it iscsi, n= bd...? >=20 > There are two nodes in a single rack. Each has 4 slots for SATAII disks. = Current configuration is >=20 >=20 > N1: /dev/sda, /dev/sdb, /dev/sdc, /dev/sdd where the last three (b, c, d)= are grouped in in a single LVM volume. >=20 >=20 > N2: /dev/sda, /dev/sdb where the last one (b) is free and I want to add i= t to the LVM of N1. >=20 > Each node is running an independent operating system (scientific linux)Cu= rrently /dev/sdb on N2 is not shared. I have just format it as ext4 (which = is the same format as the LVM of N1). >=20 >=20 One option here is to export the sdb on N2 as iscsi target and then connect it to N1 node. But you must be very careful that nothing touches the sdb on= N2 (mainly not writing anything to the drive or not trying to activate anythin= g that can be found on the drive), including LVM itself. As for LVM, you should co= nfigure global_filter (or filter if you have older version of LVM) in /etc/lvm/lvm.= conf to exclude sdb on LVM scans (also, be cautious that under some circumnstanc= es "sdb" is not stable name and kernel can assign a different name on next reb= oot). For example you can have a look at these howtos - there are slight differen= ces amongst distributions, mainly the package names, but the logic stays the sa= me: http://www.howtoforge.com/using-iscsi-on-fedora-10-initiator-and-target http://www.howtoforge.com/using-iscsi-on-debian-squeeze-initiator-and-target http://www.howtoforge.com/using-iscsi-on-ubuntu-10.04-initiator-and-target But iscsi is just one option, there are more options how to export a drive and attach it on remote node... You can also check for "nbd" (network block= device), that's another way that comes to my mind at the moment. Though the best in your case would be if you could just attach the drive physically to the machine where needed, if possible, of course. >=20 >> But essentially, you need to connect the remote drive first and then do = a pvcreate and vgextend. >=20 > Should I run these commands on N1 or N2? Once you have the remote drive attached (let's say it ends up attached as s= dx on N1), just use: pvcreate /dev/sdx vgextend vg /dev/sdx (replace sdx and vg with actualy drive and vg name) And you're done. --=20 Peter