Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
@ 2011-11-01 18:39 Dan White
  2011-11-01 18:45 ` Digimer
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Dan White @ 2011-11-01 18:39 UTC (permalink / raw)
  To: linux-lvm

Is a logical volume group necessary before one can start making mountable partitions ?

I'm trying to work with a SAN.  We were allocated a 10Gb LUN to "play" with. Another admin created a logical volume on the LUN and then made a single partition out of the logical volume.  The flow I am familiar with from Red Hat's GUI is to first make a logical volume group, then make partitions in the group that I can adjust in size as necessary.

Are both workflows valid ?

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-01 18:39 [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ? Dan White
@ 2011-11-01 18:45 ` Digimer
  2011-11-01 19:13   ` Dan White
  2011-11-01 21:09 ` Ray Morris
  2011-11-02 10:18 ` James Hawtin
  2 siblings, 1 reply; 20+ messages in thread
From: Digimer @ 2011-11-01 18:45 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Dan White

On 11/01/2011 02:39 PM, Dan White wrote:
> Is a logical volume group necessary before one can start making mountable partitions ?
> 
> I'm trying to work with a SAN.  We were allocated a 10Gb LUN to "play" with. Another admin created a logical volume on the LUN and then made a single partition out of the logical volume.  The flow I am familiar with from Red Hat's GUI is to first make a logical volume group, then make partitions in the group that I can adjust in size as necessary.
> 
> Are both workflows valid ?

LVs must be created from VGs.

-- 
Digimer
E-Mail:              digimer@alteeve.com
Freenode handle:     digimer
Papers and Projects: http://alteeve.com
Node Assassin:       http://nodeassassin.org
"omg my singularity battery is dead again.
stupid hawking radiation." - epitron

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-01 18:45 ` Digimer
@ 2011-11-01 19:13   ` Dan White
  2011-11-01 19:20     ` Digimer
  0 siblings, 1 reply; 20+ messages in thread
From: Dan White @ 2011-11-01 19:13 UTC (permalink / raw)
  To: LVM general discussion and development

----- Digimer <linux@alteeve.com> wrote:
> On 11/01/2011 02:39 PM, Dan White wrote:
> > Is a logical volume group necessary before one can start making mountable partitions ?
> > 
> > I'm trying to work with a SAN.  We were allocated a 10Gb LUN to "play" with. Another admin created a logical volume on the LUN and then made a single partition out of the logical volume.  The flow I am familiar with from Red Hat's GUI is to first make a logical volume group, then make partitions in the group that I can adjust in size as necessary.
> > 
> > Are both workflows valid ?
> 
> LVs must be created from VGs.
> 

I agree.  Got a documentation reference I can use for backup ?

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-01 19:13   ` Dan White
@ 2011-11-01 19:20     ` Digimer
  2011-11-01 19:51       ` Dan White
  0 siblings, 1 reply; 20+ messages in thread
From: Digimer @ 2011-11-01 19:20 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Dan White

On 11/01/2011 03:13 PM, Dan White wrote:
> ----- Digimer <linux@alteeve.com> wrote:
>> On 11/01/2011 02:39 PM, Dan White wrote:
>>> Is a logical volume group necessary before one can start making mountable partitions ?
>>>
>>> I'm trying to work with a SAN.  We were allocated a 10Gb LUN to "play" with. Another admin created a logical volume on the LUN and then made a single partition out of the logical volume.  The flow I am familiar with from Red Hat's GUI is to first make a logical volume group, then make partitions in the group that I can adjust in size as necessary.
>>>
>>> Are both workflows valid ?
>>
>> LVs must be created from VGs.
>>
> 
> I agree.  Got a documentation reference I can use for backup ?

man lvcreate? Not being flippant, but the 'VolumeGroupName' is a
required value. :)

Also from the man page;

DESCRIPTION
       lvcreate creates a new logical volume in a volume group  (  see
vgcre-
       ate(8), vgchange(8) ) by allocating logical extents from the free
phys-
       ical extent pool of that volume group.  If there are  not  enough
 free
       physical  extents  then  the  volume  group can be extended ( see
vgex-
       tend(8) ) with other physical volumes or by reducing  existing
logical
       volumes  of this volume group in size ( see lvreduce(8) ). If you
spec-
       ify one or more PhysicalVolumes, allocation of physical extents
will be
       restricted to these volumes.
       The second form supports the creation of snapshot logical volumes
which
       keep the contents of the original logical volume for backup purposes.


-- 
Digimer
E-Mail:              digimer@alteeve.com
Freenode handle:     digimer
Papers and Projects: http://alteeve.com
Node Assassin:       http://nodeassassin.org
"omg my singularity battery is dead again.
stupid hawking radiation." - epitron

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-01 19:20     ` Digimer
@ 2011-11-01 19:51       ` Dan White
  2011-11-02 14:02         ` Mark H. Wood
  0 siblings, 1 reply; 20+ messages in thread
From: Dan White @ 2011-11-01 19:51 UTC (permalink / raw)
  To: Digimer; +Cc: LVM general discussion and development

----- Digimer <linux@alteeve.com> wrote:
> On 11/01/2011 03:13 PM, Dan White wrote:
> > ----- Digimer <linux@alteeve.com> wrote:
> >> On 11/01/2011 02:39 PM, Dan White wrote:
> >>> Is a logical volume group necessary before one can start making mountable partitions ?
> >>>
> >>> I'm trying to work with a SAN.  We were allocated a 10Gb LUN to "play" with. Another admin created a logical volume on the LUN and then made a single partition out of the logical volume.  The flow I am familiar with from Red Hat's GUI is to first make a logical volume group, then make partitions in the group that I can adjust in size as necessary.
> >>>
> >>> Are both workflows valid ?
> >>
> >> LVs must be created from VGs.
> >>
> > 
> > I agree.  Got a documentation reference I can use for backup ?
> 
> man lvcreate? Not being flippant, but the 'VolumeGroupName' is a
> required value. :)
> 
> Also from the man page;
> 
> DESCRIPTION
>        lvcreate creates a new logical volume in a volume group  (  see vgcre-
>        ate(8), vgchange(8) ) by allocating logical extents from the free  phys-
>        ical extent pool of that volume group.  If there are  not  enough free
>        physical  extents  then  the  volume  group can be extended ( see vgex-
>        tend(8) ) with other physical volumes or by reducing  existing logical
>        volumes  of this volume group in size ( see lvreduce(8) ). If you spec-
>        ify one or more PhysicalVolumes, allocation of physical extents will be
>        restricted to these volumes.
>        The second form supports the creation of snapshot logical volumes which
>        keep the contents of the original logical volume for backup purposes.
> 

Many thanks.  Not at all flippant.  Direct and informative.

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-01 18:39 [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ? Dan White
  2011-11-01 18:45 ` Digimer
@ 2011-11-01 21:09 ` Ray Morris
  2011-11-02 10:18 ` James Hawtin
  2 siblings, 0 replies; 20+ messages in thread
From: Ray Morris @ 2011-11-01 21:09 UTC (permalink / raw)
  To: linux-lvm

Just to clarify, this did not happen:

> Another admin created a logical volume on the LUN and
> then made a single partition out of the logical volume.

He may have done nothing with logical volumes at all and just 
partitioned the LUN. Alternatively, he may have made the LUN a 
physical volume, added that physical volume to a volume group, 
and made an LV within the group. There's no such thing as making
a logical volume that's in no group and is not stored on any 
physical volume, though.

> Are both workflows valid ?

If he just partitioned the LUN, that's just like partitioning
a physical drive. That's how it was done in 1971. It works, for the
immediate need. If you ever want to resize it, move it, mirror it, 
etc. it starts to get painful pretty fast. If you have a filesystem 
that's 100 GB on a disk that's 100GB, how to do make it larger?
Go buy a new larger disk, take the system off line, copy the data ...
A LUN or a physical disk, same thing process to resize it.
By using LVM, the resize process can be a single command:
lvextend -L 200GB mygroup/mylv
-- 
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 Tue, 1 Nov 2011 18:39:52 +0000 (UTC)
Dan White <ygor@comcast.net> wrote:

> Is a logical volume group necessary before one can start making
> mountable partitions ?
> 
> I'm trying to work with a SAN.  We were allocated a 10Gb LUN to
> "play" with. Another admin created a logical volume on the LUN and
> then made a single partition out of the logical volume.  The flow I
> am familiar with from Red Hat's GUI is to first make a logical volume
> group, then make partitions in the group that I can adjust in size as
> necessary.
> 
> Are both workflows valid ?
> 
> “Sometimes I think the surest sign that intelligent life exists
> elsewhere in the universe is that none of it has tried to contact
> us.” Bill Waterson (Calvin & Hobbes)
> 
> _______________________________________________
> 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/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-01 18:39 [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ? Dan White
  2011-11-01 18:45 ` Digimer
  2011-11-01 21:09 ` Ray Morris
@ 2011-11-02 10:18 ` James Hawtin
  2011-11-02 11:41   ` Marek Podmaka
  2 siblings, 1 reply; 20+ messages in thread
From: James Hawtin @ 2011-11-02 10:18 UTC (permalink / raw)
  To: LVM general discussion and development

Dan White wrote:
> Is a logical volume group necessary before one can start making mountable partitions ?
>
> I'm trying to work with a SAN.  We were allocated a 10Gb LUN to "play" with. Another admin created a logical volume on the LUN and then made a single partition out of the logical volume.  The flow I am familiar with from Red Hat's GUI is to first make a logical volume group, then make partitions in the group that I can adjust in size as necessary.
>
> Are both workflows valid ?
>
>   

It would have been possible to just build a filesystem directly on the 
disk, to do a single partition with all the space, I would never do the 
first thing as it is possible for other sysadmins easily make the 
mistake of thinking the disk was blank, (particularly if it is not 
mounted all the time). The second one is fine however the problem is if 
you ever with to change to size of the partition, it is possible but it 
is hard work.

Personally even with LVM I would still write a partition table the disk, 
this helps show the disk as being used to other system administrators, 
however there would be one partition on it of type 8e, and on that I 
would create a PV (physical volume), this PV can then be used to create 
a VG (Volume group) or be added to an exisiting one, when i create VGs I 
normally use an ext size of arround 128m->256m to keep down the number 
of disk fragments managed by the kernel. From that VG I can create an LV 
(Logical Volume) Personally I would never allocate the whole space in a 
volume group to an LV, even the volume group was just being used to join 
disks together to make one huge filesystem, I try to keep by 5% of the 
disk space this will allow the use of snapshots which are create for 
keeping things consistent when backups are done.

As other posters have said, LVM always making changes to disk space much 
easier, try the following with a partion table along...

Shrink 10g filesystem to 2g
Create another 2g filesystem
Expand first filesystem back to 8g
And another 10g peice of disk and add the space to the first filesystem.

James

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 10:18 ` James Hawtin
@ 2011-11-02 11:41   ` Marek Podmaka
  2011-11-02 13:37     ` James Hawtin
  2011-11-02 14:18     ` Mark H. Wood
  0 siblings, 2 replies; 20+ messages in thread
From: Marek Podmaka @ 2011-11-02 11:41 UTC (permalink / raw)
  To: LVM general discussion and development

Hello,

Wednesday, November 2, 2011, 11:18:50, James Hawtin wrote:

> Personally even with LVM I would still write a partition table the disk,
> this helps show the disk as being used to other system administrators,
> however there would be one partition on it of type 8e, and on that I 
> would create a PV (physical volume), this PV can then be used to create

How do you extend the PV then? For example extend the LUN on storage
or just resize a RAID1+0 set by adding 2 new disks... Resizing the
block device is no problem, resizing the PV also, but to resize the
PV, you need to resize the partition also - and if I remember well,
the kernel won't re-read the new partition table while it is used...


-- 
  bYE, Marki

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 11:41   ` Marek Podmaka
@ 2011-11-02 13:37     ` James Hawtin
  2011-11-02 14:18     ` Mark H. Wood
  1 sibling, 0 replies; 20+ messages in thread
From: James Hawtin @ 2011-11-02 13:37 UTC (permalink / raw)
  To: Marek Podmaka, LVM general discussion and development

Marek Podmaka wrote:
> Hello,
>
> Wednesday, November 2, 2011, 11:18:50, James Hawtin wrote:
>
>   
>> Personally even with LVM I would still write a partition table the disk,
>> this helps show the disk as being used to other system administrators,
>> however there would be one partition on it of type 8e, and on that I 
>> would create a PV (physical volume), this PV can then be used to create
>>     
>
> How do you extend the PV then? For example extend the LUN on storage
> or just resize a RAID1+0 set by adding 2 new disks... Resizing the
> block device is no problem, resizing the PV also, but to resize the
> PV, you need to resize the partition also - and if I remember well,
> the kernel won't re-read the new partition table while it is used...
>
>
>   
I never have need to extend a PV, I just add a new piece of disk (LUN) 
to the server, create a PV on that and extend the volume group and LV. 
There is pvresize if you really  want to extend an lun, that could be 
used after making the disk larger or fdisking more space, however I 
never have need to do that, I pretty much always present a new lun. You 
can also create a second partition on a larged disk and then create a PV 
on that too... LVM is designed to join all your bits of disk together, 
so you don't have to need one continue peice of space to provide the disk.

Using pvmove I can allocate a larger new piece of disk and online move 
all the data from an old pv to a new one as well. In my experence with 
working with large san system rays are not in general extended, whole 
new ones are added instead. Personally I would not extend and existing 
array with an additional mirror concat, I would prefer to use raid 10 or 
use software striping in LVM with seperately presented LUNs for each 
mirrored pair as that would work the disk harder.

James

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-01 19:51       ` Dan White
@ 2011-11-02 14:02         ` Mark H. Wood
  0 siblings, 0 replies; 20+ messages in thread
From: Mark H. Wood @ 2011-11-02 14:02 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

BTW I wouldn't call it a "logical volume group".  It's not a group of
logical volumes, but of physical volumes to be treated as a single
slab of storage capacity.  You pile 1-n physical volumes together as a
volume group and then slice off various amounts of the group's
capacity in which to make logical volumes.

A group of one PV may seem strange at first, but it makes things
easier than having to make the LV layer understand *both* the VG and
PV layers.  Not to mention the sysadmin having to understand and
remember two different layerings.

I operate a bunch of boxes with hardware RAID and every one of them is
currently set up as 1 PV : 1 VG : n LV.  (None has enough disks to
make multiple RAID sets worthwhile, or in most cases even possible.)
I see the VG abstraction as capacity to deal with problems that just
haven't come to our shop yet.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Asking whether markets are efficient is like asking whether people are smart.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 11:41   ` Marek Podmaka
  2011-11-02 13:37     ` James Hawtin
@ 2011-11-02 14:18     ` Mark H. Wood
  2011-11-02 14:50       ` Marek Podmaka
  1 sibling, 1 reply; 20+ messages in thread
From: Mark H. Wood @ 2011-11-02 14:18 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]

On Wed, Nov 02, 2011 at 12:41:29PM +0100, Marek Podmaka wrote:
> Wednesday, November 2, 2011, 11:18:50, James Hawtin wrote:
> > Personally even with LVM I would still write a partition table the disk,
> > this helps show the disk as being used to other system administrators,
> > however there would be one partition on it of type 8e, and on that I 
> > would create a PV (physical volume), this PV can then be used to create
> 
> How do you extend the PV then? For example extend the LUN on storage
> or just resize a RAID1+0 set by adding 2 new disks... Resizing the
> block device is no problem, resizing the PV also, but to resize the
> PV, you need to resize the partition also - and if I remember well,
> the kernel won't re-read the new partition table while it is used...

That's just it -- normally you don't change the size of a PV.  That's
the reason for VGs, which can be expanded anytime by adding new PVs.

To add capacity from a SAN, you could either:

1.  create a new LUN, create a PV on it, and add it to a VG; or
2.  expand the LUN, create a new PV in the added space, and add it to a
    VG.

In case (2) you'd need to have partitioned the LUN before building the
first PV on (a partition of) it, so that there can be multiple PVs on
the LUN.

There is weirdness in the SAN case because you have two LVM
implementations layered up:  one in the SAN fabric and another in the
client host.  Come to think of it:  your hardware RAID probably has
its own LVM implementation too, though it is probably a bare-bones one.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Asking whether markets are efficient is like asking whether people are smart.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 14:18     ` Mark H. Wood
@ 2011-11-02 14:50       ` Marek Podmaka
  2011-11-02 14:56         ` James Hawtin
  0 siblings, 1 reply; 20+ messages in thread
From: Marek Podmaka @ 2011-11-02 14:50 UTC (permalink / raw)
  To: LVM general discussion and development

Hello,

Wednesday, November 2, 2011, 15:18:42, Mark H. Wood wrote:

> That's just it -- normally you don't change the size of a PV.  That's
> the reason for VGs, which can be expanded anytime by adding new PVs.

> To add capacity from a SAN, you could either:

> 1.  create a new LUN, create a PV on it, and add it to a VG; or
> 2.  expand the LUN, create a new PV in the added space, and add it to a
>     VG.

I am working with large SANs at work, so I am familiar with that. In
the past, we always added a new LUN and after few years we ended with
40-120 LUNs per VG which is really a mess. Recently many disk arrays
and unix systems started to support online LUN resize which is much
more manageable.

My question was about if it is possible to change the partition table
(extend partition or add new partition) while using the PV in
activated VG.


-- 
  bYE, Marki

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 14:50       ` Marek Podmaka
@ 2011-11-02 14:56         ` James Hawtin
  2011-11-02 15:06           ` Dan White
  0 siblings, 1 reply; 20+ messages in thread
From: James Hawtin @ 2011-11-02 14:56 UTC (permalink / raw)
  To: Marek Podmaka, LVM general discussion and development

Marek Podmaka wrote:
>
> My question was about if it is possible to change the partition table
> (extend partition or add new partition) while using the PV in
> activated VG.
>
>   

Yes it is possible however like with all things some times it does not 
work and the kernel fails to re-read it, this can also happen with 
resizing disks, and sometimes online lun presentation does not work either.

James

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 14:56         ` James Hawtin
@ 2011-11-02 15:06           ` Dan White
  2011-11-02 16:39             ` James Hawtin
                               ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Dan White @ 2011-11-02 15:06 UTC (permalink / raw)
  To: LVM general discussion and development

----- James Hawtin <oolon@ankh.org> wrote:
> Marek Podmaka wrote:
> >
> > My question was about if it is possible to change the partition table
> > (extend partition or add new partition) while using the PV in
> > activated VG.
> >
> >   
> 
> Yes it is possible however like with all things some times it does not 
> work and the kernel fails to re-read it, this can also happen with 
> resizing disks, and sometimes online lun presentation does not work either.
> 
> James

I just experienced that.

I had to reboot the machine to "see" the expanded LUN.
I used fdisk to make a partition out of the LUN expansion, but I had to reboot again before I could do anything further.
After the second reboot, I was able to make a PV out of the new partition, roll it into the existing VG and then expand the two test LV's I had previously created to utilize the new elbow room.

This is on a RHEL 5.7 system.

Is there a way to do this without the rebooting ?

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 15:06           ` Dan White
@ 2011-11-02 16:39             ` James Hawtin
  2011-11-02 17:30               ` Eugene Vilensky
  2011-11-02 18:23               ` Dan White
  2011-11-02 17:57             ` Galen Seitz
  2011-11-03  6:53             ` Marek Podmaka
  2 siblings, 2 replies; 20+ messages in thread
From: James Hawtin @ 2011-11-02 16:39 UTC (permalink / raw)
  To: LVM general discussion and development

Dan White wrote:
>
> I just experienced that.
>
> I had to reboot the machine to "see" the expanded LUN.
> I used fdisk to make a partition out of the LUN expansion, but I had to reboot again before I could do anything further.
> After the second reboot, I was able to make a PV out of the new partition, roll it into the existing VG and then expand the two test LV's I had previously created to utilize the new elbow room.
>
> This is on a RHEL 5.7 system.
>
> Is there a way to do this without the rebooting ?
>
>   
Assuming the device is sda then

|echo 1 > /sys/block/sda/device/rescan|

However if that fails (and it can) only a reboot or removing the disk 
driver module and reinstalling it will scan it correctly (possible if 
you have a mix of local and san disk) however probably a reboot is easiler.

James

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 16:39             ` James Hawtin
@ 2011-11-02 17:30               ` Eugene Vilensky
  2011-11-02 18:23               ` Dan White
  1 sibling, 0 replies; 20+ messages in thread
From: Eugene Vilensky @ 2011-11-02 17:30 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

On Wed, Nov 2, 2011 at 11:39 AM, James Hawtin <oolon@ankh.org> wrote:

> Dan White wrote:
>
>>
>> I just experienced that.
>>
>> I had to reboot the machine to "see" the expanded LUN.
>> I used fdisk to make a partition out of the LUN expansion, but I had to
>> reboot again before I could do anything further.
>> After the second reboot, I was able to make a PV out of the new
>> partition, roll it into the existing VG and then expand the two test LV's I
>> had previously created to utilize the new elbow room.
>>
>> This is on a RHEL 5.7 system.
>>
>> Is there a way to do this without the rebooting ?
>>
>>
>>
> Assuming the device is sda then
>
> |echo 1 > /sys/block/sda/device/rescan|
>
> However if that fails (and it can) only a reboot or removing the disk
> driver module and reinstalling it will scan it correctly (possible if you
> have a mix of local and san disk) however probably a reboot is easiler.


Not sure if this sort of thing matters to everyone, but I was informed by
Support that despite methods that may be available at hand, a reboot is the
only "Supported" method of recognizing changed partition information on a
disk that is in use.  -1.

[-- Attachment #2: Type: text/html, Size: 1616 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 15:06           ` Dan White
  2011-11-02 16:39             ` James Hawtin
@ 2011-11-02 17:57             ` Galen Seitz
  2011-11-03  6:53             ` Marek Podmaka
  2 siblings, 0 replies; 20+ messages in thread
From: Galen Seitz @ 2011-11-02 17:57 UTC (permalink / raw)
  To: LVM general discussion and development

Dan White wrote:
> ----- James Hawtin <oolon@ankh.org> wrote:
> 
> I had to reboot the machine to "see" the expanded LUN. I used fdisk
> to make a partition out of the LUN expansion, but I had to reboot
> again before I could do anything further. After the second reboot,
> I was able to make a PV out of the new partition, roll it into the
> existing VG and then expand the two test LV's I had previously
> created to utilize the new elbow room.
> 
> This is on a RHEL 5.7 system.
> 
> Is there a way to do this without the rebooting ?

I don't know about the first reboot(not a SAN/LUN user), but I would
expect the second reboot could be avoided by running partprobe.

-- 
Galen Seitz
galens@seitzassoc.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 16:39             ` James Hawtin
  2011-11-02 17:30               ` Eugene Vilensky
@ 2011-11-02 18:23               ` Dan White
  2011-11-02 18:41                 ` Dan White
  1 sibling, 1 reply; 20+ messages in thread
From: Dan White @ 2011-11-02 18:23 UTC (permalink / raw)
  To: LVM general discussion and development

----- James Hawtin <oolon@ankh.org> wrote:
> Dan White wrote:
> >
> > I just experienced that.
> >
> > I had to reboot the machine to "see" the expanded LUN.
> > I used fdisk to make a partition out of the LUN expansion, but I had to reboot again before I could do anything further.
> > After the second reboot, I was able to make a PV out of the new partition, roll it into the existing VG and then expand the two test LV's I had previously created to utilize the new elbow room.
> >
> > This is on a RHEL 5.7 system.
> >
> > Is there a way to do this without the rebooting ?
> >
> >   
> Assuming the device is sda then
> 
> |echo 1 > /sys/block/sda/device/rescan|
> 
> However if that fails (and it can) only a reboot or removing the disk 
> driver module and reinstalling it will scan it correctly (possible if 
> you have a mix of local and san disk) however probably a reboot is easiler.
> 

OK.
How about the addition of a new LUN ?

A new device (/dev/sdb) should "appear", but I'd like to do it without rerbooting.

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 18:23               ` Dan White
@ 2011-11-02 18:41                 ` Dan White
  0 siblings, 0 replies; 20+ messages in thread
From: Dan White @ 2011-11-02 18:41 UTC (permalink / raw)
  To: LVM general discussion and development

----- Dan White <ygor@comcast.net> wrote:
> ----- James Hawtin <oolon@ankh.org> wrote:
> > Dan White wrote:
> > >
> > > I just experienced that.
> > >
> > > I had to reboot the machine to "see" the expanded LUN.
> > > I used fdisk to make a partition out of the LUN expansion, but I had to reboot again before I could do anything further.
> > > After the second reboot, I was able to make a PV out of the new partition, roll it into the existing VG and then expand the two test LV's I had previously created to utilize the new elbow room.
> > >
> > > This is on a RHEL 5.7 system.
> > >
> > > Is there a way to do this without the rebooting ?
> > >
> > >   
> > Assuming the device is sda then
> > 
> > |echo 1 > /sys/block/sda/device/rescan|
> > 
> > However if that fails (and it can) only a reboot or removing the disk 
> > driver module and reinstalling it will scan it correctly (possible if 
> > you have a mix of local and san disk) however probably a reboot is easiler.
> > 
> 
> OK.
> How about the addition of a new LUN ?
> 
> A new device (/dev/sdb) should "appear", but I'd like to do it without rerbooting.
> 

!! Found the answer myself !!

echo "- - -" > /sys/class/scsi_host/hostX/scan 

where "X" is the controller you want to refresh.  On my system, I see host0 thru host5 in /sys/class/scsi_host/, so I did all 6 and /dev/sdb appeared.  I was able to roll it into my volume group with system-config-lvm.

Wahoo !!

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?
  2011-11-02 15:06           ` Dan White
  2011-11-02 16:39             ` James Hawtin
  2011-11-02 17:57             ` Galen Seitz
@ 2011-11-03  6:53             ` Marek Podmaka
  2 siblings, 0 replies; 20+ messages in thread
From: Marek Podmaka @ 2011-11-03  6:53 UTC (permalink / raw)
  To: LVM general discussion and development

Hello,

Wednesday, November 2, 2011, 16:06:12, Dan White wrote:

> This is on a RHEL 5.7 system.
> Is there a way to do this without the rebooting ?

Each layer must support the resize. For example we had issues with
multipath on SLES10 not being able to see the new LUN size. We were
using md raid1 over 2 LUNs from 2 arrays via multipath. So the only
solution except reboot was to break the mirror, remove device from
multipath, rescan busses so that all paths (/dev/sdX) see the new
size, apply it to multipath again (now it will see the new size) and
re-mirror. Then the same with the other side of mirror, then grow MD
device and finally grow PV. Of course it is not very useful if you
have big LUNs. On SLES11 multipath has command to rescan the new size
of underlying devices.

-- 
  bYE, Marki

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-11-03  6:53 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-01 18:39 [linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ? Dan White
2011-11-01 18:45 ` Digimer
2011-11-01 19:13   ` Dan White
2011-11-01 19:20     ` Digimer
2011-11-01 19:51       ` Dan White
2011-11-02 14:02         ` Mark H. Wood
2011-11-01 21:09 ` Ray Morris
2011-11-02 10:18 ` James Hawtin
2011-11-02 11:41   ` Marek Podmaka
2011-11-02 13:37     ` James Hawtin
2011-11-02 14:18     ` Mark H. Wood
2011-11-02 14:50       ` Marek Podmaka
2011-11-02 14:56         ` James Hawtin
2011-11-02 15:06           ` Dan White
2011-11-02 16:39             ` James Hawtin
2011-11-02 17:30               ` Eugene Vilensky
2011-11-02 18:23               ` Dan White
2011-11-02 18:41                 ` Dan White
2011-11-02 17:57             ` Galen Seitz
2011-11-03  6:53             ` Marek Podmaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox