Changeset 2272 for trunk/scripts
- Timestamp:
- Mar 24, 2009, 11:58:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/pv-fixup/pv-fixup
r2268 r2272 9 9 TMPDM2=tmpbar 10 10 TMPDEV2=/dev/mapper/$TMPDM2 11 METADATASIZE= 3.5m11 METADATASIZE=8128k 12 12 13 13 # - pvresize the old PV to half the space … … 93 93 94 94 # - pvremove the old PV 95 vgreduce $VG $DISK 96 pvremove $DISK 95 LVM_SYSTEM_DIR=lvm vgreduce $VG $DISK 96 dmsetup create $TMPDM2 --table "0 $((2 * 1024 * 20)) linear $DISK 0" 97 pvremove $TMPDEV2 97 98 98 99 # - pvcreate a new PV in the old space, … … 100 101 # and with --metadatasize <huge> (the point of this exercise) 101 102 shortsize=$(python -c "print $HALFSIZETiB - 0.01")t 102 dmsetup create $TMPDM2 --table "0 $((2 * 1024 * 4)) linear $DISK 0"103 103 pvcreate $TMPDEV2 --setphysicalvolumesize $shortsize --metadatasize $METADATASIZE 104 104 dmsetup remove $TMPDM2 105 105 pvscan 106 vgextend $VG $DISK106 LVM_SYSTEM_DIR=lvm vgextend $VG $DISK 107 107 108 108 # - pvmove all the LVs back
Note: See TracChangeset
for help on using the changeset viewer.