View previous topic :: View next topic |
Author |
Message |
andy007 n00b
Joined: 11 Jan 2004 Posts: 35 Location: Shanghai, China
|
Posted: Mon Feb 02, 2004 6:40 am Post subject: question on converting ext2 to ext3 |
|
|
The following is an excerpt from an article. I wonder whether it will destroy data(especially an OS) stored on the right disk or not.
Code: |
Converting from Ext2 to Ext3
The conversion procedure is simple enough. Imagine /dev/hda10 mounted as /test ¨C the procedure would be as follows:
Log in as root
Make sure /etc/fstab has /dev/hda10 mounted to /test as ext2, read write
umount /dev/hda10
If you can't unmount it, then remount it read only (mount -o remount,rw /dev/hda10)
tune2fs -j /dev/hda10
Edit /etc/fstab, and for /dev/hda10, change ext2 to ext3
mount /dev/hda10
/sbin/shutdown -h now
mount | grep /dev/hda10
If it's not shown as ext3, reboot, if still not, troubleshoot
Otherwise, you're done.
A few explanations are in order. The tunefs command creates the journal file, which is kept in a special inode on the device (by default). You then must change the /etc/fstab entry to reflect it's a journalling filesystem, and then mount it.
|
|
|
Back to top |
|
|
Evil Dark Archon Guru
Joined: 21 Dec 2002 Posts: 562 Location: Santa Rosa, CA
|
Posted: Mon Feb 02, 2004 8:35 am Post subject: |
|
|
no it won't destroy data, that would only happen if you did mke2fs -j /dev/hda10, tune2fs can only modify an existing filesystem, it cannot destroy data. _________________ This post has been over explained for newb-informing purposes.
Registered Linux user 347334
Abit AV8-3rd eye, AMD Athlon64 3500+ 90nm, ATI Radeon x850 pro |
|
Back to top |
|
|
Jake Veteran
Joined: 31 Jul 2003 Posts: 1132
|
Posted: Mon Feb 02, 2004 8:35 am Post subject: |
|
|
All the command does, and all that needs to be done to upgrade from ext2 to ext3, is add a journal. There's no risk to your data. You can even mount the filesystem as ext2 after you've upgraded. It would just ignore the journal. |
|
Back to top |
|
|
andy007 n00b
Joined: 11 Jan 2004 Posts: 35 Location: Shanghai, China
|
Posted: Mon Feb 02, 2004 10:31 am Post subject: |
|
|
thanks for all your replies |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|