Managing Storage
Overview of Storage Hardware
Device files
the device files for disk drives appear in the /dev/ directory.
Device type
sd – the device is SCSI-based
hd – the device is ATA-based
The first hard drive on system may appear as hda or sda
Unit
Following the two-letter device type are one or two letters denoting the specific unit
Partition
the partition on the device is represented by number in the end of device name
/dev/hda1 (ATA drive)
/dev/sdad4 (SCSI device)
Mounting file system
Mounting point
Basically, mounting points are where you mount your file systems or devices.
Seeing What is Mounted
Viewing /etc/mtab
# vi /etc/mtab
The /etc/mtab file is meant to be used to display the status of currently-mounted file systems only. It should not be manually modified.
Viewing /proc/mounts
# vi /proc/mounts
(The Proc psuedo file system is a real time, memory resident file system that tracks the processes running on your machine and the state of your system.)
df – command
Lets we know what file systems are currently mounted and the amount of free space on them.
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/mapper/VolGroup00-LogVol00
99636632 10652432 83841264 12% /
/dev/sda1 101086 16258 79609 17% /boot
/dev/mapper/VolGroup00-LogVol02
49611460 1517004 45533640 4% /data
tmpfs 511684 0 511684 0% /dev/shm
Network-Accessible Storage Under Linux
NFS (Network File System)
is a file system that may be accessed via a network connection.
The file systems an NFS server makes available to clients is controlled by the configuration file /etc/exports.
SMB (Server Message Block)
is the name for the communications protocol used by various operating systems produced by Microsoft.
Red Hat Linux supports SMB via the Samba server program.
Mounting File systems automatically with /etc/fstab
#vi /etc/fstab
Mornitoring Disk Space
df – command
# df
-h option for understand by human
Automated Monitoring Using diskcheck
Automatically check disk and send email to administrator.
Adding/Removing Storage
Adding Storage
Partitioning
Using the command-line fdisk utility program
Using parted, another command-line utility program
Formatting the partition(s)
# mkfs
Updating /etc/fstab
to automatically mount to system.
Removing Storage
Remove the disk drive's partition from /etc/fstab
Unmount the disk drive's active partitions.
# umount path
Erase the contents of the disk drive.
# badblocks -ws
Disk Quotas
Disk quotas under Red Hat Linux have the following features:
Per-file-system implementation
Per-user space accounting
Per-group space accounting
Tracks disk block usage
Tracks disk inode usage
Hard limits
Soft limits
Grace periods
No comments:
Post a Comment