Thursday, December 31, 2009

BASIC PROVISIONING OF PARTITIONS AND FILE SYSTEMS IN REDHAT LINUX

BASIC PROVISIONING OF PARTITIONS AND FILE SYSTEMS

Features:

1. Ability to provision extra storage on-the-fly

Steps:

1. Identify available storage
• 'fdisk -l' - returns connected storage

2. Create partitions on desired hard drive:
• 'fdisk /dev/sdb' - interacts with /dev/sdb drive
• 'n' - to add a new partition
• 'p' - primary
• '1' - start cylinder
• '+4096M' - to indicate 4 Gigabytes
• 'w' - to write the changes to the disk

Note:
• use 'partprobe partition (/dev/sdb1)' to force a write to a hard drive's
partition table on a running system
• 'fdisk' creates raw partitions

3. Overlay (format) the raw partition with a file system
• mke2fs -j /dev/sdb1 - this will write inodes to partition

4. Mount the file system in the Linux file system hierarchy:
• mkdir /home1 && mount /dev/sdb1 /home1
• mount OR df -h - either will reveal that /dev/sdb1 is mounted

Note: lost+found directory is created for each distinct file system

5. Configure '/home1' to auto-mount when the system boots
• nano /etc/fstab and copy and modify the '/home' entry

No comments:

Post a Comment