الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

pvmove

Move the data of a physical volume to other PVs in the same VG — while the LVs stay in use.

المستوى
لينكس اليومي
المجموعة
LVM
يحتاج root
نعم
الحزمة
lvm2

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

ماذا يفعل

pvmove PV moves all used extents from that PV to free space on the other PVs of the VG. Then you can remove the PV with vgreduce — the way to replace a disk without downtime. With a target PV (pvmove OLD NEW) the data goes there. A move can be stopped and continued.

طريقة الكتابة

pvmove [OPTION]... SOURCE_PV[:PE...] [DEST_PV...]
pvmove --abort

الخيارات 20

الأكثر استخدامًا

-n, --name LV
Move only the extents of this LV.
-b, --background
Run in the background.
-i, --interval SECONDS
How often to show progress.
--abort
Stop all running moves.
--atomic
Move all LVs at once (all or nothing).
--alloc POLICY
Allocation policy for the new place.
-A, --autobackup y|n
Back up the metadata.
--noudevsync
Do not wait for udev.
--reportformat basic|json
Output format.

Common LVM options

-t, --test
Test only; change nothing.
-v, --verbose
More output (repeat for more).
-q, --quiet
Less output.
-y, --yes
Answer yes to questions.
-d, --debug
Debug output.
--config STRING
Override lvm.conf settings for this command only.
--commandprofile STRING, --profile STRING
Use a configuration profile.
--devices PV, --devicesfile STRING
Limit the devices LVM looks at.
--driverloaded y|n, --nolocking, --lockopt STRING, --nohints, --journal STRING
Special and debug settings.
-h, --help, --longhelp
Show help.
--version
Show the version.

أمثلة 10

$ مستخدم عادي# بصلاحية root (أو مع sudo)

  1. 1Empty a PV

    pvmove /dev/vdc
      /dev/vdc: Moved: 23.53%
      /dev/vdc: Moved: 100.00%

    The VG needs enough free space on other PVs.

  2. 2Move to a chosen PV

    pvmove /dev/vdc /dev/vde

    New disk first added with vgextend.

  3. 3Then remove the PV

    vgreduce vgdata /dev/vdc; pvremove /dev/vdc

    The disk can now be removed.

  4. 4Move only one LV

    pvmove -n lvdata /dev/vdc /dev/nvme0n1p3

    Put a busy LV on a faster disk.

  5. 5In the background

    pvmove -b /dev/vdc
    lvs -a -o name,copy_percent

    Watch the progress with lvs.

  6. 6Continue after an interruption

    pvmove

    Without arguments it continues unfinished moves.

  7. 7Stop a move

    pvmove --abort

    The data stays where it was safe.

  8. 8Check that the PV is empty

    pvs -o pv_name,pv_used /dev/vdc

    pv_used 0 = empty.

  9. 9Full disk replacement in one go

    vgextend vgdata /dev/vde && pvmove /dev/vdc /dev/vde && vgreduce vgdata /dev/vdc

    Old storage array to new one.

  10. 10Move a range of extents

    pvmove /dev/vdc:0-999 /dev/vde

    Fine control (rarely needed).

رموز الخروج

0Done.
5Error.

الدليل الكامل

هذه الصفحة تشرح الأمر بكلمات بسيطة. الدليل الأصلي فيه كل التفاصيل.

في الطرفية: man 8 pvmove