Posts Tagged ‘storage’
ATAD #4 – Where is your OS bootable partition?
>The /boot/ partition (or) directory contains static files, like the kernel, that are required to boot the system properly.
The /boot/ partition _can_not_ be on a logical volume group because the boot loader can not read it. If the root / partition is on a logical volume, then its required to create a separate /boot/ partition which is not a part of a volume group. If you are making a RAID partition of /boot/, you must choose RAID level 1, and it must use one of the first two drives (IDE first, SCSI second). Source [RHEL deployment guide]
A neat description of the boot process can be found here
Btw just noticed that MS Windows does support the use of “/” and “\” to traverse across directories. neato.
__tipped__
ATAD #2 – linux swap space
Swap space is used when a system requires memory greater the physical memory (RAM) available. Physical memory is divided into chunks of memory called pages. When the amount of RAM is full, a page of memory which is relatively less used is moved to a preconfigured swap space on the hard drive (HDD).
Swap space can be a dedicated swap partition (recommended), a swap file, or a combination of swap partitions and swap files. The combined sizes of the physical memory and the swap space constitute the amount of virtual memory available.
RedHat recommends swap size be equal to 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB.
So, if:
M = Amount of RAM in GB, and S = Amount of swap in GB, then
If M < 2
then
S = M * 2
else
S = M + 2
fi
However, if you think you will be upgrading the RAM sometime in the near future, consider the total amount of RAM you would be having after your upgrade and decide on the swap space during install time. swap space can also be altered post installation by
1. creating a new swap partition
# lvm lvcreate -n -L (size_in_mb)M
2. creating a new swap file
# dd if=/dev/zero of=/swapfile bs=1024 count=(size)
3. extend swap on an existing logical volume (recommended)
# lvm lvresize (lvol) -L +(size_in_mb)M
Remember to boot the system in rescue mode before altering the swap space as the swap space can not be in used when being modified.
Further reading: swapoff, mkswap, swapon
__tipped__
ATAD #1 – linux /proc filesystem
It’s been a long time since i really sat down to read something, apart from what work demanded, technology round ups and reviews. Its this strange time in my life when academic acumen kicks in, and I wonder; “why not spend a few minutes each day to learn something new”.
I will log my learning’s with A Tip A Day.
Over the years I have understood that the /proc directory (also called the proc file system) contains files that store information about the state of the linux kernel and the running applications. The files can be interpreted by applications and the users (though a few are restricted only to the ‘root’ user) to gain a whole wealth of information about the running system. The contents of the files under the proc directory can be easily read using the cat program
OK, this is probably stale news for a few. But an interesting find was that a few files under /proc/sys can actually also be used to adjust settings to the kernel.
Eg, here im changing the hostname of the linux system to hoohaha
# echo hoohaha > /proc/sys/kernel/hostname
A few others store boolean information, for example the /proc/sys/net/ipv4/ip_forward when set to 1 will immediately start forwarding network packets.
# echo 1 > /proc/sys/net/ipv4/ip_forward
__tipped__