- Recommended reading:
- Important:
- Create partition
- Format partition
- Mount partition
- fdisk - manipulate disk partition table
- mkfs - build a Linux filesystem
- mkswap - set up a Linux swap area
- wipefs - wipe a signature from a device
- gdisk - Interactive GUID partition table (GPT) manipulator
- parted - a partition manipulation program
- explore "help" and commands
- cfdisk - display or manipulate a disk partition table
Considerando 1 TB de disco:
SO: Debian 10 / Ubuntu 20
-
Desktop (option 1)
- / - 20GB
- /usr - 15GB
- /var - 10GB (optional)
- /home - 500GB
- swap - 8gb (At least the same ammount of RAM in your machine, or 2x the amount of ram if your machine has low RAM)
-
Desktop (option 2 - simplified)
- / - 50GB
- /home - 930GB
- swap - 8gb
-
E-mail server
- / - 20GB
- /var - 900GB (where the e-mails are usually stored)
- /home - 5GB
- swap - 16GB
-
File Server
- / - 20GB
- /home - 5GB
- /data - 900GB
- swap - 8 GB
-
Web Server
- / - 20GB
- /home - 5GB
- swap - 8 GB
- /var - 950GB (possible to split the partition into two: /var/www and /var/log, /var is a simplified solution)
- /var/www
- /var/log
- Reasons use a well partitioned disk:
- For security: use fine grained permissions to restrict operations to where they should be happening (e.g.: block operations from X applications to anywhere else other than /var)
- Resiliency: problems that happen on one partition, will not affect adjacent ones. That way we reduce the surface area of the impact
- Review this lesson with more attention, hands-on wasn't possible (previous setup is necessary)
- Recommended reading:
- mklost+found - create a lost+found directory on a mounted Linux second extended file system
- mount - mount a filesystem
- Very important, study it's use
- attention to "mount -(options) remount (dir)"
- lsof - list open files