Results 1 to 3 of 3

Thread: My Kali Filesystem

  1. #1
    Join Date
    2016-May
    Posts
    16

    My Kali Filesystem

    Hello all, I've had great success using these forums for fixing problems I've had in the past, so I'm giving it another go.
    I have a logical volume filesystem.
    I need to enlarge one of my partitions/LVs to make room.. it's 30g capacity is now full. When I first installed the my OS, I had it partitioned so that my /etc, /usr, and /root directory trees were on a smaller partition, and my /home was on the biggest partition.

    I foolishly tried copying my /etc and /usr directory trees over to my /home directory.. but I don't need help with the cleanup of that disaster.. that's already taken care of.

    I need help enlarging my volume/partition that only has 30G on it.

    Here is some info on my filesystem:

    at the terminal:

    Code:
    root@KandA:/etc# vgdisplay
    --- Volume group ---
    VG Name KandA-vg
    System ID
    Format lvm2
    Metadata Areas 1
    Metadata Sequence No 4
    VG Access read/write
    VG Status resizable
    MAX LV 0
    Cur LV 3
    Open LV 3
    Max PV 0
    Cur PV 1
    Act PV 1
    VG Size 465.52 GiB
    PE Size 4.00 MiB
    Total PE 119173
    Alloc PE / Size 119173 / 465.52 GiB
    Free PE / Size 0 / 0
    VG UUID epV82A-6It2-kfKs-uJ1q-HEsn-3j4L-b8VB2N
    and



    Code:
    root@KandA:/etc# lvdisplay
    --- Logical volume ---
    LV Path /dev/KandA-vg/root
    LV Name root
    VG Name KandA-vg
    LV UUID 87EScU-sFY9-3utM-mOeR-RnzL-9X5Y-9vVabt
    LV Write Access read/write
    LV Creation host, time KandA, 2016-07-12 19:50:34 -0600
    LV Status available
    # open 1
    LV Size 27.94 GiB
    Current LE 7152
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:0
    
    --- Logical volume ---
    LV Path /dev/KandA-vg/swap_1
    LV Name swap_1
    VG Name KandA-vg
    LV UUID vO6Hk8-cAoG-1o6w-2V2k-wD8d-3bmo-UJI5mM
    LV Write Access read/write
    LV Creation host, time KandA, 2016-07-12 19:50:34 -0600
    LV Status available
    # open 2
    LV Size 11.64 GiB
    Current LE 2979
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:1
    
    --- Logical volume ---
    LV Path /dev/KandA-vg/home
    LV Name home
    VG Name KandA-vg
    LV UUID F9aKJO-KNds-R2Nd-9weh-Lkgw-9HNV-fNU9jm
    LV Write Access read/write
    LV Creation host, time KandA, 2016-07-12 19:50:34 -0600
    LV Status available
    # open 1
    LV Size 425.95 GiB
    Current LE 109042
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:2
    Still at the terminal:



    Code:
    root@KandA:/etc# blkid
    /dev/sda1: UUID="371b8f2f-ccef-40d8-80ca-df20139f123b" TYPE="ext2" PARTUUID="b1ae3941-01"
    /dev/sda5: UUID="GfTMEG-NPCe-Vkw3-cbqp-nXOs-Bcrm-zcnqzF" TYPE="LVM2_member" PARTUUID="b1ae3941-05"
    /dev/mapper/KandA--vg-root: UUID="2c26bd85-0f96-4800-a09d-a81cda07d35c" TYPE="ext4"
    /dev/mapper/KandA--vg-swap_1: UUID="ccc5dfea-29eb-468a-ae4b-9e4b6c6f9e85" TYPE="swap"
    /dev/mapper/KandA--vg-home: UUID="f7928f21-5453-4cbf-a215-2cd4c3783e76" TYPE="ext4"
    My /etc/fstab file contains this:

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    /dev/mapper/KandA--vg-root / ext4 errors=remount-ro 0 1
    # /boot was on /dev/sda1 during installation
    UUID=371b8f2f-ccef-40d8-80ca-df20139f123b /boot ext2 defaults 0 2
    /dev/mapper/KandA--vg-home /home ext4 defaults 0 2
    /dev/mapper/KandA--vg-swap_1 none swap sw 0 0
    /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
    Thanks in advance.

  2. #2
    Join Date
    2016-May
    Posts
    16
    If anyone knows how to enlarge logical volumes, and can tell me how, I would be most appreciative.

  3. #3
    Join Date
    2016-May
    Posts
    16
    Ok so my issue was that when I created my OS, the installation USB I was using asked me if I wanted to partition my drive with logical volumes as an option. I chose yes. It then asked me if how I would like to partition my drive, and I chose for it to be partitioned into two major partitions, which also happened to include a third, small, swap partition.
    So I had a 30G "root" partition, a 350G "home" partition, and a small swap.
    I began installing a LOT of stuff onto my machine, not just packages using apt-get on the command line, but also downloading source code for fairly large programs that I would build and make.
    So eventually I ran out of space in my 30G root partition.
    The simple fix for this, that I found, is to use a live USB to boot from, download a logical volume management program:

    Code:

    sudo apt-get install system-config-lvm

    Then run it:

    Code:

    sudo system-config-lvm

    It has a gui, so it's very easy to use. You click on the logical volume that has the bulk of your HDD, and/or the volume you can spare some space to give to the volume that is running out. This volume you have to decrease in space. I decreased mine by 50gigs. Then I clicked on the logical volume that needed to be increased, my 'root' labelled volume. I increased that by the difference.
    So my new 'root' partition is now 90G, my 'home' partition is now 300G, and my swap is exactly the same because I didn't mess with it.
    Please keep in mind that if you're going to resize your partitions/volumes, they must be currently unmounted and unused, thus you must be doing this from a utility disk or a live USB.
    After I resized those 2 partitions, I rebooted, and everything is fine.

    Cheers

Similar Threads

  1. Kali virtualbox VM repeatedly becoming 'read-only filesystem'
    By droon in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2022-04-22, 16:24
  2. Kali Linux filesystem is corrupted after install
    By Headline in forum TroubleShooting Archive
    Replies: 8
    Last Post: 2018-11-27, 18:08
  3. Kali Linux Windows 10 (WSL) filesystem location
    By txkirrane in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2018-04-04, 03:26
  4. RPI2 Kali Sana how to resize filesystem?
    By Naprosnia in forum ARM Archive
    Replies: 15
    Last Post: 2015-09-14, 18:45
  5. Replies: 1
    Last Post: 2015-08-12, 11:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •