I'm kinda in trouble here. :/

kahlo08

Honorable
Feb 21, 2013
252
0
10,780
So after dual-booting my windows 7 with ubuntu I decided that I would stick with ubuntu so I used gparted partition editor to delet windows 7 partition and now there's like 600gb unallocated space waiting for it to be used. How can I merge this unallocated space with the 50GB linux os? I need more space to install guild wars 2. :c I've tried to merge it but it didn't give me that Resize/Move option whenever on extended which has ext4 and linux-swap.
 
Solution
There are a couple of guides out there already, so I'll avoid duplicating the obvious

There are three steps that you need to follow:

1. Create a new volume.

2. Create a new file system on that volume.

3. Configure the new file system to be mounted automatically.

What you need to do first is create a new volume. How you do this depends on how you setup the drive when you installed Ubuntu. If you configured it without LVM, just create a new partition volume on the drive using fdisk. If you configured it with LVM you can either create a new physical volume, or extend an existing physical volume (physical volumes appear as partitions on the disk) to encompass the space freed up by removing Windows. Then, create a new logical volume...


You're probably better off creating a whole new partition and mounting it at a common shared application mount point such as /opt
 

kahlo08

Honorable
Feb 21, 2013
252
0
10,780


Could you please tell me how to do that? XD

 
There are a couple of guides out there already, so I'll avoid duplicating the obvious

There are three steps that you need to follow:

1. Create a new volume.

2. Create a new file system on that volume.

3. Configure the new file system to be mounted automatically.

What you need to do first is create a new volume. How you do this depends on how you setup the drive when you installed Ubuntu. If you configured it without LVM, just create a new partition volume on the drive using fdisk. If you configured it with LVM you can either create a new physical volume, or extend an existing physical volume (physical volumes appear as partitions on the disk) to encompass the space freed up by removing Windows. Then, create a new logical volume within that physical volume.

Creating a new filesystem is simple. Just run mkfs.ext4 and target the device.

If you created a partition volume, you will want to run something like `mkfs.ext4 /dev/sda3`.

If you created a logical volume you will want to run something like `mkfs.ext4 /dev/myphysicalvolume/mylogicalvolume` or `mkfs.ext4 /dev/mapper/myphysicalvolume-mylogicalvolume`. It doesn't matter which one you use, they are both aliases to disks located at `/dev/dm-#`

Finally, add the volumes to /etc/fstab. You will want to enter a new line that looks something like so if LVM is not used:

/dev/sda3 /mymountpoint ext4 defaults 1 2

or, if LVM is used:

/dev/mapper/myphysicalvolume-mylogicalvolume /mymountpoint ext4 defaults 1 2

For example, this is from my fstab

/dev/mapper/rhel-root / xfs defaults 1 1
UUID=########### /boot xfs defaults 1 2
/dev/mapper/rhel-home /home xfs defaults 1 2
/dev/mapper/rhel-swap swap swap defaults 0 0

I have a physical volume named rhel (RedHat Enterprise Linux), with three logical volumes contained within it, named root, home, and swap. The root filesystem is mounted at /, home is monted at /home, and swap is not mounted on the swap handler (not a part of the navigable file system).

There is also a non-lvm managed partition which is accessed by UUID because the device filesystem isn't up at that time. This is the boot partition.

The actual disk that these are all stored on is /dev/sda, running `fdisk /dev/sda` and printing the partition table shows the following:

/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 209715199 104344576 8e Linux LVM

This matches up with the expected results from `lvm pvdisplay` which shows that I have a physical volume on /dev/sda2, which is the second partition on the physical drive /dev/sda.

You should be able to fill in the blanks with a little bit of googling. Good luck
 
Solution

kahlo08

Honorable
Feb 21, 2013
252
0
10,780


Thank you/