- This topic is empty.
May 11, 2021 at 5:18 pm #2786Mike RiforgiateKeymaster
When creating new partitions on your Ubuntu Linux resource, you will likely need to shrink the primary (root) disk, to make room for new partitions to be created. When creating partitions for Precinct, follow the direction for partition size here – https://community.witfoo.com/forums/topic/installing-directly-to-ubuntu-18/
The following example will be conducted on a 300GB disk All-In-One VM:
There should be the following partitions: 300GB AIO Partition GB / – OS (20Gb on all) OS 20 /Docker – 30GB on all Docker 30 /Kafka – 50GB on all but Data; 10GB on Data Kafka 50 /Cassandra_Commit – 10GB on data & AIO Cass 10 /var/log – 5GB on all var/log 5 /Data – 10GB on streamer, 50GB on IE; 100GB+ on data and AIO Data 185
- Enter SSH session on your linux VM
- If you do not have Parted installed, you will need to install it.
- This may be accomplished by executing sudo apt-get install parted
- Run the following commands to resize your root partition
- sudo bash (this will give you root access)
- lsblk (this will show you all partitions and allow you to make decisions on how much space you wish to free up)
- parted (opens and runs Parted)
- select DEVICE (this selects the drive you want to work on, for example /dev/sda1. In this example the command would be select /dev/sda1)
- unit GB (sets the measurement units to Gigabyte)
- print (shows you what number is assigned to each partition)
- resizepart (resizes root partition to end point size, example 20GB)
- provide partition number to resize
- provide end point (in GB) for new size of partition
- mkpart (when making the new partitions make sure to make the /data partition last. This will allow for future expansion to the data partition if needed)
- create the following partitions: cassandra_commit, kafka, docker, data
- ensure the partition sizes are in accordance with the guidance above
- ext4 /dev/nvme1n1p# (# will be whichever disk you are working on. Example from above would be /dev/nvme1n1p2)
- mkdir (creates the directories that will be attached to the new partitions)
- create the following dirs: cassandra_commit, kafka, docker, data
- Update your fstab file to auto mount all partitions upon each reboot.
- Use blkid to get the “UUID” of each partition
- nano /etc/fstab (add new lines for each partition, save and close)
- Mount new partitions
- mount -a (mount all partitions stored in fstab)
- df -h (display all mounted partitions)
- Exit SSH session
- You must be logged in to reply to this topic.