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 03-28-2012, 01:44 AM   #1
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73
Blog Entries: 1

Rep: Reputation: 2
How to enlarge the root partition volume?


Hi all,

I want to enlarge the root partition(/dev/sda1,eg.).
Which command is better to do this?

Thanks.

jimtony

Last edited by jimtony; 03-28-2012 at 01:55 AM.
 
Old 03-28-2012, 01:57 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
This question has been asked many times on LQ. Some of the previous threads are listed here.
 
1 members found this post helpful.
Old 03-28-2012, 04:27 AM   #3
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
If it is an LVM partition then "lvextend" command can be used. Check "man lvextend" for details.
 
Old 03-29-2012, 02:14 AM   #4
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73

Original Poster
Blog Entries: 1

Rep: Reputation: 2
Now I would change my partition to LVM.It is useful.
 
Old 03-29-2012, 08:12 AM   #5
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
Quote:
Originally Posted by jimtony View Post
Now I would change my partition to LVM.It is useful.
Yes -- LVM is great if you don't mind the extra complexity.
 
Old 03-29-2012, 07:05 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,361

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Start by showing us
Code:
fdisk -l
& that's a lowercase L there
 
Old 03-30-2012, 10:12 PM   #7
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73

Original Poster
Blog Entries: 1

Rep: Reputation: 2
I have some windows partition and some /dev/sda ext4 partition.
Ext4 partition is not easy to enlarge size.
So I want to change the partition type to LVM.
 
Old 03-31-2012, 01:56 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,132

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
You were asked to provide information. We can't help you if you won't help us.
 
Old 04-01-2012, 05:27 AM   #9
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73

Original Poster
Blog Entries: 1

Rep: Reputation: 2
The "fdisk -l" output is as follows:

linux-ua9t:~ # df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 20G 5.1G 14G 28% /
devtmpfs 2.0G 8.0K 2.0G 1% /dev
tmpfs 2.0G 76K 2.0G 1% /dev/shm
tmpfs 2.0G 692K 2.0G 1% /run
/dev/sda8 20G 5.1G 14G 28% /
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 0 2.0G 0% /media
tmpfs 2.0G 692K 2.0G 1% /var/run
tmpfs 2.0G 692K 2.0G 1% /var/lock
/dev/sda6 180G 36G 144G 20% /windows/E
/dev/sda9 111G 1.7G 108G 2% /home
/dev/sda5 150G 4.3G 146G 3% /windows/D
/dev/sda3 101G 44G 57G 44% /windows/C
 
Old 04-01-2012, 08:38 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,361

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
No, that's 'df -h'; you were asked for 'fdisk -l' a COMPLETELY different cmd (although handy to know).
Incidentally, you may need to be root or use sudo to run fdisk.
 
Old 04-01-2012, 09:34 PM   #11
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73

Original Poster
Blog Entries: 1

Rep: Reputation: 2
I must apologize to chrism01 for my mistake.I didn't check carefully.
I have changed my partition to LVM.It is easy to enlarge size.
The "fdisk -l" command output is as follows(now it's LVM partition type):
Quote:
linux-odv8:~ # fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd746db65

Device Boot Start End Blocks Id System
/dev/sda1 2048 24475647 12236800 27 Hidden NTFS WinRE
/dev/sda2 24475648 24680447 102400 7 HPFS/NTFS/exFAT
/dev/sda3 24680448 234396335 104857944 7 HPFS/NTFS/exFAT
/dev/sda4 * 234397696 1250260991 507931648 f W95 Ext'd (LBA)
/dev/sda5 234399744 548972543 157286400 7 HPFS/NTFS/exFAT
/dev/sda6 548974592 925292543 188158976 7 HPFS/NTFS/exFAT
/dev/sda7 925294592 925616127 160768 83 Linux
/dev/sda8 925618176 1250242559 162312192 8e Linux LVM

Disk /dev/mapper/system-home: 110.4 GB, 110368915456 bytes
255 heads, 63 sectors/track, 13418 cylinders, total 215564288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/system-home doesn't contain a valid partition table

Disk /dev/mapper/system-root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/system-root doesn't contain a valid partition table

Disk /dev/mapper/system-swap: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders, total 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/system-swap doesn't contain a valid partition table

Last edited by jimtony; 04-01-2012 at 09:37 PM.
 
  


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
extended sata partition shrunk at 15 partition limit, how to re-enlarge Siljrath Linux - General 3 06-02-2010 10:33 PM
Enlarge extended partition fawrell Linux - General 4 07-31-2008 02:08 AM
Root partition on logical volume and kernel without module support CedrX Linux - Server 1 03-02-2007 11:26 AM
ntfsresize: enlarge to the left of partition help venkman Linux - Newbie 7 09-16-2005 07:11 PM
How to enlarge my Linux partition westspider Linux - Software 3 03-22-2005 05:09 AM

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

All times are GMT -5. The time now is 12:31 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