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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-05-2017, 06:28 PM
|
#1
|
LQ Newbie
Registered: Apr 2017
Posts: 19
Rep: 
|
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!
|
|
|
04-05-2017, 06:33 PM
|
#2
|
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
|
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.
|
|
|
04-05-2017, 06:51 PM
|
#3
|
LQ Newbie
Registered: Apr 2017
Posts: 19
Original Poster
Rep: 
|
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.
|
|
|
04-05-2017, 09:26 PM
|
#4
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,444
|
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
|
|
|
04-05-2017, 09:46 PM
|
#5
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
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.
|
|
|
04-05-2017, 10:44 PM
|
#6
|
LQ Newbie
Registered: Apr 2017
Posts: 19
Original Poster
Rep: 
|
Quote:
Originally Posted by yancek
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
|
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. :-]
|
|
|
04-05-2017, 11:15 PM
|
#7
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828
|
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.).
|
|
|
04-05-2017, 11:43 PM
|
#8
|
LQ Newbie
Registered: Apr 2017
Posts: 19
Original Poster
Rep: 
|
Quote:
Originally Posted by rknichols
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. :-]
|
|
|
04-06-2017, 03:49 PM
|
#9
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
I posted link to way that you didn't need to boot live.
|
|
|
04-06-2017, 06:36 PM
|
#10
|
LQ Newbie
Registered: Apr 2017
Posts: 19
Original Poster
Rep: 
|
Quote:
Originally Posted by jefro
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.
|
|
|
04-06-2017, 10:09 PM
|
#11
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE & OS/2 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 6,610
|
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.
|
|
|
04-06-2017, 11:53 PM
|
#12
|
LQ Newbie
Registered: Apr 2017
Posts: 19
Original Poster
Rep: 
|
I'm using ext4.
|
|
|
All times are GMT -5. The time now is 02:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|