Changeset 938 for trunk


Ignore:
Timestamp:
Sep 28, 2008, 8:16:05 PM (16 years ago)
Author:
price
Message:

sipb-xen-install deals with lvcreate, and some tweaks

Location:
trunk/packages/sipb-xen-autoinstaller
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-autoinstaller/common/usr/sbin/sipb-xen-create-image

    r937 r938  
    33# "arguments" come in environment:
    44#  TARGET a device filename
    5 IMAGESIZE the desired filesystem size in megabytes (rest will be swap)
     5FSSIZE the desired filesystem size in megabytes (rest will be swap)
    66#  ARCH, DIST, MIRROR
    77#  HOSTNAME, IP
     
    99set -e
    1010
    11 echo ,"${IMAGESIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET"
     11echo ,"${FSSIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET"
    1212
    1313kpartx -a "$TARGET"    # should be no-op in guest
     
    1717 --arch "$ARCH" --dist "$DIST" --mirror "$MIRROR" --cache=yes
    1818
    19 kpartx -d $VOLUME
     19kpartx -d "$TARGET"
    2020
    2121exit 0
  • trunk/packages/sipb-xen-autoinstaller/guest/etc/init.d/rcS.sipb-xen

    r929 r938  
    1515        ;;
    1616        imagesize=*)
    17         export IMAGESIZE=${x#imagesize=}
     17        export FSSIZE=${x#imagesize=}
    1818        ;;
    1919        noinstall)
  • trunk/packages/sipb-xen-autoinstaller/host/usr/sbin/sipb-xen-install

    r937 r938  
    55# Unmount it, then kpartx -d $TARGET to clean up.
    66
     7set -e
     8
    79export PATH #WTF?
    810
    9 LVNAME="$1"
     11NAME="$1"
    1012export HOSTNAME="$2"
    1113export DIST="$3"
    1214export MIRROR="$4"
    13 export IMAGESIZE="$5"  # in megabytes
    14 export IP="$6"
     15export FSSIZE="$5"    # in megabytes
     16SWAPSIZE="$6"  # in megabytes
     17export IP="$7"
    1518
    1619export ARCH=amd64
     20VGNAME=xenvg
    1721
    1822#LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'`
     
    2226fi
    2327
    24 export TARGET=/dev/mapper/xenvg-$(echo "$LVNAME" | sed -e 's/-/--/g')_hda
     28/sbin/lvcreate -L $(($FSSIZE+$SWAPSIZE))M -n "${NAME}_hda" $VGNAME
     29
     30export TARGET=/dev/mapper/xenvg-"$(echo "${NAME}_hda" | sed -e 's/-/--/g')"
    2531
    2632/usr/sbin/sipb-xen-create-image
    27 
Note: See TracChangeset for help on using the changeset viewer.