Migrating from reiserfs to ext3

Nikola Lecic nlecic at EUnet.yu
Sat Aug 18 17:38:04 PDT 2007


Hello Konrad,

On Sat, 18 Aug 2007 05:51:19 -0300
"Konrad Scorciapino" <scorciapino at gmail.com> wrote:

> Hello!
> 
> I have a single 200GB HD that is divided in three partitions, one with
> FreeBSD, another with Linux and the other with my media. The first
> two are 10GB, and the latter, 180GB.
>
> The problem is that it is a ReiserFS partition, not writable from
> FreeBSD, so I'll have to change it to, say, ext3, if I'm going to be
> able to use xMule again. Since I can't backup the whole thing, I'll
> have to use another method to "convert" it.

Well, migration from ReiserFS to EXT3 is not really a question for
FreeBSD list. :) They are both native to Linux; ReiserFS is fully
implemented in Linux only.

You might consider using UFS2 instead of EXT3 -- but I'm not
sufficiently sure if write support in Linux is still marked as
"experimental" (it was some time ago).

> I'm using quotes because apparently there is no such utility that
> converts a given partition to another type. Why is that so? I was
> thinking about the hard links.

True, with a couple of not very interesting exceptions (it's possible
to convert EXT2 to EXT3 in place, and pure little window$ has a
built-in convertor from FAT32 to NTFS) -- as far as official
conversions are concerned; for unofficial, see below.

(Let someone corrects me if I'm mistaken, but it's not possible to
convert UFS to UFS2 in place.)

> Since the partition has some free space and its file hierarchy is
> quite simple (eg, mp3/baroque/bach/bwv82_1.mp3), wouldn't it work if
> I resize it to be full, using the freed space to create a new
> partition, and then, until the first one is empty, move content from
> it to the newly created, resizing both so that the first one is full
> again?

I think it's the best for you to do so. How much free space you have
there? You can shrink ReiserFS partition either from Linux or, maybe
easier, using GParted (http://gparted.sourceforge.net). Please note
that GParted surrently cannot resize Reiser4 partitions.

Or, if you are extremely brave, you can try

  http://freshmeat.net/projects/convertfs/

(I wouldn't do it.)

> Anybody ever tried something like that? Are there utilities that
> could help out, or dangers I need to avoid?

Every utility dealing with partition resizing will tell you to backup
your data first if you really need them. Since you can't do that, I'd
suggest reading ReiserFS manual and careful deciding what tool to use
for shrinking. But this is a Linux part of your job.

However, if you end up with one or two UFS2 partitions, then further
work with them will be a different story and you'll certainly get much
more answers. :)

Nikola Lečić


More information about the freebsd-questions mailing list