Skip to main content

Posts

Showing posts from 2009

Adding Local Storage to Xen Server

1. fdisk -l sdb is my new volume 2. pvcreate /dev/sdb 3. xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST3320620AS_5QF7QZZL name-label=”LOCAL SR” scsi-SATA_ST3320620AS_5QF7QZZL is the name of my volume, you’ll have to change this value with your own, and name-label is the name you want to give to your local storage. and this is it !

Citrix XEN ON system with 3ware array bigger than 2TB

vi /etc/yum.repos.d/CentOS-Base.repo comment enabled=0 install parted with yum install parted 1. Unplug existing PBD xe pbd-list uuid ( RO) : 08f83ac4-f79e-1ff5-8ed4-a9f7ee585af7 host-uuid ( RO): b44e871f-72ec-44cc-bb63-3f318bdf3ca3 sr-uuid ( RO): 27b57e69-7751-fbd1-be11-caf4bf9b2c66 device-config (MRO): device: /dev/disk/by-id/scsi-1AMCC_5QD15WEM38A6BB001F8E-part3 currently-attached ( RO): true xe pbd-unplug uuid=08f83ac4-f79e-1ff5-8ed4-a9f7ee585af7 2. Remove the existing Loacal Storage. xe sr-list uuid ( RO) : 27b57e69-7751-fbd1-be11-caf4bf9b2c66 name-label ( RW): Local storage name-description ( RW): host ( RO): 172.30.30.148 type ( RO): lvm content-type ( RO): user xe sr-forget uuid=27b57e69-7751-fbd1-be11-caf4bf9b2c66 3. Determine the ID of the disk by running: ls -la /dev/disk/by-id/ | grep sdb What you need to look for is the ID of the disk, for example:...

Dynamic Virtual Host with Apache

Let's start with an example from an imaginary configuration file... <VirtualHost *:80&gt CustomLog /var/logs/httpd/vaccess.log vcommon UseCanonicalName Off VirtualDocumentRoot /var/www/html/%-2/ </VirtualHost&gt You'll first notice the "UseCanonicalName Off" core directive. This is mandatory for our purposes as it tells Apache to use the host name as requested by the client rather than a value set in a ServerName directive or devising one if it's absent. You'll also notice that all our sites' web documents must be in a sub-directory of /var/www/html . More important are the strange %-2 in the paths. This is a vhost instruction that allows us to extract a part of the host name and use it in the rewriting of the document path. The parts of the host name are determined by the '.' it contains. Thus, www.fekore.com has 3 parts. '%-2' means "extract the second to last part of the host name". Again using our example, suppos...

CRONTAB

#minute (0-59), #| hour (0-23), #| | day of the month (1-31), #| | | month of the year (1-12), #| | | | day of the week (0-6 with 0=Sunday). #| | | | | commands

DOS ===== LINUX

dir/w ========== ls -l aka ll dir/p =========== ls -l|more ls -l|less dir/s ========= ls -R recursive cls ========= clear type ========= cat cd ========= pwd md ========= mkdir rd ========= rmdir If empty del ========= rm, -f move/ren ======= mv copy ========= cp xcopy ========= cp -a deltree ========= rm -fr

Maximum Mount

Surely I have gone mad ! You might think, what has Linux to do with horses ? Well Linux might not yet be running a robotic horse, though that too is not far, but Linux surely has got a lot to do with mounting. You see, mounting is the Linux phrase for getting the operating system to access your disks. This disk can be a floppy, a cdrom or a hard disk partition. To mount a disk , there are two necessary conditions The disk ( device ) must be one of the files in the /dev directory. The disk must be listed in the /etc/fstab ( or /etc/mtab sometimes ) file along with some extra information. By default when you install Linux, it is automatically configured to be able to access your floppy disks, cdrom and atleast one hard disk. Also every time you boot into linux, your swap and your root directory , the \'/\' directory are mounted. However there are times when you have stored some songs on your windows partition and you want to listen to them while running Linux, or maybe...

Linux or GNU/Linux ?

For many years now, a debate is raging in the annals of umpteen newsgroups and mailing lists. Should we call the Linux system as Linux or GNU/Linux? Here is my proposition in this matter. What is GNU? GNU ('GNU's not UNIX') is a project founded by Richard M. Stallman in 1984. The aim of the GNU project is to create a UNIX-like system without proprietary software. This project has contributed hundreds of useful software which can be freely distributed. Among the most important GNU software are the GNU Compiler Collection (gcc) and its C library (glibc), the Bourne Again Shell (bash), the GNU tar, the PostScript interpreter Ghostscript, and the GNU Network Object Model Environment (GNOME) -- a graphical environment. What is Linux? Linux is the name Linus Torvalds gave to the kernel of an operating system he wrote when he was a student at University of Helsinki, Finland. The kernel of any OS is the core of the system which manages processes, memory, disks and I/O (input/output...