# Help request for manual disk partitioning

**URL:** <https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200>\
**Category:** Rocky Linux Help & Support\
**Created:** [October 2, 2021, 3:44pm UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200 "2021-10-02T15:44:22Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![MadKats](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/madkats/32/1275_2.png) [@MadKats](https://forums.rockylinux.org/u/MadKats)\
**Post date:** [October 2, 2021, 3:44pm UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/1 "2021-10-02T15:44:22Z")

</div>

Greetings,

I want to manually install Rocky Linux **Server** with the: **DISA STIG for Rocky Linux 8**.

It will be installed on a virtual machine (Virtual Box) with the bellow specifications:

- Disk space: 65GB total (fixed)
- RAM Memory: 2GB total

What types, sizes etc of disk partitions should i create?  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [October 2, 2021, 6:03pm UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/2 "2021-10-02T18:03:46Z")

</div>

You can use the installer to “view” the partition sizes, and then you can always cancel if you don’t like what you see. The server will be somewhat constrained with your spec, and you won’t have much room to expand.

Once you start the installer select “Installation Destination”, select “Custom” and then “Done”, and then select “create them automatically”, which will show you a list of partitions and sizes (with reasonable defaults). /boot/efi, /boot, /, swap, /home.

Be careful with /home, as it will stretch the end of the disk, and you can’t shrink it later. If you had bigger disks you could make /home smaller, and then create a new physical volume, volume group, logical volume in the free space called something like /data. That way you can keep things like databases and web content outside of /var or /home.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [October 2, 2021, 7:48pm UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/3 "2021-10-02T19:48:07Z")

</div>

> [@gerry666uk](#):
>
> Be careful with /home, as it will stretch the end of the disk, and you can’t shrink it later

The default filesystem is XFS. One can’t shrink XFS. However, on you can change the filesystem type in the installer. I still use primarily ext4, which can shrink.

---

<div class="post-metadata">

**Author:** ![MadKats](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/madkats/32/1275_2.png) [@MadKats](https://forums.rockylinux.org/u/MadKats)\
**Post date:** [October 2, 2021, 8:27pm UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/4 "2021-10-02T20:27:23Z")

</div>

Hey thanks for the reply,

my question/request is a guide about manual partitioning, like what type of format, size, directories should i create etc… with the **DISA STIG for Rocky Linux 8** in mind. ( One example is that i found on the internet that some say to create /swap size with the exact amount of my RAM memory and some say with the half of it).

The purpose of this server is to create a basic web host for test purposes with the bellow installed:

- NGINX
- MariaDB
- Webmin
- Wordpress

---

<div class="post-metadata">

**Author:** ![tjdoyle](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/tjdoyle/32/500_2.png) [@tjdoyle](https://forums.rockylinux.org/u/tjdoyle)\
**Post date:** [October 2, 2021, 9:06pm UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/5 "2021-10-02T21:06:05Z")

</div>

Hi,

I use the following for cpanel servers, which is basically a prebuilt LAMP server; which just users apache rather than nginx:

xfs on lvm

/boot 1024 MB  
/TMP 1024 MB  
I just use what was recommended for SWAP, for 7 ([Chapter&nbsp;15.&nbsp;Swap Space Red Hat Enterprise Linux 7 | Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/ch-swapspace))  
/ The rest.

Thanks Tom.

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [October 2, 2021, 9:33pm UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/6 "2021-10-02T21:33:11Z")

</div>

The values provided by the installer are worth looking at, as they make an intelligent guess, and are what you’d expect to see on a RHEL enterprise server.

---

<div class="post-metadata">

**Author:** ![anemarkus](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@anemarkus](https://forums.rockylinux.org/u/anemarkus)\
**Post date:** [October 2, 2021, 10:43pm UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/7 "2021-10-02T22:43:36Z")

</div>

DISA STIG just mandates a separate /tmp partition. There are other security benchmarks which are more demanding in that regard. The CISecurity Benchmark for example wants

/tmp  
/var  
/var/tmp  
/var/log  
/var/log/audit  
/home

see [CIS Red Hat Linux Benchmark](https://www.cisecurity.org/benchmark/red_hat_linux/)

additional partitions for application data can make sense, e.g. separate partitions for application data or logs.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [October 3, 2021, 6:44am UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/8 "2021-10-03T06:44:17Z")

</div>

[Appendix&nbsp;B.&nbsp;Partitioning reference Red Hat Enterprise Linux 8 | Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_a_standard_rhel_installation/partitioning-reference_installing-rhel) notes that `/usr` and `/var` are critical for boot and them being separate partitions makes things more complex. They also note that some security policies do require the separation.

Cloud provider that I have used has (OpenStack) image that creates only one partition, `/` for the system volume. No /boot, no swap. One can attach and mount additional (data) volumes and one can create swapfile, if necessary. Obviously, security policies are not in general use among their clients, i.e. such default image is ok.

Apart from security policy, there is matter of convenience. If you need to reinstall, then what do you need to rewrite and what should be kept? (User) data is what you definitely want to keep; it is unique and thus valuable. OS files are reproducible. Configuration depends on OS files, but is unique; should be deployable. On bare metal it makes sense to separate the data to partition that reinstall will not touch. On VM … perhaps it is “cheaper” to create new instance and “restore” data to it? (E.g. if OS is in “system volume” and data on attached volume, reattaching that data volume to new VM is “a restore” or “keep”?)

---

<div class="post-metadata">

**Author:** ![MadKats](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/madkats/32/1275_2.png) [@MadKats](https://forums.rockylinux.org/u/MadKats)\
**Post date:** [October 4, 2021, 5:17am UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/9 "2021-10-04T05:17:29Z")

</div>

Hey thanks for your reply,

Does that mean that, when i create a new partition let’s say for example: /var/log/audit it will created with a predefined disk space?.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [October 4, 2021, 1:02pm UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/10 "2021-10-04T13:02:06Z")

</div>

A ‘partition’ is a continuous set of sectors (LBAs) on disk. _Partition table_ stores just indices of first and last sector. When you create a partition, you decide how many sectors, how much space, it will have.

A ‘filesystem’ is file data and metadata about those file objects. It is within sectors of a partition. (Technically, filesystem could be smaller than the partition, but then you have unallocated sectors.)

You _mount_ a filesystem to some _path_.

The installer asks you for _mount point_ (the path), _size_, and _filesystem type_ (default is XFS). Then it creates partition of desired size, initializes a filesystem in it, and adds the mount instructions to `/etc/fstab`.

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 4:04am UTC](https://forums.rockylinux.org/t/help-request-for-manual-disk-partitioning/4200/11 "2023-08-25T04:04:38Z")

</div>


