LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-11-2012, 05:30 AM   #1
thallium
Member
 
Registered: Oct 2012
Location: Austin, TX
Distribution: Ubuntu Server 12.04
Posts: 33

Rep: Reputation: Disabled
Resizing Logical Partition, creating new partition


So here is what I'm trying to do with my harddisk.

When I installed ubuntu, I gave it an 80GB partition on a 500GB drive, so if I crashed my OS, I would in theory not lose my pile of data.

I have ubuntu installed and would now like to create that data partiion on the remaining 420GB. What is the best way to go about this?

Currently the OS says my hard disk has an extended partition out to 500GB and an logical partition out to 500GB also!

running fdisk -l shows that I do have a /dev/mapper/...-root size of 77.9GB and -swap of 2.1GB.
 
Old 11-11-2012, 05:34 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Please post the output of
Code:
df -h
fdisk -l /dev/sda
 
Old 11-11-2012, 05:52 AM   #3
thallium
Member
 
Registered: Oct 2012
Location: Austin, TX
Distribution: Ubuntu Server 12.04
Posts: 33

Original Poster
Rep: Reputation: Disabled
#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/.............. -root 73G 6.4G 63G 10% /
udev 992M 4.0K 992M 1% /dev
tmpfs 401M 476K 400M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1001M 0 1001M 0% /run/shm
/dev/sdb1 228M 25M 192M 12% /boot

fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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
Disk identifier: 0x000c7a51

Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 499711 248832 83 Linux
/dev/sdb2 501758 976771071 488134657 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sdb5 501760 976771071 488134656 8e Linux LVM
 
Old 11-11-2012, 07:57 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Here it is again, lined up for legibility
Code:
#df -h
Filesystem                      Size Used Avail Use% Mounted on
/dev/mapper/.............. -root 73G 6.4G   63G  10% /
udev                            992M 4.0K  992M   1% /dev
tmpfs                           401M 476K  400M   1% /run
none                            5.0M    0  5.0M   0% /run/lock
none                           1001M    0 1001M   0% /run/shm
/dev/sdb1                       228M  25M  192M  12% /boot

fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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
Disk identifier: 0x000c7a51

Device Boot  Start       End    Blocks Id System
/dev/sdb1 *   2048    499711    248832 83 Linux
/dev/sdb2   501758 976771071 488134657  5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sdb5   501760 976771071 488134656 8e Linux LVM
Curious that it is /dev/sdb, not sda ... ?

It looks as if you have ~500 GB for LVM and only ~75 GB used plus whatever is used for swap. The obvious thing to do would be to create another logical volume (that's an LVM logical volume, not to be confused with a logical partition).

Here are some LVM links
 
Old 11-11-2012, 02:37 PM   #5
thallium
Member
 
Registered: Oct 2012
Location: Austin, TX
Distribution: Ubuntu Server 12.04
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thanks, that helps a lot. A few more questions.

When I perform lvcreate, it seems to only let me create a logical volume ~100GB in size. Is this a limitation of LVM for creating logical volumes inside a volume group?
 
Old 11-11-2012, 08:21 PM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
No.

Maybe the space is already allocated. Use the vgdisplay and lvdisplay commands to see usage.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing partition in VHD file - root partition first, swap second (*Advanced*) dpesios Linux - Virtualization and Cloud 2 05-18-2012 05:50 AM
Resizing partition in VHD file - root partition first, swap second (*Advanced*) dpesios Linux - Virtualization and Cloud 3 05-17-2012 11:53 AM
HowTo convert Primary Partition to Logical (ie move it inside the Extended Partition) Tom6 Linux - Software 3 11-29-2010 03:40 PM
Resizing Logical Volume Partition BobNutfield Fedora 4 02-03-2008 05:56 PM
Partition Problems: Bad primary partition 1: logical partitions overlap rovitotv Slackware 6 01-08-2006 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration