You are not logged in.
I have system on HDD, fstab configuration:
/dev/sda4 / ext4 defaults 0 1 #Arch instalation
/dev/sda5 swap swap defaults 0 0
/dev/sda2 /mnt/windows ntfs-3g users,uid=1000,gid=100,fmask=0113,dmask=0002 0 0 # just remain of Vista
/dev/sda6 /mnt/linux ext2 defaults 0 1 #left from old PCLinuxOS instalation
So - I would like to convert /dev/sda6 Ext2 to Ext4, and mount it as /home
I started like that:
su
umount /dev/sda6
................... but so how to convert Ext2 to Ext4?
Last edited by Zivs (2010-03-14 09:39:35)
Offline
mkfs.ext4 /dev/sda6
it will wipe the contents of that partition though so i'd backup first.
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
You can backup all your files, then format ext2 to ext4. I don't think there is a direct way to do this.
Offline
You can mount it as an ext3 file system, then migrate it to ext4. In theory it can be done without data loss, but if you can spare the time I think it's best to back up and format, so you'll get the best performance.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I think "tune2fs –O extents,dir_index,uninit_bg,has_journal /dev/<device>" followed by "fsck -fDC0 /dev/<device>" should do it in one step. B is right about initial performance, but eventually most files will be converted to extents and it'll be basically just like a fresh ext4 fs.
Also I doubt those commands are safe to run on a mounted filesystem, although "tune2fs -j /dev/<device>" will get you safely to ext3.
Offline
Done, I just wiped off sda6 with mkfs.ext4 /dev/sda6, after backuping some importand files.
So last thing - how to mount sda6 as /home ? I alreadey have one /home on sda4 ?
And thanks that moved me to Nowbe corner
Last edited by Zivs (2010-03-13 21:33:20)
Offline
Boot with a live cd, mount your / and your new home partition, copy everything from the existing /home dir to the the new home partition.
Offline
And I'm guessing you already know this (I hope), but just for someone else reading this in the future, you need to change the ext2 to ext4 under /dev/sda6 in fstab
Offline
I know. But I can not understand - what will happend with /dev/sda4 old /home? As I do not want risk - just ask you
-----------------------------------
Edit:
Ha, of couse there was a trick
So my way:
boot from live CD, rename /home to /home2 # just for backup
then boot in root, change fstab: mount /dev/sda6 to /home
umount and the again mount /dev/sda6 as /home
umount /dev/sda6
mount /dev/sda6
and copied user file form /home2 to /home , without changing permisions (!!!) (if you copy just with cp command, you can not access user directory, you can log in root only)
[# cp -ax * /home2/eriks /home
When everything after reboot - delete /home2
Last edited by Zivs (2010-03-14 09:51:51)
Offline