Wednesday 1 February 2012

File System Administration in RHEL 6


ext4 is the default file system of Red Hat Enterprise Linux 6.

Advantages:

  •  Improves performance
  •  Reduces metadata overhead for large files
  •  Labels unallocated block groups and inode tables
Allocation schemes:
  •  Persistent pre-allocation
  •  Delayed allocation
  •  Multi-block allocation
  •  Stripe-aware allocation
Command Method

1. Go to RHEL6 - Settings - Add - virtual - HDD - Create a new virtual HDD - SCSI - 5GB (Store virtual disk as a single file)-give the disk file name and click finish then reboot.

Primary Partitioning

#for partitioning the virtul HDD go terminal and give fdisk
fdisk /dev/sdb
m -for help
n -new partition (give p for primary partition, the partition number and size, maximum can create 4 primary partitions and should create before creating extented partition.)
p -show partition table
w-write and quit

#for updating the partition table.
partprobe

#formating the partition table
mkfs.ext4 /dev/sdb1 (listen to 3 times done)

#create mount point
mkdir /primary

#edit fstab
vim /etc/fstab
   /dev/sdb1    /primary    ext4    defaults    0 0

#mount
mount -a
mount                  (shows all mount points)
cd /primary
ls                        (and confirm with the precentece of lost+found file
fdisk -l                (shows all partitions)

Extented partitioning

#for creating extented partitioning
fdisk /dev/sdb
m-for help
n-new partition (give e for extented partition, partition number and size will be the remaining)
p-show partition table
w-write and quit (do't format and mount the extented patition)

Logical Partitioning

#for creating extented partitioning
fdisk /dev/sdb
m-for help
n-new partition (give l for logical partitioning and also give size, it will take partion number starting from 5 onwards by default)
p-show partition table
w-write and quit

#for updating the partition table.
partprobe

#formating the partition table
mkfs.ext4 /dev/sdb5    ( and listen to 3 times 'done')

#create mount point
mkdir /logical

#edit fstab
vim /etc/fstab
   /dev/sdb5    /logical    ext4    defaults    0 0

#mount
mount -a
mount                 (shows all mount points)
cd /primary
ls                        (and confirm with the precentece of lost+found file)
fdisk -l                (shows all partitions)

deleting a partition

#remove fstab
vim /etc/fstab   - do delete the particular entry
mount -a
umount /logical
fdisk /dev/sdb
d - to delete give the approptiate partition number
w-write and quit
partprobe

Graphical Method

palimpsest  - for opening the Disk Utility method from the command mode

Otherwise go to Applications - System Tools - Disk Utility

Create Partition - to create a partition
Format Drive - to format the drive
Format Volume - for formatting a particular volume
Mount Volume - to mounting a volume
Unmount Volume - for a unmounted volume
Delete Partition - to deleting a partition


Note:- Logical partitioning is not available in graphical method.

Benchmark :- shows how data is written in HDD.

1. Start Read-Only Benchmark - Mesure read rate and access time
2. Start Read/Write Benchmark - Mesure read rate, write rate and access time


No comments:

Post a Comment