Red Hat ENTERPRISE LINUX 3 - INTRODUCTION TO SYSTEM ADMINISTRATION Administration Manual page 115

Introduction to system administration
Hide thumbs Also See for ENTERPRISE LINUX 3 - INTRODUCTION TO SYSTEM ADMINISTRATION:
Table of Contents

Advertisement

Chapter 5. Managing Storage
5.9.6.2.1. Remove the Disk Drive's Partitions From
Using the text editor of your choice, remove the line(s) corresponding to the disk drive's partition(s)
from the
/etc/fstab
Matching the partition's mount point against the directories in the second column of
Matching the device's file name against the file names in the first column of
Tip
Be sure to look for any lines in
removed; they can be easily overlooked.
5.9.6.2.2. Terminating Access With
Next, all access to the disk drive must be terminated. For partitions with active file systems on them,
this is done using the
be deactivated with the
Unmounting partitions with the
or the partition's mount point:
umount /dev/hda2
umount /home
A partition can only be unmounted if it is not currently in use. If the partition cannot be unmounted
while at the normal runlevel, boot into rescue mode and remove the partition's
When using
swapoff
senting the swap partition:
swapoff /dev/hda4
If swapping to a swap partition cannot be disabled using
the partition's
/etc/fstab
5.9.6.2.3. Erase the Contents of the Disk Drive
Erasing the contents of a disk drive under Red Hat Enterprise Linux is a straightforward procedure.
After unmounting all of the disk drive's partitions, issue the following command (while logged in as
root):

badblocks -ws
device-name
Where

device-name
partition number. For example,
The following output is displayed while
Writing pattern 0xaaaaaaaa: done
Reading and comparing: done
Writing pattern 0x55555555: done
file. You can identify the proper lines by one of the following methods:
/etc/fstab
umount
command. If a swap partition exists on the disk drive, it must be either
umount
command, or the system should be rebooted.
swapoff
command requires you to specify either the device file name,
umount
to disable swapping to a partition, you must specify the device file name repre-
entry.

represents the file name of the disk drive you wish to erase, excluding the

/dev/hdb
badblocks
/etc/fstab
that identify swap partitions on the disk drive to be
swapoff
for the second ATA hard drive.
runs:
/etc/fstab
/etc/fstab
, boot into rescue mode and remove
103
/etc/fstab
entry.

Advertisement

Table of Contents
loading

Table of Contents