All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] pvmove hangs
@ 2005-04-26  9:19 Gergely Imre
  2005-04-26 13:30 ` Diaz Rodriguez, Eduardo
  0 siblings, 1 reply; 30+ messages in thread
From: Gergely Imre @ 2005-04-26  9:19 UTC (permalink / raw)
  To: linux-lvm


hi

i have a LV with two PVs in it, like this:

 --- Logical volume ---
  LV Name                /dev/watchdog/watchdog_var
  VG Name                watchdog
  LV UUID                v6U2JY-PBMf-snpJ-IXX5-ZzcV-y4fk-PchoQg
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                72.22 GB
  Current LE             2311
  Segments               1
  Allocation             next free (default)
  Read ahead sectors     0
  Block device           254:6

  --- Physical volumes ---
  PV Name               /dev/sdb2
  PV UUID               5v23aD-mkO0-I9Ur-zUKG-sGd2-8iCP-zhgfJe
  PV Status             allocatable
  Total PE / Free PE    2500 / 189

  PV Name               /dev/sda1
  PV UUID               7mzLEZ-Va0c-sdiW-8KAV-lyjo-a5yI-GBORGS
  PV Status             allocatable
  Total PE / Free PE    2941 / 2753

i want to remove sdb2, so i wanted to make a pvmove /dev/sdb2, so it
would move everything to sda1. the strange thing is, pvmove starts, and
after, say, 20% (about an hour or so) the whole system hangs somehow. i
can ping the box, but any command i try to run, fails. it's like it's
waiting for the disk to read/write, or something like that.
the distrib is Fedora Core 2.

lvm> version
  LVM version:     2.00.15 (2004-04-19)
  Library version: 1.00.14-ioctl (2004-04-06)
  Driver version:  4.4.0

filesystem is ext3.
the system has 2GB RAM, dual Intel Xeon 3GHz.

i tried with kernel 2.6.11.7, after a while it gives me kernel panic
during pvmove. then i tried with 2.6.9, it didn't panic, but it hung,
and i had to reboot.

it's kinda urgent, thanks.

^ permalink raw reply	[flat|nested] 30+ messages in thread
* [linux-lvm] pvmove hangs
@ 2010-08-17 19:26 Allen, Jack
  2010-08-17 22:12 ` Thomas Hager
  0 siblings, 1 reply; 30+ messages in thread
From: Allen, Jack @ 2010-08-17 19:26 UTC (permalink / raw)
  To: LVM general discussion and development

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

Hello:

        I posted this in the Dm-devel list yesterday afternoon, but so
far I have not gotten any responses, so I thought I would ask the same
questions here since the command that hang is pvmove.

        I had a customer that tried to do a pvmove and it hung. So we
setup a test system to try and duplicate the problem and were able to.

        A little history and why I am asking the question in this list.
The customer needed to move from an existing SAN to a new SAN and wanted
as little as possible down time for the Application. So they zoned the
new SAN for access by the system and then added the new LUNs to the
existing Volume Group. Then ran the pvmove commands. It worked with no
problem on one of the PVs, but on the second one all the I/O hung at the
Application and any commands that access the LVM information such as
vgdisplay.

        On our test system we only have 1 SAN (EMC CX700). We put X
number of LUNs in a Volume Group and allocated Logical Volumes for the
Application. Added some more LUNs to the Volume Group to simulate a
second SAN. Started the Application with a test program to generate I/O.
Ran pvmove with no problems on one PV, but on the second PV, it hung
just like on the customer's system.

        The reason I am posting to this list is because the same type of
move was done earlier on the test system running PowerPath and did not
have any problems. The OS is Red Hat EL 5.5 32 bit. The same version of
LVM was used on both tests. I can provide other details if needed.

        Below is part of the messages file when this happen.

Aug 13 14:18:14 mss121 multipathd: dm-25: add map (uevent)

Aug 13 14:18:14 mss121 multipathd: dm-19: add map (uevent)

Aug 13 14:18:14 mss121 multipathd: dm-22: add map (uevent)

Aug 13 14:19:53 mss121 multipathd: dm-25: add map (uevent)

Aug 13 14:19:53 mss121 multipathd: dm-19: add map (uevent)

Aug 13 14:19:53 mss121 multipathd: dm-22: add map (uevent)

Aug 13 14:21:26 mss121 multipathd: dm-25: add map (uevent)

Aug 13 14:21:26 mss121 multipathd: dm-19: add map (uevent)

Aug 13 14:21:26 mss121 multipathd: dm-22: add map (uevent)

Aug 13 14:21:26 mss121 multipathd: dm-25: remove map (uevent)

Aug 13 14:22:47 mss121 multipathd: dm-25: add map (uevent)

Aug 13 14:22:47 mss121 multipathd: dm-17: add map (uevent)

Aug 13 14:22:47 mss121 multipathd: dm-20: add map (uevent)

Aug 13 14:22:47 mss121 multipathd: dm-23: add map (uevent)

Aug 13 14:27:22 mss121 kernel: INFO: task mpdsk:22158 blocked for more

than 120 seconds.

Aug 13 14:27:22 mss121 kernel: "echo 0>

/proc/sys/kernel/hung_task_timeout_secs" disables this message.

Aug 13 14:27:22 mss121 kernel: mpdsk         D 00000BD7  1784 22158

22151         22159 22157 (NOTLB)

Aug 13 14:27:22 mss121 kernel:        f3025e04 00000082 bde60e11

00000bd7 f3025e50 c045d1a9 f3025e50 0000000a

Aug 13 14:27:22 mss121 kernel:        f7c60000 bde67e2a 00000bd7

00007019 00000000 f7c6010c c8612700 f6ec4e40

Aug 13 14:27:22 mss121 kernel:        00000000 00000000 00000000

c12b8dc0 018dc6f2 c042cbd1 f6cb3f0c ffffffff

Aug 13 14:27:22 mss121 kernel: Call Trace:

Aug 13 14:27:22 mss121 kernel:  [<c045d1a9>] __pagevec_release+0x15/0x1d

Aug 13 14:27:22 mss121 kernel:  [<c042cbd1>] getnstimeofday+0x30/0xb6

Aug 13 14:27:22 mss121 kernel:  [<c061c156>] io_schedule+0x36/0x59

Aug 13 14:27:22 mss121 kernel:  [<c04569c0>] sync_page+0x38/0x3b

Aug 13 14:27:22 mss121 kernel:  [<c061c32d>] __wait_on_bit+0x33/0x58

Aug 13 14:27:22 mss121 kernel:  [<c0456988>] sync_page+0x0/0x3b

Aug 13 14:27:22 mss121 kernel:  [<c0456a48>] wait_on_page_bit+0x5b/0x62

Aug 13 14:27:22 mss121 kernel:  [<c043642c>] wake_bit_function+0x0/0x3c

Aug 13 14:27:22 mss121 kernel:  [<c04573cf>]

wait_on_page_writeback_range+0x4d/0xf1

Aug 13 14:27:22 mss121 kernel:  [<c04934a0>]
generic_osync_inode+0x93/0xbf

Aug 13 14:27:22 mss121 kernel:  [<c0457618>]

sync_page_range_nolock+0x68/0x93

Aug 13 14:27:22 mss121 kernel:  [<c0458930>]

generic_file_aio_write_nolock+0x71/0x83

Aug 13 14:27:22 mss121 kernel:  [<c047b301>] blkdev_file_write+0x0/0x1e

Aug 13 14:27:22 mss121 kernel:  [<c0458c8d>]

generic_file_write_nolock+0x86/0x9a

Aug 13 14:27:22 mss121 kernel:  [<c04566fe>]
find_get_pages_tag+0x30/0x75

Aug 13 14:27:22 mss121 kernel:  [<c0457428>]

wait_on_page_writeback_range+0xa6/0xf1

Aug 13 14:27:22 mss121 kernel:  [<c04363ff>]

autoremove_wake_function+0x0/0x2d

Aug 13 14:27:22 mss121 kernel:  [<c061c408>] mutex_lock+0xb/0x19

Aug 13 14:27:22 mss121 kernel:  [<c0449c52>]
audit_syscall_entry+0x15a/0x18c

Aug 13 14:27:22 mss121 kernel:  [<c047b31b>] blkdev_file_write+0x1a/0x1e

Aug 13 14:27:22 mss121 kernel:  [<c0474d53>] vfs_write+0xa1/0x143

Aug 13 14:27:22 mss121 kernel:  [<c0475345>] sys_write+0x3c/0x63

Aug 13 14:27:22 mss121 kernel:  [<c0404f17>] syscall_call+0x7/0xb

Aug 13 14:27:22 mss121 kernel:  =======================

Aug 13 14:27:22 mss121 kernel: INFO: task mpdsk:22161 blocked for more

than 120 seconds.

Aug 13 14:27:22 mss121 kernel: "echo 0>

/proc/sys/kernel/hung_task_timeout_secs" disables this message.

Aug 13 14:27:22 mss121 kernel: mpdsk         D 00000BD7  1884 22161

22151         22162 22160 (NOTLB)

Aug 13 14:27:22 mss121 kernel:        f34e2e04 00000082 baebd585

00000bd7 f34e2e50 c045d1a9 f34e2e50 0000000a

Aug 13 14:27:22 mss121 kernel:        f6eb1550 baec5e00 00000bd7

0000887b 00000000 f6eb165c c8612700 f723f040

Aug 13 14:27:22 mss121 kernel:        00000000 00000000 00000000

c12e1f80 018dc68e c042cbd1 f6cb3bdc ffffffff

Aug 13 14:27:22 mss121 kernel: Call Trace:

Aug 13 14:27:22 mss121 kernel:  [<c045d1a9>] __pagevec_release+0x15/0x1d

Aug 13 14:27:22 mss121 kernel:  [<c042cbd1>] getnstimeofday+0x30/0xb6

Aug 13 14:27:22 mss121 kernel:  [<c061c156>] io_schedule+0x36/0x59

Aug 13 14:27:22 mss121 kernel:  [<c04569c0>] sync_page+0x38/0x3b

Aug 13 14:27:22 mss121 kernel:  [<c061c32d>] __wait_on_bit+0x33/0x58

Aug 13 14:27:22 mss121 kernel:  [<c0456988>] sync_page+0x0/0x3b

Aug 13 14:27:22 mss121 kernel:  [<c0456a48>] wait_on_page_bit+0x5b/0x62

Aug 13 14:27:22 mss121 kernel:  [<c043642c>] wake_bit_function+0x0/0x3c

Aug 13 14:27:22 mss121 kernel:  [<c04573cf>]

wait_on_page_writeback_range+0x4d/0xf1

Aug 13 14:27:22 mss121 kernel:  [<c04934a0>]
generic_osync_inode+0x93/0xbf

Aug 13 14:27:22 mss121 kernel:  [<c0457618>]

sync_page_range_nolock+0x68/0x93

Aug 13 14:27:22 mss121 kernel:  [<c0458930>]

generic_file_aio_write_nolock+0x71/0x83

Aug 13 14:27:22 mss121 kernel:  [<c047b301>] blkdev_file_write+0x0/0x1e

Aug 13 14:27:22 mss121 kernel:  [<c0458c8d>]

generic_file_write_nolock+0x86/0x9a

Aug 13 14:27:22 mss121 kernel:  [<c04566fe>]
find_get_pages_tag+0x30/0x75

Aug 13 14:27:22 mss121 kernel:  [<c0457428>]

wait_on_page_writeback_range+0xa6/0xf1

Aug 13 14:27:22 mss121 kernel:  [<c04363ff>]

autoremove_wake_function+0x0/0x2d

Aug 13 14:27:22 mss121 kernel:  [<c061c408>] mutex_lock+0xb/0x19

Aug 13 14:27:22 mss121 kernel:  [<c0449c52>]
audit_syscall_entry+0x15a/0x18c

Aug 13 14:27:22 mss121 kernel:  [<c047b31b>] blkdev_file_write+0x1a/0x1e

Aug 13 14:27:22 mss121 kernel:  [<c0474d53>] vfs_write+0xa1/0x143

Aug 13 14:27:22 mss121 kernel:  [<c0475345>] sys_write+0x3c/0x63

Aug 13 14:27:22 mss121 kernel:  [<c0404f17>] syscall_call+0x7/0xb

Aug 13 14:27:22 mss121 kernel:  =======================

Aug 13 14:29:22 mss121 kernel: INFO: task mpdsk:22158 blocked for more

than 120 seconds.

Aug 13 14:29:22 mss121 kernel: "echo 0>

/proc/sys/kernel/hung_task_timeout_secs" disables this message.

Aug 13 14:29:22 mss121 kernel: mpdsk         D 00000BD7  1784 22158

22151         22159 22157 (NOTLB)

Aug 13 14:29:22 mss121 kernel:        f3025e04 00000082 bde60e11

00000bd7 f3025e50 c045d1a9 f3025e50 0000000a

Aug 13 14:29:22 mss121 kernel:        f7c60000 bde67e2a 00000bd7

00007019 00000000 f7c6010c c8612700 f6ec4e40

Aug 13 14:29:22 mss121 kernel:        00000000 00000000 00000000

c12b8dc0 018dc6f2 c042cbd1 f6cb3f0c ffffffff

Aug 13 14:29:22 mss121 kernel: Call Trace:

Aug 13 14:29:22 mss121 kernel:  [<c045d1a9>] __pagevec_release+0x15/0x1d

Aug 13 14:29:22 mss121 kernel:  [<c042cbd1>] getnstimeofday+0x30/0xb6

Aug 13 14:29:22 mss121 kernel:  [<c061c156>] io_schedule+0x36/0x59

Aug 13 14:29:22 mss121 kernel:  [<c04569c0>] sync_page+0x38/0x3b

Aug 13 14:29:22 mss121 kernel:  [<c061c32d>] __wait_on_bit+0x33/0x58

Aug 13 14:29:22 mss121 kernel:  [<c0456988>] sync_page+0x0/0x3b

Aug 13 14:29:22 mss121 kernel:  [<c0456a48>] wait_on_page_bit+0x5b/0x62

Aug 13 14:29:22 mss121 kernel:  [<c043642c>] wake_bit_function+0x0/0x3c

Aug 13 14:29:22 mss121 kernel:  [<c04573cf>]

wait_on_page_writeback_range+0x4d/0xf1

Aug 13 14:29:22 mss121 kernel:  [<c04934a0>]
generic_osync_inode+0x93/0xbf

Aug 13 14:29:22 mss121 kernel:  [<c0457618>]

sync_page_range_nolock+0x68/0x93

Aug 13 14:29:22 mss121 kernel:  [<c0458930>]

generic_file_aio_write_nolock+0x71/0x83

Aug 13 14:29:22 mss121 kernel:  [<c047b301>] blkdev_file_write+0x0/0x1e

Aug 13 14:29:22 mss121 kernel:  [<c0458c8d>]

generic_file_write_nolock+0x86/0x9a

Aug 13 14:29:22 mss121 kernel:  [<c04566fe>]
find_get_pages_tag+0x30/0x75

Aug 13 14:29:22 mss121 kernel:  [<c0457428>]

wait_on_page_writeback_range+0xa6/0xf1

Aug 13 14:29:22 mss121 kernel:  [<c04363ff>]

autoremove_wake_function+0x0/0x2d

Aug 13 14:29:22 mss121 kernel:  [<c061c408>] mutex_lock+0xb/0x19

Aug 13 14:29:22 mss121 kernel:  [<c0449c52>]
audit_syscall_entry+0x15a/0x18c

Aug 13 14:29:22 mss121 kernel:  [<c047b31b>] blkdev_file_write+0x1a/0x1e

Aug 13 14:29:22 mss121 kernel:  [<c0474d53>] vfs_write+0xa1/0x143

Aug 13 14:29:22 mss121 kernel:  [<c0475345>] sys_write+0x3c/0x63

Aug 13 14:29:22 mss121 kernel:  [<c0404f17>] syscall_call+0x7/0xb

Aug 13 14:29:22 mss121 kernel:  =======================

Aug 13 14:29:22 mss121 kernel: INFO: task mpdsk:22161 blocked for more

than 120 seconds.

        The mpdsk processes above are part of the Application which is a
MUMPS database (not a RDB) that does the writing of data blocks to raw
Logical Volume (no file system involved). It would have been doing
writes during both pvmoves. I know pvmove is part ofLVM2, but because it
worked with PowerPath and not when using Multipath and all other things
are the same is the reason I am asking the questions here.

_____

Jack Allen


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

^ permalink raw reply	[flat|nested] 30+ messages in thread
* [linux-lvm] pvmove hangs
@ 2005-04-27 13:04 Gergely Imre
  2005-04-28  9:46 ` Diaz Rodriguez, Eduardo
  0 siblings, 1 reply; 30+ messages in thread
From: Gergely Imre @ 2005-04-27 13:04 UTC (permalink / raw)
  To: linux-lvm


let me 'restart' this thread. i ran into another problem. or it's the same?

[root@test etc]# fdisk -l

Disk /dev/sda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          17      136521   82  Linux swap
/dev/sda2   *          18         267     2008125   83  Linux
/dev/sda3             268         392     1004062+  8e  Linux LVM
/dev/sda4             393         522     1044225   8e  Linux LVM

i installed FC2 on sda2, i upgraded the kernel to 2.6.11.7, created a VG
and LV out of sda3+sda4, like this:

[root@test etc]# vgdisplay -v
    Finding all volume groups
    Finding volume group "test"
  --- Volume group ---
  VG Name               test
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  56
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               1.95 GB
  PE Size               4.00 MB
  Total PE              499
  Alloc PE / Size       244 / 976.00 MB
  Free  PE / Size       255 / 1020.00 MB
  VG UUID               E012hQ-KRPN-ygZI-myIs-XfbV-68tt-6S44wH

  --- Logical volume ---
  LV Name                /dev/test/root
  VG Name                test
  LV UUID                wqoG5m-X3Fn-Gsaj-8P9t-cSwS-AXi4-IJ5j2P
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                976.00 MB
  Current LE             244
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Physical volumes ---
  PV Name               /dev/sda3
  PV UUID               1FWdvz-Bg30-VGNp-sq2P-HpD3-9x0t-s3QNAV
  PV Status             allocatable
  Total PE / Free PE    245 / 1

  PV Name               /dev/sda4
  PV UUID               rwLsxX-3h8f-Z7tc-Jmgv-375C-RFvP-KnxNOj
  PV Status             allocatable
  Total PE / Free PE    254 / 254

so, practically the root LV is on sda3. i moved the system from sda2 to
sda3, now the whole / is on /dev/mapper/test-root, and it's working fine.

[root@test etc]# df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/mapper/test-root
              ext3      983704    638908    294828  69% /
none         tmpfs       63464         0     63464   0% /dev/shm

grub.conf:
title Fedora Core (2.6.11.7)
        root (hd0,1)
        kernel /boot/vmlinuz-2.6.11.7 ro root=/dev/mapper/test-root
        initrd /boot/initrd-2.6.11.7.img

so, the /boot directory stayed on /dev/sda2.

fstab:
[root@test etc]# cat /etc/fstab
/dev/mapper/test-root   /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/sda1               swap                    swap    defaults        .
.
.

so far so good. now let's say i want to remove sda3. to do this, i need
to pvmove everything from sda3 to sda4. if i run

pvmove -vv /dev/sda3

i get the following:

[root@test root]# pvmove -vv /dev/sda3
      Setting global/locking_type to 1
      Setting global/locking_dir to /var/lock/lvm
      File-based locking enabled.
      /dev/sda3: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: No label detected
      /dev/sda2: No label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
    Finding volume group "test"
      Locking /var/lock/lvm/V_test WB
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
    Archiving volume group "test" metadata.
    Creating logical volume pvmove0
      Getting target version for mirror
      Moving /dev/sda3:0-243 of test/root
    Moving 244 extents of logical volume test/root
      Finding volume group for uuid
E012hQKRPNygZImyIsXfbV68tt6S44wHwqoG5mX3FnGsaj8P9tcSwSAXi4IJ5j2P
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
    Found volume group "test"
      Setting activation/missing_stripe_filler to /dev/ioerror
    Updating volume group metadata
    Creating volume group backup "/etc/lvm/backup/test"
      Finding volume group for uuid
E012hQKRPNygZImyIsXfbV68tt6S44wHwqoG5mX3FnGsaj8P9tcSwSAXi4IJ5j2P
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
    Found volume group "test"
      Locking memory
      Suspending test-root
      Finding volume group for uuid
E012hQKRPNygZImyIsXfbV68tt6S44wH860Z8k3Rbibp4LTSyFNUkHANkOMh0qdK
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda4: lvm2 label detected
    Found volume group "test"
    Loading test-pvmove0
      Setting activation/mirror_region_size to 512

and that's it... i wait around 20 minutes, nothing. no picture, no
sound... i can't do anything, so i have to do a hard reset. there is no
disk activity whatsoever.

after the reset, i quickly log in, and i find (running lvs) that it's
continuing the pvmove, like nothing happened:

lvs[root@test root]# lvs
  LV      VG   Attr   LSize   Origin Snap%  Move      Copy%
  pvmove0 test p-C-ao 976.00M               /dev/sda3  44.67
  root    test -wI-ao 976.00M

i didn't run anything, still, pvmove continues. after a while it
finishes, and it seems like everything is OK.

[root@test root]# lvs
  LV   VG   Attr   LSize   Origin Snap%  Move Copy%
  root test -wi-ao 976.00M
[root@test root]#

[root@test root]# vgdisplay -v
    Finding all volume groups
    Finding volume group "test"
  --- Volume group ---
  VG Name               test
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  60
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               1.95 GB
  PE Size               4.00 MB
  Total PE              499
  Alloc PE / Size       244 / 976.00 MB
  Free  PE / Size       255 / 1020.00 MB
  VG UUID               E012hQ-KRPN-ygZI-myIs-XfbV-68tt-6S44wH

  --- Logical volume ---
  LV Name                /dev/test/root
  VG Name                test
  LV UUID                wqoG5m-X3Fn-Gsaj-8P9t-cSwS-AXi4-IJ5j2P
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                976.00 MB
  Current LE             244
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1

  --- Physical volumes ---
  PV Name               /dev/sda3
  PV UUID               1FWdvz-Bg30-VGNp-sq2P-HpD3-9x0t-s3QNAV
  PV Status             allocatable
  Total PE / Free PE    245 / 245

  PV Name               /dev/sda4
  PV UUID               rwLsxX-3h8f-Z7tc-Jmgv-375C-RFvP-KnxNOj
  PV Status             allocatable
  Total PE / Free PE    254 / 10

now everything is on sda4, i could remove sda3. but here's the thing...
i do a reboot, and i get the following error:

http://terran.noc.astral.ro/pvmove/boot.png

but if i give the root password, /dev/mapper/test-root is mounted, and
if i remount it read-write, it seems to be alright. but if i try to fsck
/dev/mapper/test-root, it still gives me this error
[root@test root]# fsck /dev/mapper/test-root
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
fsck.ext3: No such device or address while trying to open
/dev/mapper/test-root
Possibly non-existent or swap device?
[root@test root]#

i look in /dev/mapper:

[root@test root]# cd /dev/mapper
[root@test mapper]# ll
total 0
crw-------  1 root root  10, 63 Apr 27 15:43 control
brw-------  1 root root 253,  0 Apr 27 15:43 test-pvmove0
brw-------  1 root root 253,  1 Apr 27 15:43 test-root
[root@test mapper]#

it did not remove test-pvmove0, after finishing the move. another
strange thing is that now test-root has major/minor 253,1 and
test-pvmove0 has 253,0.

i removed test-*
[root@test mapper]# rm test-pvmove0 test-root
rm: remove block special file `test-pvmove0'? y
rm: remove block special file `test-root'? y

then i did a lvm vgmknodes (i looked this up in /etc/rc.sysinit:)

[root@test mapper]# lvm vgmknodes
[root@test mapper]# ls -la
total 124
drwxr-xr-x   2 root root    4096 Apr 27 15:59 .
drwxr-xr-x  24 root root  118784 Apr 27 15:55 ..
crw-------   1 root root  10, 63 Apr 27 15:43 control
brw-------   1 root root 253,  0 Apr 27 15:59 test-root

it created the test-root node, but with major/minor 253,0, so now the
fsck is working again:
[root@test mapper]# fsck /dev/mapper/test-root
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
/dev/mapper/test-root is mounted.

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? no

check aborted.

if i do a reboot now, everything is alright again, and in fact i got
what i wanted, it moved everything from sda3 to sda4. but what about all
these problems?

it's not over yet :)
now i want to move everything back to sda3. but this time i do a:

[root@test root]# mount / -o remount,noatime

then the moving:

[root@test root]# pvmove -v /dev/sda4
    Finding volume group "test"
    Archiving volume group "test" metadata.
    Creating logical volume pvmove0
    Moving 244 extents of logical volume test/root
    Found volume group "test"
    Updating volume group metadata
    Creating volume group backup "/etc/lvm/backup/test"
    Found volume group "test"
    Found volume group "test"
    Loading test-pvmove0
    Found volume group "test"
    Loading test-root
    Checking progress every 15 seconds
  /dev/sda4: Moved: 11.9%
  /dev/sda4: Moved: 21.7%
  /dev/sda4: Moved: 32.4%
  /dev/sda4: Moved: 45.5%
  /dev/sda4: Moved: 56.1%
  /dev/sda4: Moved: 67.6%
  /dev/sda4: Moved: 78.3%
  /dev/sda4: Moved: 89.3%
  /dev/sda4: Moved: 99.6%
  /dev/sda4: Moved: 100.0%
    Found volume group "test"
    Found volume group "test"
    Found volume group "test"
    Loading test-pvmove0
    Found volume group "test"
    Loading test-root
    Found volume group "test"
    Found volume group "test"
    Removing temporary pvmove LV
    Writing out final volume group after pvmove
    Creating volume group backup "/etc/lvm/backup/test"


during to move, i run lvs a couple of times, nothing unusual.

[root@test root]# lvs
  LV      VG   Attr   LSize   Origin Snap%  Move      Copy%
  pvmove0 test p-C-ao 976.00M               /dev/sda4  22.95
  root    test -wI-ao 976.00M

but what is unusual, is this:

[root@test root]# cd /dev/mapper/
[root@test mapper]# ll
total 0
crw-------  1 root root  10, 63 Apr 27 16:01 control
brw-------  1 root root 253,  1 Apr 27 16:03 test-pvmove0
brw-------  1 root root 253,  0 Apr 27 15:59 test-root
[root@test mapper]#

now it created test-pvmove0 with 253,1, and it didn't touch test-root.
and after pvmove was finished, it removed test-pvmove0 also. now that i
call a proper pvmove ;) i run vgdisplay just to be sure:

[root@test root]# vgdisplay -v
    Finding all volume groups
    Finding volume group "test"
  --- Volume group ---
  VG Name               test
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  63
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               1.95 GB
  PE Size               4.00 MB
  Total PE              499
  Alloc PE / Size       244 / 976.00 MB
  Free  PE / Size       255 / 1020.00 MB
  VG UUID               E012hQ-KRPN-ygZI-myIs-XfbV-68tt-6S44wH

  --- Logical volume ---
  LV Name                /dev/test/root
  VG Name                test
  LV UUID                wqoG5m-X3Fn-Gsaj-8P9t-cSwS-AXi4-IJ5j2P
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                976.00 MB
  Current LE             244
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Physical volumes ---
  PV Name               /dev/sda3
  PV UUID               1FWdvz-Bg30-VGNp-sq2P-HpD3-9x0t-s3QNAV
  PV Status             allocatable
  Total PE / Free PE    245 / 1

  PV Name               /dev/sda4
  PV UUID               rwLsxX-3h8f-Z7tc-Jmgv-375C-RFvP-KnxNOj
  PV Status             allocatable
  Total PE / Free PE    254 / 254

everything is in place (on sda3). sda4 is empty like it should.

could somebody explain this to me? what's happening here?

the box i was playing on is a vmware emulated comp (128MB ram, 4GB hdd),
with a buslogic scsi adapter. i installed fedora core 2 custom, with no
packages selected, after that i did a yum update. kernel 2.6.11.7
vanilla, with no patches at all, compiled with minimum stuff. latest
lvm2 and device-mapper.

output of ps:

[root@test root]# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        S      0:02 init [3]
    2 ?        SWN    0:00 [ksoftirqd/0]
    3 ?        SW<    0:00 [events/0]
    4 ?        SW<    0:00 [khelper]
    9 ?        SW<    0:00 [kthread]
   17 ?        SW<    0:00 [kblockd/0]
   71 ?        SW     0:00 [pdflush]
   72 ?        SW     0:00 [pdflush]
   74 ?        SW<    0:00 [aio/0]
   73 ?        SW     0:00 [kswapd0]
  659 ?        SW     0:00 [kseriod]
  694 ?        SW     0:00 [scsi_eh_0]
  715 ?        SW<    0:00 [kcryptd/0]
  716 ?        SW<    0:00 [kmirrord/0]
  751 ?        SW     0:00 [kjournald]
 1722 ?        S      0:00 syslogd -m 0
 1726 ?        S      0:00 klogd -x
 1749 ?        S      0:00 /usr/sbin/sshd
 1761 ?        S      0:00 crond
 1785 tty1     S      0:00 /sbin/mingetty tty1
 1807 tty2     S      0:00 /sbin/mingetty tty2
 1818 tty3     S      0:00 /sbin/mingetty tty3
 1819 tty4     S      0:00 /sbin/mingetty tty4
 1906 tty5     S      0:00 /sbin/mingetty tty5
 1937 tty6     S      0:00 /sbin/mingetty tty6
 1972 ?        R      0:00 sshd: root@pts/0
 1974 pts/0    S      0:00 -bash
 2010 ?        S      0:00 sshd: root@pts/1
 2012 pts/1    S      0:00 -bash
 2047 pts/0    R      0:00 ps ax

(sorry for the long mail;)

^ permalink raw reply	[flat|nested] 30+ messages in thread
* [linux-lvm] pvmove hangs
@ 2003-08-16  5:21 Jan Niehusmann
  2003-08-16 10:48 ` Jan Niehusmann
  2003-08-16 13:57 ` Alasdair G Kergon
  0 siblings, 2 replies; 30+ messages in thread
From: Jan Niehusmann @ 2003-08-16  5:21 UTC (permalink / raw)
  To: linux-lvm

Hi!

On my computer, pvmove just hangs at 0.2% done. First it looked like the
reason was that I hadn't loaded dm-mirror before calling pvmove.
Modprobe was called automatically, but tried to write to
/var/log/ksymoops/, which was on one of the lvs to move.

But then I booted to singe user mode and didn't mount any partitions on
lvm, and still, pvmove was hanging at 0.2%.

Another unusual detail about my installation is that the target pv is on
a degraded raid1 array. Perhaps there is some locking issue?

Jan

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

end of thread, other threads:[~2010-08-17 23:09 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-26  9:19 [linux-lvm] pvmove hangs Gergely Imre
2005-04-26 13:30 ` Diaz Rodriguez, Eduardo
2005-04-27  5:46   ` Gergely Imre
  -- strict thread matches above, loose matches on Subject: below --
2010-08-17 19:26 Allen, Jack
2010-08-17 22:12 ` Thomas Hager
2010-08-17 23:09   ` Allen, Jack
2005-04-27 13:04 Gergely Imre
2005-04-28  9:46 ` Diaz Rodriguez, Eduardo
2005-04-28 10:23   ` Gergely Imre
2005-04-28 11:13     ` Diaz Rodriguez, Eduardo
2003-08-16  5:21 Jan Niehusmann
2003-08-16 10:48 ` Jan Niehusmann
2003-08-16 13:57 ` Alasdair G Kergon
2003-08-17 11:11   ` Jan Niehusmann
2003-08-17 11:34     ` Alasdair G Kergon
2003-08-17 11:41       ` Jan Niehusmann
2003-08-17 12:00         ` Alasdair G Kergon
2003-08-17 18:15   ` Jan Niehusmann
2003-08-18  6:46     ` Alasdair G Kergon
2003-08-18  7:07       ` Jan Niehusmann
2003-08-18  9:13     ` Alasdair G Kergon
2003-08-18  9:30       ` Jan Niehusmann
     [not found]   ` <20030817114638.GA1839@gondor.com>
2003-08-17 12:42     ` Alasdair G Kergon
2003-08-17 13:27       ` Jan Niehusmann
2003-08-17 13:50         ` Alasdair G Kergon
2003-08-17 13:55         ` Alasdair G Kergon
2003-08-18 12:58     ` Alasdair G Kergon
2003-08-18 13:21       ` Jan Niehusmann
2003-08-18 17:55       ` Jan Niehusmann
2003-08-19 17:52         ` Jan Niehusmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.