Category: sysadm
How to Distinguish Environment Variables from Different Shells in “bash”?
Every instance of the command line shell (thus every process) on Unix (and hence Linux) has a different set of environment variables. Actually different shell instances you may have the same variable, but set to different values. If you are doing a system wide job and you are using shell scripting, you would like to…
Read More “How to Distinguish Environment Variables from Different Shells in “bash”?” »
A basic LVM Setup
# fdisk -l Disk /dev/hda: 4294 MB, 4294967296 bytes255 heads, 63 sectors/track, 522 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/hda1 * 1 13 104391 83 Linux/dev/hda2 14 522 4088542+ 8e Linux LVM Disk /dev/hdb: 4294 MB, 4294967296 bytes255 heads, 63 sectors/track, 522 cylindersUnits = cylinders…
Accessing NTFS Partitions from Linux
This is basically done by two methods:– The NTFS kernel module – The NTFS user space programsfrom the kernel source or http://www.linux-ntfs.org/ The NTFS Kernel ModuleHave a check at the wiki page Youmight find an appropriate prebuilt driver for your current kernelversion. Then you can do normal mounts etc on NTFS partitions. Oneproblem here is…
udev: what, why, how?
udev is introduced with the 2.6 kernel (ie not available in RHEL3 and before)And that is solely for device name persistence. It is mainly a problem whendisks are external / via HBA, and the names across reboots and/or clusters mightnot be the same. We have been using devlabel to be able to get some persistence…
How to Mount Volumes from a Rescued LVM Disk?
Say we have a LVM’ed /dev/sdd1 and we have to mount logical volume LogVol00 in it.. # file -s /dev/sdd1 /dev/sdd1: LVM2 (Linux Logical Volume Manager) , UUID: 7zKduhTHsMa3YD3t2gocYKUDGRP5QvW # vgscan Reading all physical volumes. This may take a while… Found volume group “VolGroup00” using metadata type lvm2 # vgchange -a y VolGroup00 2 logical…
PXE Boot Config Enterprise Linux
Configuring a PXE boot server Install required packages: # yum install bind dhcp system-config-netboot tftp-server Setup dhcpd: # vi /etc/dhcpd.confddns-update-style interim;ignore client-updates; subnet 10.10.10.0 netmask 255.255.255.0 { option routers 10.10.10.1; option subnet-mask 255.255.255.0; option domain-name-servers 10.10.10.1; option time-offset 7200; range dynamic-bootp 10.10.10.10 10.10.10.15; default-lease-time 21600; max-lease-time 43200; next-server 10.10.10.1; option subnet-mask 255.255.255.0; option broadcast-address 10.10.10.255;…