In: Computer Science
An executive asks you to allocate additional disk space for someone. You respond that you don't have the disk space, but are told "Make space , this person is important". Soon the same request is made by another person you are told "You did it for last person , this person is just as important ". How would you handle this situation, keeping in mind it may happen in the future again ? Answer needed in terms of Linux.
This is a most common issue faced while handling disk space in Linux. But its mandatory to manage the disk space for better performance of the operating system. In the early times unix and later linux ,disks where physically large but very small in terms of storage. A 300 megabyte disk was present in the mid-90’s which was the size of a shoebox. But now, we can get multi-terrabyte disks that are the size of a slice of bread.
In traditional, the files resided within a file systems that resided in disk partitions that were themselves simply slices of disks. Nowadays, most of our file systems are virtual which are much far easier to handle as well as easy to resize according to the needs.Thus we might end up thinking that if the disks were virtual it would have more ease of handling storage spaces. In fact there are a lot of ways for the management of disk.
DISK MANAGEMENT:
The system admin's are generally responsible for managing disks. They may face a lot of issues in managaing disk includes:
Partitioning disks:
The key reasons to partition a disk includes protecting some file systems from running out of space,improving performance, facilitating maintenance and backups,allocating swap space , more efficient fsck,reserving enough space for file system expansion,maintaining multiple operating system and so on.
LINUX PARTITIONING COMMANDS:
In most of the servers the partitioning is done before the deployment. Sometimes , we might add disks later and can also hold back some significant amount of disk space for future use. The various partitioning commands are as follows:
8. smartctl: Used for providing valuable measurements that might help us to pointout disk problems, particularly once we get used to working with its extensive output.
There are a lot of other commands also for the proper management of disk and disk space,but these are the most important and most commonly used one.Using the above commands periodically has a lot of advantages as the easiest way to sort out problems is becoming so used to the output of commands such as these commands easily spot out the various kind of differences that might indicate problems to the disk,diskspace and operating system and also helps us to exapand disk space for any further future needs.