Unix Technical Forum

convert a ext2 to reiserfs

This is a discussion on convert a ext2 to reiserfs within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> i currently wanna convert a ext2 partition to reiserfs. people said i can use reiserfstune, but after read its ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 08:15 AM
narke
 
Posts: n/a
Default convert a ext2 to reiserfs

i currently wanna convert a ext2 partition to reiserfs. people said i
can use reiserfstune, but after read its man page, i found no idea
about doing the job.

would anyone draw me a simple example?

-
narke

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 08:15 AM
Dudee Bastardo
 
Posts: n/a
Default Re: convert a ext2 to reiserfs

narke wrote:

> i currently wanna convert a ext2 partition to reiserfs. people said i
> can use reiserfstune, but after read its man page, i found no idea
> about doing the job.
>
> would anyone draw me a simple example?
>
> -
> narke


Hi,

As far as I know you cannot convert ext2 directly to reiserfs. While it is
very simple to go from ext2 to ext3 (it only adds journalling, with the
same fs structure), to change to reiser you have to create the new
filesystem with mkfs.reiserfs (which will ofcourse destroy all your data).

But maybe someone knows a trick
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 08:15 AM
Michael Trausch
 
Posts: n/a
Default Re: convert a ext2 to reiserfs

Dudee Bastardo wrote:
>
> Hi,
>
> As far as I know you cannot convert ext2 directly to reiserfs. While it is
> very simple to go from ext2 to ext3 (it only adds journalling, with the
> same fs structure), to change to reiser you have to create the new
> filesystem with mkfs.reiserfs (which will ofcourse destroy all your data).
>
> But maybe someone knows a trick
>


Do the following... I assume that /home is the mounted filesystem that
you want to convert. It would also make sense to convert /var or other
fairly dynamic filesystems, but not really a reason to make /usr or
/usr/local into something journalled, especially if performance matters
to you.

Login as root, and bring the system down to single user mode:

# telinit 1

Now, remount the target filesystem readonly, and tar it up.

# mount /home -o ro,remount
# tar lcvvf /tmp/homefs.tar /home

If that was successful, then compress it. I recommend bzip2 or if you
have it, a 7zip program:

# bzip2 --best /tmp/homefs.tar
# mv /tmp/homefs.tar.bz2 /tmp/homefs.tbz

This is a good way to perform backups for CD / DVD as well. I've even
got my filesystems set up such that I have full backups of /, /etc
(which is incremental from /), /home, /opt, /var, /usr, and /usr/local.
This way if something happens, I can just drop known good backups in.

- Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 08:15 AM
Michael Trausch
 
Posts: n/a
Default Re: convert a ext2 to reiserfs

Michael Trausch wrote:
>
> Do the following... I assume that /home is the mounted filesystem that
> you want to convert. It would also make sense to convert /var or other
> fairly dynamic filesystems, but not really a reason to make /usr or
> /usr/local into something journalled, especially if performance matters
> to you.
>
> Login as root, and bring the system down to single user mode:
>
> # telinit 1
>
> Now, remount the target filesystem readonly, and tar it up.
>
> # mount /home -o ro,remount
> # tar lcvvf /tmp/homefs.tar /home
>
> If that was successful, then compress it. I recommend bzip2 or if you
> have it, a 7zip program:
>
> # bzip2 --best /tmp/homefs.tar
> # mv /tmp/homefs.tar.bz2 /tmp/homefs.tbz
>
> This is a good way to perform backups for CD / DVD as well. I've even
> got my filesystems set up such that I have full backups of /, /etc
> (which is incremental from /), /home, /opt, /var, /usr, and /usr/local.
> This way if something happens, I can just drop known good backups in.
>
> - Mike
>


Oh, well, yeah, and then reformat the filesystem and extract the .tbz
like so:

# tar xpvvjf /tmp/homefs.tbz

While in the / directory.

I forgot that part... I'd just woken up, so. *shrugs*

- Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 08:16 AM
ray
 
Posts: n/a
Default Re: convert a ext2 to reiserfs

On Thu, 05 May 2005 00:50:36 -0700, narke wrote:

> i currently wanna convert a ext2 partition to reiserfs. people said i
> can use reiserfstune, but after read its man page, i found no idea
> about doing the job.
>
> would anyone draw me a simple example?
>
> -
> narke


Sure:

step 1. make a new reiserfs partition
step 2. copy all the files over
step 3. (optional) remove the old ext2 partition

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 08:16 AM
Grant Coady
 
Posts: n/a
Default Re: convert a ext2 to reiserfs

Hi Michael,
On Thu, 05 May 2005 09:41:20 -0400, Michael Trausch <fd0man+spam@gmail.com> wrote:

> It would also make sense to convert /var or other
>fairly dynamic filesystems, but not really a reason to make /usr or
>/usr/local into something journalled, especially if performance matters
>to you.

Does journalling have a high read overhead? /usr is mostly read access?

>This is a good way to perform backups for CD / DVD as well. I've even
>got my filesystems set up such that I have full backups of /, /etc
>(which is incremental from /), /home, /opt, /var, /usr, and /usr/local.
> This way if something happens, I can just drop known good backups in.


In general, I disagree with OS backup, reinstall OS is safer, what one
really needs is config and user data backup, which can be done with
tar statements, for example firewall box with web server:

backup:

deltree:~$ mount /home/public/
deltree:~$ tar cvzf /home/public/deltree/2005-05-06-config.tar.gz \
/boot/config-* /etc/ /usr/local/bin/ /usr/local/etc/
.. . .
deltree:~$ tar cvzf /home/public/deltree/2005-05-06-web.tar.gz /home/local/web/
.. . .
deltree:~$ umount /home/public/

/home/public is an NFS export from another box. If your data is
valuable, unpack tarball on other box to check it is valid backup,
too late if you have bad backup...

restore: very selective, I unpack tarball on other box and bring
over specific files or directories on an as needed basis.

Same goes for 'bare metal' reinstall, bring over wanted configs, leave
the rest. Why? If I'm doing a clean re-install, it is probably 'cos
I look at usage patterns and change drive layout, some configs stay as
standard, other I want from backup.

--Grant.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 08:17 AM
narke
 
Posts: n/a
Default Re: convert a ext2 to reiserfs


Michael Trausch wrote:
> Dudee Bastardo wrote:
> >

> Do the following... I assume that /home is the mounted filesystem

that
> you want to convert. It would also make sense to convert /var or

other
> fairly dynamic filesystems, but not really a reason to make /usr or
> /usr/local into something journalled, especially if performance

matters
> to you.


is there a general guide of which kind of file system one should be
used for which kind of contents? my /usr is a reiserfs at its first
time, i now wondering if or not i should convert it back to ext2.

-
narke

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 08:17 AM
No_One
 
Posts: n/a
Default Re: convert a ext2 to reiserfs

On 2005-05-06, narke <steven@lczmsoft.com> wrote:
>
> Michael Trausch wrote:
>> Dudee Bastardo wrote:
>> >

>> Do the following... I assume that /home is the mounted filesystem

> that
>> you want to convert. It would also make sense to convert /var or

> other
>> fairly dynamic filesystems, but not really a reason to make /usr or
>> /usr/local into something journalled, especially if performance

> matters
>> to you.

>
> is there a general guide of which kind of file system one should be
> used for which kind of contents? my /usr is a reiserfs at its first
> time, i now wondering if or not i should convert it back to ext2.
>
> -
> narke
>


Maybe this link will provide some help...

http://www.linux-mag.com/2002-10/jfs_01.html

ken
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 08:17 AM
narke
 
Posts: n/a
Default Re: convert a ext2 to reiserfs


> Maybe this link will provide some help...
>
> http://www.linux-mag.com/2002-10/jfs_01.html
>
> ken


thanks! it is a valuable reference for the subject.

-
narke

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-20-2008, 08:26 AM
Eef Hartman
 
Posts: n/a
Default Re: convert a ext2 to reiserfs

Michael Trausch <fd0man+spam@gmail.com> wrote:
> Now, remount the target filesystem readonly, and tar it up.
>
> # mount /home -o ro,remount
> # tar lcvvf /tmp/homefs.tar /home
>
> If that was successful, then compress it. I recommend bzip2 or if you
> have it, a 7zip program:


You can do the tar and bzip2 in one pass, by adding the "j" option to the
tar commandline (and changing the output file name for clarity, of course).

> # bzip2 --best /tmp/homefs.tar


Note that "--best" is the default behaviour, so doesn't really do anything:
The --fast and --best aliases are primarily for GNU gzip compatibility.
In particular, --fast doesn't make things significantly faster.
And --best merely selects the default behaviour.
(from the man page, a bit reformatted).
--
************************************************** ******************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:08 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com