LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Unable to use new partition (under /dev) with pvcreate (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/unable-to-use-new-partition-under-dev-with-pvcreate-4175564165/)

abhishek_naik 01-17-2016 07:28 AM

Unable to use new partition (under /dev) with pvcreate
 
I have created a new partition sda3 under /dev as below:

abhisheknaik@ubuntu:/dev$ ls sda3
sda3
abhisheknaik@ubuntu:/dev$

However, when I run the pvcreate /dev/sda3 command, I get the following message:

Device /dev/sda3 not found (or ignored by filtering).

What might be the reason I am unable to see sda3?

michaelk 01-17-2016 08:01 AM

You need to use sudo i.e.

sudo pvcreate /dev/sda3

I would create a backup by cloning your VM just in case something happens. From your other thread you enlarged you virtual disk and create a new partition. As a visual check post the output of check post the output of the command:

sudo parted -l

abhishek_naik 01-17-2016 08:08 AM

Hi,

Please see the output of running the sudo parted -l command:

Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 22.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 20.4GB 20.4GB primary ext4 boot
3 20.4GB 20.4GB 1048kB primary lvm
2 20.4GB 21.5GB 1072MB extended
5 20.4GB 21.5GB 1072MB logical linux-swap(v1)

Initially, it was 20 GB. I then extended it by just 1 GB on a trial basis. I had a few questions:
1. Should it be a simple Linux partition (or a LVM)? I just need to increase the storage space;
2. Why is the disk usage analyser still showing the old 20GB space instead of 21 GB?

Please see the output of the pvcreate command (run using LVM GIU tool):
http://pasteboard.co/RxiHITK.png

michaelk 01-17-2016 09:18 AM

What was initially 20GB? Your virtual disk is 22GB and it is basically fully allocated. Your /dev/sda3 is only 1MB so isn't big enough.

You can increase the size of the existing virtual disk and resize sda1 to give you more storage. An additional partition can be used to mount any other directory it just depends on where you need additional storage.

abhishek_naik 01-17-2016 09:30 AM

I mean, the virtual hard disk size was initially 20GB. Also, as you pointed out, my main aim is to increase the size of the existing virtual disk and resize sda1 to give me more storage. Could you please provide me some pointer (any useful link, etc.) to get me started? I searched online, but creating a new partition is the way mentioned (as I am using VMWare). Thanks! :)

michaelk 01-17-2016 09:53 AM

First thing would be to create a backup of your VM and then enlarge your virtual disk.
Boot your VM from the Ubuntu live image.
Move extended/swap partitions and resize your / partition using gparted.

http://askubuntu.com/questions/29488...r-virtual-disk

rknichols 01-17-2016 12:12 PM

It's hard to tell what is going on when you increase the size by just 1 GB and then show the report from parted, which is using GB units. Stuff gets lost in the roundoff errors.

But, it looks like you have 1 GB at the end of the disk following the extended partition (partition 2), but the partition you added (3) got stuck in the sliver of unused space between partitions 1 and 2. You need to delete that partition and re-create it at the end of the disk rather than accepting the default starting location that some tool suggested.

TB0ne 01-17-2016 01:05 PM

Quote:

Originally Posted by michaelk (Post 5479702)
First thing would be to create a backup of your VM and then enlarge your virtual disk.
Boot your VM from the Ubuntu live image.
Move extended/swap partitions and resize your / partition using gparted.

http://askubuntu.com/questions/29488...r-virtual-disk

Pretty much a duplicate of:
http://www.linuxquestions.org/questi...tu-4175564110/

In that other thread, it was suggested that the OP just create another partition. Moving /home to a different, separate 'drive' would free up that space for the OS as well.


All times are GMT -5. The time now is 10:01 PM.