lvm

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Resize filesystem on LVM

extend
lvresize -L +128G /dev/vg01/mx-home
#lvresize -l +100%FREE /dev/vg1/trusty-disk
e2fsck -f /dev/vg01/mx-home
resize2fs -p /dev/vg01/mx-home
e2fsck -f /dev/vg01/mx-home

reduce
e2fsck -f /dev/vg01/video-media
# start screen, resize2fs can take a long
resize2fs /dev/vg01/video-media 1T
lvreduce -L 1T /dev/vg01/video-media

LVM

vgs - Display information about volume groups (free space etc.)
lvs - Display information about logical volumes
lvdisplay - display attributes of a logical volume
lvremove - remove a logical volume

install
apt-get intall -y lvm2

create volume group
pvcreate /dev/md1
vgcreate vg2 /dev/md1
pvdisplay

create lvm volume
lvcreate --name VOLUME_NAME --size 4G vg2
# lvcreate -n NAME -l 100%FREE vg0
mkfs.ext3 /dev/vg2/VOLUME_NAME

renamee lvm
lvrename /dev/vg01/mx-swap /dev/vg01/mx-swap.org

XEN ENDIAN

# delegate nic for endian domain
http://www.panticz.de/xen_pci_delegation
 
DOMAIN_NAME=fw
#URL=http://dfn.dl.sourceforge.net/sourceforge/efw/EFW-COMMUNITY-2.2-rc3-200810071617.iso
URL=http://download.sourceforge.net/sourceforge/efw/EFW-COMMUNITY-2.2-200905211506.iso
URL=http://download.sourceforge.net/sourceforge/efw/EFW-COMMUNITY-2.5.1-201201261800.iso
# test # http://netcologne.dl.sourceforge.net/project/efw/Development/EFW-2.4-RESPIN/EFW-COMMUNITY-2.4-201005280528-RESPIN.iso
 
# download endian
wget ${URL} -P /tmp
 
# create lvm image
lvcreate --name fw-disk --size 8G vg1
#loset

Create XEN Windows XP Domain

#### lvm ####
lvcreate --name xp-disk --size 8G vg1
dd if=/dev/zero of=/dev/vg1/xp-disk
 
# installation
cat <<EOF> /etc/xen/xp-inst
kernel='/usr/lib/xen-4.1/boot/hvmloader'
builder='hvm'
memory='2048'
name='xp-inst'
device_model='/usr/lib/xen-default/bin/qemu-dm'
boot='d'
disk=['phy:/dev/vg1/xp-disk,ioemu:hda,w', 'file:/mnt/winxp.iso,hdc:cdrom,r']
vnc=1
vncviewer=1
vncpasswd="xp"
vif=['type=ioemu, bridge=eth0, mac=00:00:00:55:00:00']
usbdevice='tablet'
vnclisten='0.0.0.0'
EOF
 
# start VM
xm create xp-inst
 
# connect to VM from client
vinagre YOUR_XEN_Dom0_IP
 
# xp
c

Create XEN LTSP Domain

### new
http://www.panticz.de/Ubuntu-Trusty-domU
 
# install ltsp
http://www.panticz.de/install-ltsp
 
 
 
 
### old
 
# set domU name
DOMAIN_NAME=ts
 
# create domU
xen-create-image --hostname=${DOMAIN_NAME} --dhcp --mac=00:11:22:7a:7b:7c \
--lvm=vg01 --dist=jaunty --mirror=http://archive.ubuntu.com/ubuntu/ --size=8Gb --memory=2Gb --swap=2Gb
 
# lucid test
# xen-create-image --hostname=${DOMAIN_NAME} --dhcp --mac=${DOMAIN_MAC} \
--lvm=vg01 --dist=lucid --mirror=http://archive.ubuntu.com/ubuntu --size=${DOMAIN_HDD} --memory=${DOMAIN_RAM} --swap=${DOMAIN_RAM} --arch=i386
 
# rena
Syndicate content