LinuxQuestions.org
Review your favorite Linux distribution.
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 04-05-2017, 06: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, 06:33 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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, 06: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, 09:26 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
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 07:14 AM. Reason: Add link
 
Old 04-05-2017, 09:46 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
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, 10: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-05-2017, 11:15 PM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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-05-2017, 11:43 PM   #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, 03:49 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I posted link to way that you didn't need to boot live.
 
Old 04-06-2017, 06: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 06:37 PM.
 
Old 04-06-2017, 10:09 PM   #11
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,805
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
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-06-2017, 11:53 PM   #12
TobyV
LQ Newbie
 
Registered: Apr 2017
Posts: 19

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


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

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

All times are GMT -5. The time now is 02:57 PM.

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