Howto: add new partition type linux lvm, mkfs, pvcreate, vgcreate, lvcreate…
No commentsAdd new partition type linux lvm, mkfs, pvcreate, vgcreate, lvcreate…
step1. fdisk /dev/DISK_NAME
#fdisk /dev/sdb
step2. mkfs.FS NAME /dev/DISK_NAME{partition_number}
#mkfs.ext3 /dev/sdb2
step3. pvcreate /dev/DISK_NAME{partition_name}
#pvcreate /dev/sdb2
step4. vgcreate VG_NAME
#vgcreate backup /dev/sdb2
#vgextend backup /dev/sdb2
step4. lvcreate -L FS_SIZE -n {partitoin_name_you_want} VG_NAME
# lvcreate -L1G -n 1 backup
step5. lvextend -L SIZE_IN_MEGABYTES /dev/mapper/VG_NAME-LV_NAME
# lvextend -L1T /dev/mapper/backup-1
step6. resize2fe /dev/mapper/VG_NAME-LV_NAME
# resize2fs /dev/mapper/backup-1
step7. mount /dev/mapper/VG_NAME-LV_NAME [...]
Howto: Re-read Partition Table With No System Reboot
No commentsRe-Read Partition Table WITHOUT reboot the system
In some case the fdisk partitioning want to reboot machine to make changes affect.
This is the error message when this happens:
fdisk WARNING: Re-reading the partition table failed with error 16:
Device or resource busy.
The kernel still uses the old table.
The real-life example OS is Debian , but it’s [...]
Howto: Linux LVM add and extend (proxmox+open-vz part2)
No commentsAdd other HDD to Linux LVM and extend working partition (proxmox+open-vz part2)
used documentation: http://tldp.org/HOWTO/LVM-HOWTO
In the Part1 on proxmox+open-vz, the following situations was automaticly created by the proxmox installation and open-vz containers working partition (/var/lib/vz)
1.First Run vgdisplay to see group or groups
bmg:~# vgdisplay
— Volume group —
VG Name [...]
Howto: install proxmox VE with Open-VZ and Create Virtual Machine on CentOS5 (proxmox+open-vz part1)
No commentsAll actions are based on original proxmox’s articles at: http://pve.proxmox.com/wiki/ . READ PROXMOX WIKI !!!! This is not proxmox tutorials or documents, it’s short line-by-line on command-line examples on howto do it in short, easy steps:
1. Download Proxmox-ve (08.06.2010) - latest stable iso is located here: http://www.proxmox.com/cms_proxmox/cms/upload/bittorrent/proxmox-ve_1.5-4627-3.iso.
2. Burn on disk and start installation from the [...]
nagios, nagios-plugins, nrpe from FreeBSD jail
No commentsReason: Not able to ping from FreeBSD prison (jail)
SubReason1: check_ping command doesn’t work
SubReason2: check-host-alive command doesn’t work
step1. Change sysctl security raw socket for jail
#sysctl security.jail.allow_raw_sockets=1
step2. Set it permanently
#echo ’security.jail.allow_raw_sockets=1′ >> /etc/sysctl.conf
By default FreeBSD does not allows prison users / apps to create raw sockets. This is a security feature. With raw sockets one can [...]
ssh port forward - quick howto syntax it
No commentsscenario 1 : attach remote private host on localhost and localport
/localhost -> sshserver -> sshserverlocalnet_host/
ssh user@sshserver -L 1180:sshserverlocalnet_host:80
The sshserverlocalnet_host, port 80 will be attached on localhost and localport 1180
Debian 5 set localtime different from UTC - solution!
No commentsStep1. Run apt-get install ntpdate
Step2. Run tzselect OR type dpkg-reconfigure tzdata
Step3. Select your region
Step4 Edit file /etc/default/rcS and change UTC to no, a.k.a. UTC=no
Howto: ipfw allow/deny match on MAC address
No commentsFreeBSD ipfw match on MAC ADDRESS
1. First of all you have to compile ipfw into your kernel.
2. Second add layer2 filtering support into fbsd sysctl :
#sysctl net.link.ether.ipfw=1
3. OK, now we create full shell script to adding ipfw ruleset.
#vi ipfw.conf
make devfs in FreeBSD jail
No commentsThis is about how to make your devfs into fbsd jails
0. Before you login , you need to mount devfs in first:
#mount_devfs devfs /usr/jail/dev
1. Login into host machine and start the jail
#jail /usr/jail jail.mydomain.net 192.168.7.60 /bin/sh /etc/rc
2. Now do the devfs command:
# devfs -m /usr/jail/dev rule apply hide
# devfs -m /usr/jail/dev rule apply path null [...]
Howto: FreeBSD router with PF and traffic shaper
No commentsFreeBSD router with PF and traffic shaper
OK.
step1. Brand New Fbsd 7.2-RELEASE installation. …
step2. Kernel configuration
cd /usr/src/sys/i386/conf
….. remove not used drivers, and put at the end of the kernelconf file
# pf support
device mem
device pf
device pflog
device pfsync
#altq support
options ALTQ
options ALTQ_CBQ
options ALTQ_RED
options ALTQ_RIO
options ALTQ_HFS
———
cd /usr/src
make buildkernel