LinuxQuestions.org
Help answer threads with 0 replies.
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 04-05-2017, 07:28 PM   #1
TobyV
LQ Newbie
 
Registered: Apr 2017
Posts: 19

Rep: Reputation: Disabled
Is it straight forward to expand a partition


Hi! I have a hard drive with two partitions. I want to remove one of the partitions and expand the other one to the fullest. Which program do I need and do I need to backup my data first before doing this? Thx folks!
 
Old 04-05-2017, 07:33 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Ideally you should do a backup before resizing a partition. The gpated live CD would probably work the best. I've used it and it's good.
 
Old 04-05-2017, 07:51 PM   #3
TobyV
LQ Newbie
 
Registered: Apr 2017
Posts: 19

Original Poster
Rep: Reputation: Disabled
I remembered it was a program that had parted in it's name like gparted and parted. I had to ask to be sure. I hate backing up because it just takes extra time, but it must be done just in case something goes wrong.

Thanks AwesomeMachine for the program name.
 
Old 04-05-2017, 10:26 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,905

Rep: Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859Reputation: 1859
GParted has an online manual (link below) in case you want more details or run into problems. Also, as suggested, put GParted on a CD or flash drive as you can't modify a mounted system. Anytime you are modifying partitions, you should back up any data you care about.

http://gparted.org/display-doc.php%3Fname%3Dhelp-manual

Last edited by yancek; 04-06-2017 at 08:14 AM. Reason: Add link
 
Old 04-05-2017, 10:46 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,514

Rep: Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017
Almost all partition programs need to run on an unmounted partition.

If you insist on running it mounted then this may help. https://linuxconfig.org/how-to-resiz...without-umount

You may only need to backup your personal data, not the entire OS.
 
Old 04-05-2017, 11:44 PM   #6
TobyV
LQ Newbie
 
Registered: Apr 2017
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
GParted has an online manual (link below) in case you want more details or run into problems. Also, as suggested, put GParted on a CD or flash drive as you can't modify a mounted system. Anytime you are modifying partitions, you should back up any data you care about.
Quote:
Originally Posted by jefro View Post
Almost all partition programs need to run on an unmounted partition.

If you insist on running it mounted then this may help. https://linuxconfig.org/how-to-resiz...without-umount

You may only need to backup your personal data, not the entire OS.
Yes, I know the filesystem has to be unmounted and I have to use a liveDVD or liveUSB. :-]

When I asked straight forward, I meant like does partition expansion causes issues after the expansion is done? I never done it before. :-]
 
Old 04-06-2017, 12:15 AM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,362

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
Expansion is pretty safe and unlikely to cause problems. It's shrinking a partition and its filesystem that is the far more complex operation (a lot of data has to be moved). It's still advisable to have a good backup, though, just in case the expansion operation runs into some unforseen problem (faulty disk, system crash, etc.).
 
Old 04-06-2017, 12:43 AM   #8
TobyV
LQ Newbie
 
Registered: Apr 2017
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
Expansion is pretty safe and unlikely to cause problems. It's shrinking a partition and its filesystem that is the far more complex operation (a lot of data has to be moved). It's still advisable to have a good backup, though, just in case the expansion operation runs into some unforseen problem (faulty disk, system crash, etc.).
Gotcha! I will do that backup even though I hate to. :-]
 
Old 04-06-2017, 04:49 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,514

Rep: Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017Reputation: 3017
I posted link to way that you didn't need to boot live.
 
Old 04-06-2017, 07:36 PM   #10
TobyV
LQ Newbie
 
Registered: Apr 2017
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
I posted link to way that you didn't need to boot live.
I must have missed that line in your post. I was skimming quickly on all the posts. I just read your post again and yes, you did indeed mention the resizing of a mounted partition. I just have to decide which method to use, the gparted method or the method from your link. :-]

Thx

Last edited by TobyV; 04-06-2017 at 07:37 PM.
 
Old 04-06-2017, 11:09 PM   #11
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 2,188

Rep: Reputation: 700Reputation: 700Reputation: 700Reputation: 700Reputation: 700Reputation: 700Reputation: 700
Note as the link in Jefro's reply says that enlarging the partition and enlarging the filesystem on the remaining partition require different utilities. Fdisk, gdisk and gparted only change the partition's size. Which utility is required to expand the filesystem depends on the filesystem type. e.g., resize2fs works for EXTx.
 
Old 04-07-2017, 12:53 AM   #12
TobyV
LQ Newbie
 
Registered: Apr 2017
Posts: 19

Original Poster
Rep: Reputation: Disabled
I'm using ext4.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Fedora 20 - Expand /home partition and shrink Win8 partition lolzies Linux - Hardware 1 07-12-2014 11:40 AM
expand partition eduard Linux - Newbie 2 09-07-2011 10:36 AM
LXer: 10 Straight forward but proven ways to harden your LAMP servers. LXer Syndicated Linux News 0 04-14-2009 09:00 PM
I thought this would be straight forward but no... GavB Linux - Newbie 2 08-31-2007 02:52 PM
Need to expand /usr partition marenkiapina Linux - Software 2 05-22-2004 07:27 AM

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

All times are GMT -5. The time now is 05:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration