Announcement

Collapse
No announcement yet.

Expand root directory on primary Drive

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Expand root directory on primary Drive

    I recently had to perform a clean install of v2.5 on my two-disk VB (120GB SSD and 8TB spinning storage drive, Plus an 8TB USB BACKUP disk).
    https://www.vortexbox.org/forum/supp...-update-errors

    My /storage is fine, but How can I expand the system root drive to the total 111GB available?

    I followed the instructions,
    https://wiki.vortexbox.org/vortexbox...n_instructions
    But replaced
    config_4-30.sh with: config_4-fill.sh

    but my main drive still has a partition size of 7.2GB
    fdisk -l

    Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: 745F1BA5-546E-4A92-9193-B44563A59B5B
    Device Start End Sectors Size Type
    /dev/sda1 2048 4095 2048 1M BIOS boot
    /dev/sda2 4096 1028095 1024000 500M Linux filesystem
    /dev/sda3 1028096 1159167 131072 64M Linux swap
    /dev/sda4 1159168 16777182 15618015 7.5G Linux filesystem

    Disk /dev/sdb: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: 83D1955F-FB78-447E-8D04-BA2F2DB1EF4B
    Device Start End Sectors Size Type
    /dev/sdb1 2048 15628053134 15628051087 7.3T Linux filesystem

    Disk /dev/sdc: 7.3 TiB, 8001562869760 bytes, 15628052480 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: C0363736-24D3-4051-8377-DD8C82990035
    Device Start End Sectors Size Type
    /dev/sdc1 2048 15628052446 15628050399 7.3T Microsoft basic data

    Disk /dev/mapper/StorageVM-lv_storage: 7.3 TiB, 8001557626880 bytes, 15628042240 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes


    cat /etc/fstab
    #
    #
    UUID=ec6db90d-e339-4355-8ef3-477624fc0f13 / ext4 defaults 1 1
    UUID=a74eccc1-f0ed-407a-a8bd-0dd3dbfb7b8f /boot ext4 defaults 1 2
    UUID=936c2015-6ef1-4bec-9d16-872c00c8ed32 swap swap defaults 0 0

    /dev/StorageVM/lv_storage /storage ext4 defaults 2 2
    Last edited by vbbob; 05-10-2019, 05:53 PM.

  • #2
    Download GPARTED - https://gparted.org/liveusb.php - and put it on a USB and boot from it. While you are re-sizing partitions you may want to increase the size of Linux swap.

    Comment


    • #3
      Thank you, that worked!
      And it fixed my associated PLEX error: "The disk is almost full (less than 10GB remaining)"

      One additional question: Even though I tried it first, I was not allowed to increase the size of the SWAP. Any ideas?

      Comment


      • #4
        Glad you got it to work, always good to hear back.

        If you have expanded sda4 to the maximum, you could shrink sda4 by, say, 4GB by leaving 4GB in front of sda4 then after applying the change there will be an unallocated space which you can expand sda3 into.

        Comment


        • #5
          I actually tried setting the SWAP (sda3) first, but it would not let me make it larger, only smaller.
          Also as I set sda4, I reserved a few Gigs, but it still would not let me change sda3 afterward.
          When I check phpSysInfo, I don't see any usage, but maybe it happens too quickly?

          Comment


          • #6
            I queried Andrew about the small swap space a while ago and he said that if you have more than 2GB RAM you shouldn't need to increase it. These days I build servers with 4GB RAM and set the swap at 4GB.
            I have seen some of the swap space used by LMS on rescan, but I have 150,000 + tracks, MusicIP and InguzEQ running plus 4GB of video for Plex.

            As an old systems guy, in the 1970's I was configuring IBM 360's for Virtual Storage and it is ingrained to have adequate swap space.

            Comment


            • #7
              use the command config_4-fill.sh to fill the drive. That's all you need to do.

              Don't mess with the swap space. it's not needed. I'll probable eliminate it in future releases.

              Comment


              • #8
                FYI, As above, I tried the config_4-fill.sh command, multiple times, but it never worked in THIS iteration.

                GPARTED worked for me for me to expand sda4 and I left sda3 alone as it would not let me change it!

                Thanks

                Comment


                • #9
                  I used "parted" to enlarge the /dev/sda4 partition to the full size of the drive... then for hours tried copying to the "/storage" folder only to be told I was full after only 3 gigabytes.

                  The secret that the effing internet doesn't really want you to know is you also have to use "resize2fs /dev/sda4" on the command line to make the file system expand to use the partition. Argh. So annoying to not just have these things stated along side the command to expand the partition. Screw you, internet! :-) but also thank you internet "Ask Ubuntu" forums for the answer.

                  Comment

                  Working...
                  X