Re: lvcreate succeeds but no /dev/mapper device

2012-10-23 Thread Douglas Wooster
> Clearly we need more education ... a bit more of the "why to"
> along with the "how to".

I second that!

Douglas Wooster

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


Re: lvcreate succeeds but no /dev/mapper device

2012-10-22 Thread Richard Troth
> Progress - I'm working with Steffen off-line.  There well may be a bug,
> but as a workaround I am working with the devices (e.g. mpatha) rather
> than the first partition of each device (mpathap1).  With that change, the
> new LV is available immediately. ...

I recommend not partitioning as a first course.
Some of the Böblingen team (and others) slap me down when I get out of
line because there are dangers with it where CDL is concerned. (But
CDL is a can of worms all by itself.)

For SAN volumes used as PVs, it really makes sense. (to not partition;
to use the "device" instead)

Clearly we need more education ... a bit more of the "why to" along
with the "how to".

LVM effectively replaces partitioning in many contexts.

-- R;
Rick Troth
Velocity Software
http://www.velocitysoftware.com/

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


Re: lvcreate succeeds but no /dev/mapper device

2012-10-19 Thread Michael MacIsaac
Progress - I'm working with Steffen off-line.  There well may be a bug,
but as a workaround I am working with the devices (e.g. mpatha) rather
than the first partition of each device (mpathap1).  With that change, the
new LV is available immediately. ...

Thanks for everyone's help.

"Mike MacIsaac" 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


Re: lvcreate succeeds but no /dev/mapper device

2012-10-19 Thread Steffen Maier

Hi Mike,

On 10/19/2012 01:31 PM, Michael MacIsaac wrote:

udevadm settle is not always reliable and the last response was
that you have to sit and poll until the device actually appears


This one is worse - the LV  *never* appears in either directory until
after reboot and "lvdisplay oradata_lv"  hangs the system. On the console
while lvdisplay is hung, I see these messages:

INFO: task lvdisplay:5188 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
lvdisplay D 004cd070 0  5188   5119 0x0200
7bd5e078 004d6a00 00132c0a 7b80b850
7b80b820 0080ee80 008a7e00 7bd5e4d8
0001 7bd5e4d8 7bd17800 0080ee80
008a7e00 7bd5e4d8 7ee98040 03379e00
004d6d18 004cc5b8 7b80b850 7b80ba08
Call Trace:
(Ý<004cc5b8>¨ schedule+0x5a4/0xfe0)
  Ý<004cd070>¨ io_schedule+0x7c/0xd4
  Ý<002939b8>¨ __blockdev_direct_IO_newtrunc+0x7a0/0xdfc
  Ý<0029408c>¨ __blockdev_direct_IO+0x78/0xf0
  Ý<002916ea>¨ blkdev_direct_IO+0x72/0x80
  Ý<001f34f0>¨ generic_file_aio_read+0x75c/0x7b0
  Ý<00254fc8>¨ do_sync_read+0xf0/0x154
  Ý<00255fa0>¨ vfs_read+0xa0/0x1a0
  Ý<002561a2>¨ SyS_read+0x5a/0xac
  Ý<0011863c>¨ sysc_tracego+0xe/0x14
  Ý<0045c5f756fc>¨ 0x45c5f756fc
...

After the reboot, lvdisplay works fine. I plan to open a bug report.


Do you have your PVs on device-mapper multipath devices?
[filter in /etc/lvm.conf]
Do you have at least one available path per pathgroup for all PVs in VG?
Otherwise your lvcreate request might still be stuck in the dm-mp device 
queue [queue_if_no_path in /etc/multipath.conf] (which would also 
explain why udevadm settle has no effect since udev events are not yet 
emitted)
and lvdisplay obviously blocks very long on I/O because it cannot 
service the I/O request if all paths are gone at the same time (or path 
failover did not work).


--
Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


Re: lvcreate succeeds but no /dev/mapper device

2012-10-19 Thread Michael MacIsaac
David,

> udevadm settle is not always reliable and the last response was 
> that you have to sit and poll until the device actually appears 

This one is worse - the LV  *never* appears in either directory until 
after reboot and "lvdisplay oradata_lv"  hangs the system. On the console 
while lvdisplay is hung, I see these messages:

INFO: task lvdisplay:5188 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
lvdisplay D 004cd070 0  5188   5119 0x0200
7bd5e078 004d6a00 00132c0a 7b80b850
   7b80b820 0080ee80 008a7e00 7bd5e4d8
   0001 7bd5e4d8 7bd17800 0080ee80
   008a7e00 7bd5e4d8 7ee98040 03379e00
   004d6d18 004cc5b8 7b80b850 7b80ba08
Call Trace:
(Ý<004cc5b8>¨ schedule+0x5a4/0xfe0)
 Ý<004cd070>¨ io_schedule+0x7c/0xd4
 Ý<002939b8>¨ __blockdev_direct_IO_newtrunc+0x7a0/0xdfc
 Ý<0029408c>¨ __blockdev_direct_IO+0x78/0xf0
 Ý<002916ea>¨ blkdev_direct_IO+0x72/0x80
 Ý<001f34f0>¨ generic_file_aio_read+0x75c/0x7b0
 Ý<00254fc8>¨ do_sync_read+0xf0/0x154
 Ý<00255fa0>¨ vfs_read+0xa0/0x1a0
 Ý<002561a2>¨ SyS_read+0x5a/0xac
 Ý<0011863c>¨ sysc_tracego+0xe/0x14
 Ý<0045c5f756fc>¨ 0x45c5f756fc
...

After the reboot, lvdisplay works fine. I plan to open a bug report.

"Mike MacIsaac"  

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


Re: lvcreate succeeds but no /dev/mapper device

2012-10-19 Thread Michael MacIsaac
Scott,

> Is /dev/oradata_vg/oradata_lv there?
No.  Bot that file and the /dev/mapper file show up after reboot.

"Mike MacIsaac" 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


Re: lvcreate succeeds but no /dev/mapper device

2012-10-18 Thread David Boyes
This smells like the last argument we recently had on this topic. udevadm 
settle is not always reliable and the last response was that you have to sit 
and poll until the device actually appears before continuing. 

Broken, IMHO, but apparently WAD.



On Oct 18, 2012, at 14:36, "Michael MacIsaac"  wrote:

> Hello list,
> 
> I'm trying to script the setup of a logical volume.  Here's some output
> from the code:
> 
> running: lvcreate -i 2 -I 64 -r 0 -l 100%VG -n oradata_lv oradata_vg
>  Logical volume "oradata_lv" created
> running: udevadm settle
> Mounting the logical volume /dev/mapper/oradata_vg/oradata_lv
> Making an ext4 file system on /dev/mapper/oradata_vg/oradata_lv
> running: mkfs.ext4 /dev/mapper/oradata_vg/oradata_lv
> mke2fs 1.41.12 (17-May-2010)
> Could not stat /dev/mapper/oradata_vg/oradata_lv --- No such file or
> directory
> 
> The device apparently does not exist; did you specify it correctly?
> !!!
> Warning mkfs.ext4 /dev/mapper/oradata_vg/oradata_lv returned 1
> !!!
> 
> So the "lvcreate" succeeds, but the resulting /dev/mapper entry is not
> there. At the next reboot it is there.  I threw in a "udevadm settle", but
> same results.
> 
> This is on RHEL 6.2.
> 
> Is this a bug?  Or is there a workaround like
> "refresh-dev-mapper-entries"?  I hate throwing in arbitrary "sleep"s.
> Thanks.

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


Re: lvcreate succeeds but no /dev/mapper device

2012-10-18 Thread Rick Troth
<><><><><>

signature.asc
Description: OpenPGP digital signature


Re: lvcreate succeeds but no /dev/mapper device

2012-10-18 Thread Scott Rohling
Is /dev/oradata_vg/oradata_lv there?

Scott Rohling

On Thu, Oct 18, 2012 at 8:57 AM, Michael MacIsaac wrote:

> Hello list,
>
> I'm trying to script the setup of a logical volume.  Here's some output
> from the code:
>
> running: lvcreate -i 2 -I 64 -r 0 -l 100%VG -n oradata_lv oradata_vg
>   Logical volume "oradata_lv" created
> running: udevadm settle
> Mounting the logical volume /dev/mapper/oradata_vg/oradata_lv
> Making an ext4 file system on /dev/mapper/oradata_vg/oradata_lv
> running: mkfs.ext4 /dev/mapper/oradata_vg/oradata_lv
> mke2fs 1.41.12 (17-May-2010)
> Could not stat /dev/mapper/oradata_vg/oradata_lv --- No such file or
> directory
>
> The device apparently does not exist; did you specify it correctly?
> !!!
>  Warning mkfs.ext4 /dev/mapper/oradata_vg/oradata_lv returned 1
> !!!
>
> So the "lvcreate" succeeds, but the resulting /dev/mapper entry is not
> there. At the next reboot it is there.  I threw in a "udevadm settle", but
> same results.
>
> This is on RHEL 6.2.
>
> Is this a bug?  Or is there a workaround like
> "refresh-dev-mapper-entries"?  I hate throwing in arbitrary "sleep"s.
> Thanks.
>
> "Mike MacIsaac" 
>
> --
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> --
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
>

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


Re: lvcreate succeeds but no /dev/mapper device

2012-10-18 Thread Rick Troth
> So the "lvcreate" succeeds, but the resulting /dev/mapper entry is not
> there. At the next reboot it is there.  I threw in a "udevadm settle", but
> same results.

Mike --

I'm not following all of it, but the better way to access a logical
volume is via

/dev/VG/LV

... or in this case ...

/dev/oradata_vg/oradata_lv

The device mapper magic is supposed to create sym-links under /dev/VG
for all logical volumes in each volume group.

I recommend avoiding /dev/mapper and things below there.  Leave that
to the automation.

-- R;   <><

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


lvcreate succeeds but no /dev/mapper device

2012-10-18 Thread Michael MacIsaac
Hello list,

I'm trying to script the setup of a logical volume.  Here's some output
from the code:

running: lvcreate -i 2 -I 64 -r 0 -l 100%VG -n oradata_lv oradata_vg
  Logical volume "oradata_lv" created
running: udevadm settle
Mounting the logical volume /dev/mapper/oradata_vg/oradata_lv
Making an ext4 file system on /dev/mapper/oradata_vg/oradata_lv
running: mkfs.ext4 /dev/mapper/oradata_vg/oradata_lv
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/mapper/oradata_vg/oradata_lv --- No such file or
directory

The device apparently does not exist; did you specify it correctly?
!!!
 Warning mkfs.ext4 /dev/mapper/oradata_vg/oradata_lv returned 1
!!!

So the "lvcreate" succeeds, but the resulting /dev/mapper entry is not
there. At the next reboot it is there.  I threw in a "udevadm settle", but
same results.

This is on RHEL 6.2.

Is this a bug?  Or is there a workaround like
"refresh-dev-mapper-entries"?  I hate throwing in arbitrary "sleep"s.
Thanks.

"Mike MacIsaac" 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


Re: lvcreate succeeds but no /dev/mapper device

2012-10-18 Thread Michael MacIsaac
> This is on RHEL 6.2.

Some more info - the two PVs comprising the VG are FCP LUNs with two
CHPIDs/paths and multipathing set up.

"Mike MacIsaac" 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
--
For more information on Linux on System z, visit
http://wiki.linuxvm.org/