Changeset 2272 for trunk/scripts


Ignore:
Timestamp:
Mar 24, 2009, 11:58:19 PM (15 years ago)
Author:
price
Message:

pv-fixup: more metadata, align PEs, and tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/pv-fixup/pv-fixup

    r2268 r2272  
    99TMPDM2=tmpbar
    1010TMPDEV2=/dev/mapper/$TMPDM2
    11 METADATASIZE=3.5m
     11METADATASIZE=8128k
    1212
    1313#  - pvresize the old PV to half the space
     
    9393
    9494#  - pvremove the old PV
    95 vgreduce $VG $DISK
    96 pvremove $DISK
     95LVM_SYSTEM_DIR=lvm vgreduce $VG $DISK
     96dmsetup create $TMPDM2 --table "0 $((2 * 1024 * 20)) linear $DISK 0"
     97pvremove $TMPDEV2
    9798
    9899#  - pvcreate a new PV in the old space,
     
    100101#     and with --metadatasize <huge>    (the point of this exercise)
    101102shortsize=$(python -c "print $HALFSIZETiB - 0.01")t
    102 dmsetup create $TMPDM2 --table "0 $((2 * 1024 * 4)) linear $DISK 0"
    103103pvcreate $TMPDEV2 --setphysicalvolumesize $shortsize --metadatasize $METADATASIZE
    104104dmsetup remove $TMPDM2
    105105pvscan
    106 vgextend $VG $DISK
     106LVM_SYSTEM_DIR=lvm vgextend $VG $DISK
    107107
    108108#  - pvmove all the LVs back
Note: See TracChangeset for help on using the changeset viewer.