LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Resizing and moving large partitions (https://www.linuxquestions.org/questions/linux-software-2/resizing-and-moving-large-partitions-932842/)

isaaclw 03-05-2012 10:59 AM

Resizing and moving large partitions
 
I have a 2TB (external) HD, with 1.5TB used. What's the best way that I can (on the hard drive) convert it from ntfs to ext2?

My only thought was to resize, create a new partition, and move stuff over slowly, but that's going to require (eventually) moving a whole 1.5TB disk to the left 500GB (at least with with how gparted works).

Code:

1) resize sdb1 (ntfs) from 2TB to 1.5TB
* <500GB
2) create new partition (sdb2 -- ext2)
3) move 500GB of data from sdb1 to sdb2
* 500GB
4) resize sdb1 from 1.5TB to 1.0TB
* <500GB
5) move sdb2 to the left 500GB and add 500GB
* 500GB
6) move 500GB of data from sdb1 to sdb2
* 500GB
7) resize sdb1 from 1.0TB to 500GB
* <500GB
8) move sdb2 to the left 500GB and add 500GB
* 1TB
9) move 500GB of data from sdb1 to sdb2
* 500GB
10) delete sdb1
11) move sdb2 to the left 500GB and add 500GB
* 1.5TB

Cost: 4.5-6TB
without having to move partitions to the left: 1.5TB - 3.0TB

So you see, the issues are steps 5, 8, and 11. If only I could add the data to the head of the partition, instead of having to move all the data over...

I guess my question comes down to: Is there any easy way to do something like this? If not, is there any way to "incorporate" free space before a partition, without moving the whole partition?

amani 03-05-2012 11:32 AM

0. Use xfs or ext4 not ext2
Best is to use another hard disk or
Simply compress the data to tar.bz2
Resize move data
decompress

isaaclw 03-05-2012 12:13 PM

Quote:

Originally Posted by amani (Post 4619038)
0. Use xfs or ext4 not ext2

I agree. I'm trying to maintain a small amount of compatibility with Windows, though.
Quote:

Originally Posted by amani (Post 4619038)
Best is to use another hard disk or

Yeah, that's my fall back plan, but requires finding another hard drive.
Quote:

Originally Posted by amani (Post 4619038)
Simply compress the data to tar.bz2
Resize move data
decompress

Unfortunately that won't work because the data doesn't compress very well...

anomie 03-05-2012 12:23 PM

What a dilemma. I don't know of a way to "convert" between those two very different filesystems.

Especially if you consider this to be important data, this may be one situation where you want to shell out for the new drive, unfortunately. (I get nervous about multiple filesystem / partition resizes when it comes to data I mustn't lose. One little goof in your sequence may be a disaster.)

-------

edit: Let's put it into a monetary argument. Is the data worth more than US$150 (the approximate cost of a new 2TB drive) to you?

If so, better to play it safe and buy. (Unless someone follows up with an elegant, low-risk method for accomplishing your task.)


All times are GMT -5. The time now is 11:19 AM.