Score:0

How to mount a free storage permanently on Ubuntu?

tr flag

I have created a free non allocated volume by shrinking a drive in my windows, and now I want to add that free space to my Ubuntu 20.04 machine in dual boot.

I have created 150GB of free space in windows but now I am seeing 161GB free space on Ubuntu disk, Can anyone guide me how to mount this 161gb permanently on Ubuntu Please find the disk partition image here

David avatar
cn flag
Do you have your live USB ready to use so you can run gparted from it? Have you backed up any files you would not want to lose? You should read the info on this URL before you go any further. https://gparted.org/faq.php
tr flag
I just want to mount this as additional space, my present root and home partitions are running well and have 50 percent storage available, I don't have live usb with me now.
David avatar
cn flag
It does not work that way. Also you need the live Media for any work with partitions.
Score:1
cn flag

First, you will need to

  1. Create a partition in the free space
  2. Format that partition so it contains a file system

Al of this can be done with the utility "Gnome Disks", installed by default in default Ubuntu with the Gnome desktop, or with Gparted, available by default in a live Ubuntu session started from an installation USB/DVD. Because you are not changing partitions that are in use, you can do this from within your running system. Alternatively, boot into the live environment.

Then you can

  1. Mount that partition automatically during startup. That can be done manually by editing the system configuration file /etc/fstab, but it can also be done with the utility "Gnome Disks", installed by default in default Ubuntu with the Gnome desktop.

You cannot "simply" add that space to your Ubuntu system partition, because there is an ntfs partition to the right of it. That partition would need to be deleted (destructive process) or moved (slow process) to make free space adjacent to the Ubuntu system partition. Only then could that partition be expanded.

Score:1
cn flag

If you are using LVM, you could extend the logical volume that Ubuntu is installed on. This can be achieved with the following:

  • create a new partition in the free space: use gparted or fdisk
  • Create a new LVM physical volume(PV): pvcreate /dev/sdb6
  • Add the PV to the LVM Volume Group(VG): vgextend vg-ubuntu /dev/sdb6
  • Extend the LVM Logical Volume(LV): lvextend -L +150G /dev/vg-ubuntu/root
  • Resize the filesystem: resize2fs /dev/vg-ubuntu/root

If you are not using LVM, the you can just create a normal partition and mount it wherever you like.

  • create a new partition in gparted and format it as ext4 or xfs
  • mount it where you need to store files.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.