Jump to content

Tips&Tricks Migrating partitions to reiserfs


aru
 Share

Recommended Posts

 

arusabal

Moderator

Joined: 17 Apr 2002

Posts: 836

Location: Spain

 

Post Posted: Tue May 07, 2002 6:28 pm Post subject: Migrating partitions to reiserfs

_________________________________________________________________

 

 

Migrating to reiserfs (tiny howto)

 

This is just what I did some time ago when I migrated from ext2 to reiserfs, but it can be applied to any migration from one fs to another (except ext2 to ext3, which can be done in one step) Also this is my answer to a similar question in other thread, but since I feel that this info can be useful to some of you I've decide to put it here.

 

The advantages of using reiserfs over ext2/ext3 are obvious: Speed improvement, better usage of disk space (with saves than can vary from 10-40%), journaling, enhances of security, fs encryption available... Check the http://www.namesys.org page, the home page of the reiserfs project, for any info you might need.

 

Follow this steps at your own risk if you want to migrate a partition from ext2 to reiserfs. Be sure that you understand all those steps, what they do and what are its potential risks:

 

This is an example of migrating a partition (ie /usr, which could be /dev/hdb5 in your partition table) from ext2 to reiserfs:

 

1. Change to run level 1:

 

Code:

~]# init 1

 

2. Copy all the files of the /usr directory to somewhere where you've got enough space. You need to keep the structure and the attributes of the archives, so use the option -a:

 

Code:

~]# /bin/cp -a /usr /tmp/

Doing that you'll create a new dir: /tmp/usr which will hold all the /usr files.

 

3. Format the /dev/hdb5 partition (/usr) using mkreiserfs:

 

Code:

~]# /sbin/mkreiserfs /dev/hdb5

Now there is no way back Twisted Evil

 

4. Edit the /etc/fstab file to tell the mount system that now that partition is reiserfs and not ext2... This step is as easy as changing the word ext2 to reiserfs in the /dev/hdb5 line. Also you may want to change the 5th and 6th parameters to 0 0.

 

5. Now remount the brand new reiserfs partition:

 

Code:

~]# /bin/mount -a

Or just (/bin/mount /dev/hdb5)

 

6. And at the end restore the /usr data:

 

Code:

~]# /bin/cp -a /tmp/usr /

 

After all is not as difficult as one may think at first, right? Wink

 

Follow this steps if you want to migrate any of your partitions to reiserfs. BUT DON'T DO IT, if you try to migrate the root partition, that's very, very dangerous, and you MUST know what you are doing... so to avoid damage I won't tell you how to do it (just a clue... boot from the cdrom and be sure that all the needed commands are available from the CD)

 

Happy hacking

(use this info at your own risk)

 

 

 

ecol-58-e.png

http://comic.escomposlinux.org

(sorry I couldn't resist!)

 

 

 

Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).

 

Edited: the comic-image has been reposted and I've done some little editing ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...