12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

170CHAPTER 7Managing StorageTo create a partition in parted, issue the following command at the interactive partedprompt:mkpart must be one of primary, logical, or extended. must be one offat16, fat32, ext2, HFS, linux-swap, NTFS, reiserfs, or ufs. The and values should be given in megabytes and must be given as integers.The ext3 filesystem is the default filesystem for <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>. It is the ext2filesystem plus journaling. To create an ext3 filesystem, use ext2 as the and thenuse the -j option to mke2fs to make the filesystem ext3 as described in the next section.After creating the partition, use the print command again to verify that the partition wascreated. Then type quit to exit parted.Creating a Filesystem on a PartitionNext, create a filesystem on the partition. To create an ext3 filesystem (default usedduring installation), as root, execute the following, where is the device name forthe partition such as /dev/sda1:mke2fs -j If the partition is to be a swap partition, format it with the following command as root:mkswap Labeling the PartitionTo label the partition, execute the following as root:e2label While labeling is not required, partition labels can be useful. For example, when addingthe partition to /etc/fstab, the label can be listed instead of the partition device name.This proves useful if the partition number is changed from repartitioning the drive or ifthe partition is moved.If the e2label command is used with just the partition device name as an argument, thecurrent label for the partition is displayed.Creating a Mount PointNow that the partition is created and has a filesystem, as root, create a directory so it canbe mounted:mkdir Then, mount the new partition:mount

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!