Saturday, May 28, 2011

Convert a partition

Convert ext2 -> ext3
Suppose you want to convert your /tmp partition into ext3 then follow the following step:-
1. # init 1(Single user mode)
2. un-mount your partition which you like to convert
# umount /tmp
or
# mount -o remount,rw /tmp
3. command to convert
# tune2fs -j /dev/sda6 (Here /dev/sda6 represent /tmp partition.you must check using fdisk -l command)
This command add .journal file into /tmp partition.
4.Open /etc/fstab file change partition type of /tmp into ext3.
5.Now check file system type using following command:-
# file -s /dev/sda9
6.# init 6(Restart)

Convert from ext 3 -> ext2
Suppose you want to convert your /tmp partition into ext2 then follow the following step:-

1.# init 1(single user mode)
2. un-mount your partition which you like to convert
# umount /tmp
or
# mount -o remount,ro /tmp(better choice)
3. command to convert
# tune2fs -O^has_journal /dev/sda9 (Here /dev/sda9 represent /tmp partition)
4.# e2fsck /dev/sda9
5.# rm -f /tmp/.journal (Removing .journal file)
6.Open /etc/fstab file change partition type of /tmp into ext2.
7.Check partition type of /dev/sda9 using following command:-
# file -s /dev/sda9
8.# init 6(Restart)

1 comment:

  1. Printer Technical Support Number
    http://www.printersupportnumbers.com/
    Printersupportnumbers.com is an independent tech support service provider of printer problems for all the third party products mentioned on the website. We are not affiliated with any third party company. Use of third party trademarks, brand names, products & services mention on website is for customer reference only

    ReplyDelete