Partitioning your disk for Precinct

Welcome Forums Appliance and OS Partitioning your disk for Precinct

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2786
    Mike RiforgiateMike Riforgiate
    Keymaster

    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 AIOPartitionGB
    / – OS (20Gb on all)OS20
    /Docker – 30GB on allDocker30
    /Kafka – 50GB on all but Data; 10GB on DataKafka50
    /Cassandra_Commit – 10GB on data & AIOCass10
    /var/log – 5GB on allvar/log5
    /Data – 10GB on streamer, 50GB on IE; 100GB+ on data and AIOData185

     

    1. Enter SSH session on your linux VM
    2. If you do not have Parted installed, you will need to install it.
      1. This may be accomplished by executing sudo apt-get install parted
    3. Run the following commands to resize your root partition
      1. sudo bash                 (this will give you root access)
      2. lsblk                 (this will show you all partitions and allow you to make decisions on how much space you wish to free up)
      3. parted                 (opens and runs Parted)
      4. 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)
      5. unit GB                 (sets the measurement units to Gigabyte)
      6. print                 (shows you what number is assigned to each partition)
      7. resizepart                 (resizes root partition to end point size, example 20GB)
        1. provide partition number to resize
        2. provide end point (in GB) for new size of partition
      8. 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)
        1. create the following partitions: cassandra_commit, kafka, docker, data
        2. ensure the partition sizes are in accordance with the guidance above
      9. print
    4. ext4 /dev/nvme1n1p# (# will be whichever disk you are working on. Example from above would be /dev/nvme1n1p2)
    5. mkdir (creates the directories that will be attached to the new partitions)
      1. create the following dirs: cassandra_commit, kafka, docker, data
    6. quit
    7. Update your fstab file to auto mount all partitions upon each reboot.
      1. Use blkid to get the “UUID” of each partition
      2. nano /etc/fstab (add new lines for each partition, save and close)
    8. Mount new partitions
      1. mount -a (mount all partitions stored in fstab)
      2. df -h (display all mounted partitions)
    9. Exit SSH session

     

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.