LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-26-2015, 12:47 PM   #1
aristosv
Member
 
Registered: Dec 2014
Posts: 261

Rep: Reputation: 3
expand partition without losing data


Is there a way to expand that last ext4 partition, to takeover that unallocated space, without losing any data that already exist on the ext4 partition?
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	37
Size:	59.5 KB
ID:	19018   Click image for larger version

Name:	2.jpg
Views:	29
Size:	20.6 KB
ID:	19019  
 
Old 07-26-2015, 04:22 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 4,916

Rep: Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400
General case

I can give you a firm and confident answer: Perhaps.
If you are using LVM and have space to extend the volume group, then yes and most likely without downtime.
If you are NOT using LVM, then it is possible. It is likely to will require unmounting the storage for the adjustment.
If you are using native disk, it is safer to back up the file system, blow it away, create the larger replacement, mount it, and restore that backup.

I hope that you are using LVM.
 
Old 07-26-2015, 10:15 PM   #3
aristosv
Member
 
Registered: Dec 2014
Posts: 261

Original Poster
Rep: Reputation: 3
No I'm not using LVM. I created that partition using fdisk and mkfs
Some times I miss Windows. (right-click & extend)
 
Old 07-27-2015, 12:49 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,823

Rep: Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004
Simple enough with gparted - it's a GUI that allows you to point and click.
Grow the extended first, then grow the logical - gparted will expand the filesystem at the same time. Never used it on a thumb drive though.
Ext4 handles online expansion fine.

Note my sigline.
 
Old 07-27-2015, 12:51 AM   #5
aristosv
Member
 
Registered: Dec 2014
Posts: 261

Original Poster
Rep: Reputation: 3
I tried gparted, its not giving me the option to expand to the unallocated space.
 
Old 07-27-2015, 07:46 AM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,716

Rep: Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191
What did you try to expand? You must first expand the extended partition (partition 3). Then you can expand partition 5 to use the new space in the extended partition.
 
Old 07-27-2015, 07:53 AM   #7
aristosv
Member
 
Registered: Dec 2014
Posts: 261

Original Poster
Rep: Reputation: 3
With gparted I tried to expand the last ext4 partition (4.3GB), as shown in the screen shot attached. Its the only one that can be expanded to take over the rest of the unallocated space(7.1GB). gparted would not do it.
 
Old 07-27-2015, 08:10 AM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,716

Rep: Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191
Partition 5 exists within the extended partition (partition 3) and cannot be extended until you grow the extended partition. In gparted, select the extended partition. You may need to select it from the list rather than the graph, since it's hard to grab the edge of the extended partition if there is no unallocated space within it. You should then be able to resize it.
 
  


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
How do I expand a partition less virtual drive while preserving the data? MissingPixels Linux - Hardware 1 11-19-2013 12:56 PM
change partition format without losing data smeezekitty Linux - General 23 10-17-2009 12:31 PM
How to partition my HDD without losing any data? deepumnit Debian 4 03-28-2008 03:05 PM
Re-partition without losing data goodtogo Linux - Software 4 06-22-2007 08:20 AM
resize existing partition w/o losing data rebelscum Slackware 8 07-21-2005 05:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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