[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] Strange behavior adding LUN



Hi,

We've been cleaning up some of our storage recently and migrating to new disks etc. when I came across this issue.

I've re-allocated some old storage back to a server as a new array, but lvm is refusing to allow the LUN to participate.  Here's what I see:

[root office ~]# pvcreate /dev/mpath/backup1
  Physical volume "/dev/mpath/backup1" successfully created
[root office ~]# pvdisplay /dev/mpath/backup1
  "/dev/mpath/backup1" is a new physical volume of "2.93 TB"
  --- NEW Physical volume ---
  PV Name               /dev/mpath/backup1
  VG Name
  PV Size               2.93 TB
  Allocatable           NO
  PE Size (KByte)       0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               ipTgcI-kjdJ-Aucx-cUVs-TWKr-wAFO-Rkd0u8

Thinking it's somehow mussed up the labelling, I had a quick look at the disk header:

[root office ~]# dd if=/dev/mpath/backup1 bs=1k count=1 | cat -v -
^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^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add it.  New UUID, but basically the same.

So, weird.  Why is the 'pvcreate' seeing the new LUN, seeing that it is 2.93TB, but not creating any PE's for use.

Anybody have any idea what I should try next?

Stuart J. Browne
Senior Unix Administrator, Network Administrator, Database Administrator
AusRegistry Pty Ltd
Level 8, 10 Queens Road
Melbourne. Victoria. Australia. 3004.
Ph:  +61 3 9866 3710
Fax: +61 3 9866 1970
Email: stuart browne ausregistry com au
Web: www.ausregistry.com.au

The information contained in this communication is intended for the named recipients only. It is subject to copyright and may contain privileged and/or confidential information. If you are not an intended recipient you must not use, copy, distribute or take any action in reliance on it. If you have received this communication in error, please delete all copies from your system and notify us immediately.


[root office ~]# pvcreate -vvvv /dev/mpath/backup1
#lvmcmdline.c:1089         Processing: pvcreate -vvvv /dev/mpath/backup1
#lvmcmdline.c:1092         O_DIRECT will be used
#config/config.c:994       Setting global/locking_type to 1
#config/config.c:994       Setting global/wait_for_locks to 1
#locking/locking.c:240       File-based locking selected.
#config/config.c:971       Setting global/locking_dir to /var/lock/lvm
#libdm-common.c:430         Preparing SELinux context for /var/lock/lvm to system_u:object_r:lvm_lock_t.
#libdm-common.c:433         Resetting SELinux context to default value.
#config/config.c:977       metadata/pvmetadataignore not found in config: defaulting to n
#config/config.c:999       metadata/pvmetadatasize not found in config: defaulting to 255
#config/config.c:999       metadata/pvmetadatacopies not found in config: defaulting to 1
#locking/file_locking.c:235       Locking /var/lock/lvm/P_orphans WB
#libdm-common.c:430         Preparing SELinux context for /var/lock/lvm/P_orphans to system_u:object_r:lvm_lock_t.
#locking/file_locking.c:141         _do_flock /var/lock/lvm/P_orphans:aux WB
#locking/file_locking.c:141         _do_flock /var/lock/lvm/P_orphans WB
#locking/file_locking.c:51         _undo_flock /var/lock/lvm/P_orphans:aux
#libdm-common.c:433         Resetting SELinux context to default value.
#ioctl/libdm-iface.c:2005         dm version   OF   [16384]
#ioctl/libdm-iface.c:2005         dm status   (253:3) OF   [16384]
#device/dev-io.c:495         Opened /dev/mpath/backup1 RO O_DIRECT
#device/dev-io.c:268       /dev/mpath/backup1: size is 6291456000 sectors
#device/dev-io.c:541         Closed /dev/mpath/backup1
#device/dev-io.c:268       /dev/mpath/backup1: size is 6291456000 sectors
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#device/dev-io.c:541         Closed /dev/mpath/backup1
#filters/filter-composite.c:31         Using /dev/mpath/backup1
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#label/label.c:184       /dev/mpath/backup1: No label detected
#device/dev-io.c:541         Closed /dev/mpath/backup1
#ioctl/libdm-iface.c:2005         dm status   (253:3) OF   [16384]
#device/dev-io.c:495         Opened /dev/mpath/backup1 RO O_DIRECT
#device/dev-io.c:268       /dev/mpath/backup1: size is 6291456000 sectors
#device/dev-io.c:541         Closed /dev/mpath/backup1
#device/dev-io.c:268       /dev/mpath/backup1: size is 6291456000 sectors
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#device/dev-io.c:541         Closed /dev/mpath/backup1
#filters/filter-composite.c:31         Using /dev/mpath/backup1
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_EXCL O_DIRECT
#device/dev-io.c:541         Closed /dev/mpath/backup1
#device/dev-io.c:268       /dev/mpath/backup1: size is 6291456000 sectors
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#device/dev-io.c:541         Closed /dev/mpath/backup1
#device/dev-io.c:268       /dev/mpath/backup1: size is 6291456000 sectors
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#device/dev-io.c:541         Closed /dev/mpath/backup1
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#device/dev-io.c:541         Closed /dev/mpath/backup1
#ioctl/libdm-iface.c:2005         dm status   (253:3) OF   [16384]
#device/dev-io.c:495         Opened /dev/mpath/backup1 RO O_DIRECT
#device/dev-io.c:268       /dev/mpath/backup1: size is 6291456000 sectors
#device/dev-io.c:541         Closed /dev/mpath/backup1
#device/dev-io.c:268       /dev/mpath/backup1: size is 6291456000 sectors
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#device/dev-io.c:541         Closed /dev/mpath/backup1
#filters/filter-composite.c:31         Using /dev/mpath/backup1
#device/dev-io.c:268       /dev/mpath/backup1: size is 6291456000 sectors
#config/config.c:994       Setting devices/data_alignment to 0
#config/config.c:994       Setting devices/default_data_alignment to 0
#metadata/metadata.c:126       /dev/mpath/backup1: Setting PE alignment to 128 sectors.
#metadata/metadata.c:159       /dev/mpath/backup1: Setting PE alignment offset to 0 sectors.
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:730         Wiping /dev/mpath/backup1 at sector 8 length 8 sectors
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#device/dev-io.c:541         Closed /dev/mpath/backup1
#metadata/metadata.c:1499     Set up physical volume for "/dev/mpath/backup1" with 6291456000 available sectors
#label/label.c:203       Scanning for labels to wipe from /dev/mpath/backup1
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#device/dev-io.c:541         Closed /dev/mpath/backup1
#metadata/metadata.c:1508     Zeroing start of device /dev/mpath/backup1
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:730         Wiping /dev/mpath/backup1 at sector 0 length 4 sectors
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#device/dev-io.c:541         Closed /dev/mpath/backup1
#metadata/metadata.c:1523       Writing physical volume data to disk "/dev/mpath/backup1"
#cache/lvmcache.c:1166         lvmcache: /dev/mpath/backup1: now in VG #orphans_lvm2 (#orphans_lvm2)
#format_text/format-text.c:1453         Creating metadata area on /dev/mpath/backup1 at sector 8 size 376 sectors
#format_text/format-text.c:1523       /dev/mpath/backup1: setting pe_start=384 (orig_pe_start=384, pe_align=128, pe_align_offset=0, adjustment=0)
#device/dev-io.c:495         Opened /dev/mpath/backup1 RW O_DIRECT
#device/dev-io.c:134         /dev/mpath/backup1: block size is 4096 bytes
#format_text/text_label.c:137         /dev/mpath/backup1: Preparing PV label header sVsk4g-FEwG-nQfC-3xqX-Oc3B-Ytee-KH6rFe size 3221225472000 with da1 (384s, 0s) mda1 (8s, 376s)
#label/label.c:334       /dev/mpath/backup1: Writing label to sector 1 with stored offset 32.
  Physical volume "/dev/mpath/backup1" successfully created
#locking/file_locking.c:74       Unlocking /var/lock/lvm/P_orphans
#locking/file_locking.c:51         _undo_flock /var/lock/lvm/P_orphans
#device/dev-io.c:541         Closed /dev/mpath/backup1

[root office ~]# dd if=/dev/mpath/backup1 bs=1k count=1 | cat -v -
^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^@^ ^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 ^@1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.01024 seconds, 100 kB/s
[root office ~]# pvdisplay /dev/mpath/backup1
  "/dev/mpath/backup1" is a new physical volume of "2.93 TB"
  --- NEW Physical volume ---
  PV Name               /dev/mpath/backup1
  VG Name
  PV Size               2.93 TB
  Allocatable           NO
  PE Size (KByte)       0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               sVsk4g-FEwG-nQfC-3xqX-Oc3B-Ytee-KH6rFe


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]