2

Is there any direct way to convert an HFS+ drive to EXT4 and if so how?

Was thinking maybe gParted?

If not, I'll just copy contents off, reformat, copy back on. Just trying to avoid moving 2TB of data.

jb510
  • 212
  • 1
  • 4
  • 9
  • Considering you'd be insane not to backup before doing a job like this *anyway*, I'd suggest the 'costs' of the second method are far less than they may first appear. – Rob Moir Jul 07 '13 at 21:32
  • Yes, I do already have backups, but they too are HFS+ based and doesn't get me to where I want in the shortest path which is that specific drive EXT4 with that data on it. Sometimes the answer to these question is no, and that's fine. – jb510 Jul 08 '13 at 06:06
  • 1
    A backup, a proper backup anyway, should be independant of the file system format of the source drive. That's why I suggested it - you can't do what you originally asked for, and (given my point that you'd need to do a *proper* backup as part of this job even if it was) that did seem the shortest path to a result for you from where I'm sitting... which is in the chair of someone who's done precisely this job and lots of similar ones dozens of times when working on OSX server conversions to other platforms. – Rob Moir Jul 08 '13 at 07:53

2 Answers2

2

Converting in place is (as far as I know) not possible if HFS+ is involved.
Besides, this sort of thing should never be done without a proper backup of the data.
So copying the data to another medium is sort of mandatory anyway to make the backup.

I run into a similar sort of scenario regularly when needing to resize partitions on encrypted drives. The encryption software gets in the way of partitioning tools so a full decrypt before and a re-encrypt afterwards is required.
It is actually faster to just copy the D: (and E: if present) partition to another disk (SSD on USB3 or eSata to make this as fast as possible).
Do a quick-format of D: and then decrypt (as D: is empty the decrypt is almost instantaneous, here is the big speed gain).
Resize the partitions. Encrypt C: and the (empty) D: drive.
Then copy the data back from the external media. (Encryption is then done on the fly which only adds 2-3% to the copy time.)

If your nitpicking: I don't backup C: at all.
But that is fine as the PC's in question are in a software distribution system which makes a re-install if needed painless. All user-data is on D:, C: is just OS + applications.
(The bits that do matter on C:, like user-specific application settings, are backup-ed on a daily basis anyway through other means.)

Tonny
  • 6,332
  • 1
  • 18
  • 31
  • Thanks. I do have a backup of the data, but all the backups are HFS+ externals and I want to get it mounted to a Linux NAS that makes mounting HFS directly a pain. I'm copying it over the network to the NAS then will format one of the backups to EXT4 and copy it off the NAS to the external. – jb510 Jul 08 '13 at 01:06
  • That seems the best approach if you have the free space internally on the NAS. – Tonny Jul 08 '13 at 09:46
0
  • How big is the drive?
  • How much data do you have on the drive?
  • What is the host operating system you're using? (Mac? Linux?)

You won't be able to convert in-place, but you may have potential for partition resizing if the consumed data is far less than the total drive size. But your safest option is probably to copy to a new drive so you have a fallback.

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • Thanks, but size isn't relevant. Host operating system though can be anything (Linux, OS X and Win are all available to me). Thinking it's not possible in place which is OK. – jb510 Jul 08 '13 at 01:04
  • 1
    @jb510 Don't snark. Size *is* relevant. Specifically if you wanted to resize the existing HFS+ partition, create a new EXT4 partition and copy data to another region of the disk. Knowing the operating systems involved just helps US narrow-down the toolset available to you. – ewwhite Jul 08 '13 at 01:26
  • 1
    I've always been told that size don't matter!! – pauska Jul 08 '13 at 01:30
  • Didn't mean to snark. Sorry about that. I just meant I'm asking in general. I actually have a couple external HFS+ drives I want to be able to plug into my NAS some big, some small, some full, some less full. – jb510 Jul 08 '13 at 04:20