You are not logged in.
I would like to move my home folder to a new partition. What would be the easiest and least painful way to do this?
Last edited by Caspian (2008-11-14 15:24:13)
Offline
I'd use midnight commander to do this and have it retain permissions/ownerships so you don't end up with issues later.
You could also use something akin go gParted and clone your home partition over to a larger partition.
Offline
mount /dev/sdxx /mnt/newhome
cp -a /home/* /mnt/newhome
umount /mnt/newhome
rm -rf /home/*
mount /dev/sdxx /home
Might wanna tar up home first of course
Forgot to add also need to put the new home partition in the fstab, something like this.
/dev/sdxx /home ext3 defaults,noatime 0 1
Last edited by shazeal (2008-11-13 00:44:01)
Offline
rm -rf /home/*
This would be a disaster for me and perhaps some other people. Anyway, you don't need to delete anything until after you've checked that your copying went well.
noobus in perpetuus
Offline
Ok, as i presumed. Thanks guys.
Last edited by Caspian (2008-11-13 08:48:31)
Offline
tar cf - . | (cd /mnt/newhome/ ; tar xfp - )
Is the fastest way to copy from one filesystem to another.
Offline
tar cf - . | (cd /mnt/newhome/ ; tar xfp - )
Is the fastest way to copy from one filesystem to another.
I don't see how converting to tar and then extracting again on the fly can be faster then a regular copy... Waste of CPU cycles.
:?
Offline
Ok, that didn't go well
I did the following steps:
mount /dev/sda6 /mnt/hd
cp -a /home/* /mnt/hd
umount /mnt/hd
... and added the following entry to fstab
/dev/sda6 /home reiserfs defaults,noatime 0 1
After the reboot, i got the message that my users home folder is "/home/user", but that location doesn't apper to exist. I've done this procedure several times before and never had this kind of problem. What should i do?
Last edited by Caspian (2008-11-13 10:03:30)
Offline
fstab entry doesn't say where you want /dev/sda6 mounted. you want " /home " before " reiserfs "
Last edited by vacant (2008-11-13 09:56:00)
Offline
Oh sorry, that was i typo. Of course that the entry in fstab was:
/dev/sda6 /home reiserfs defaults,noatime 0 1
Offline
Is it actually mounted, just do 'mount' with no parameters. Kinda hard to see what is going wrong if you dont supply some output
Offline
fumbles wrote:tar cf - . | (cd /mnt/newhome/ ; tar xfp - )
Is the fastest way to copy from one filesystem to another.
I don't see how converting to tar and then extracting again on the fly can be faster then a regular copy... Waste of CPU cycles.
Its faster for network copies, not for disk to disk. Handy command though
Offline
RedShift wrote:fumbles wrote:tar cf - . | (cd /mnt/newhome/ ; tar xfp - )
Is the fastest way to copy from one filesystem to another.
I don't see how converting to tar and then extracting again on the fly can be faster then a regular copy... Waste of CPU cycles.
Its faster for network copies, not for disk to disk. Handy command though
Tar itself doesn't do any compression, and even makes the transferred data larger by the TAR & file headers! And even if you apply compression, CPU usage will be through the roof. You'll have to measure that if that actually gives you a speed advantage.
Last edited by RedShift (2008-11-13 10:42:06)
:?
Offline
The partition is mounted. I've checked that the moment i got the error output. I'm truly confused
Offline
The partition is mounted. I've checked that the moment i got the error output. I'm truly confused
Hard to say without seeing that error output?
/dev/sda6 /home reiserfs defaults,noatime 0 1
Doublecheck, you didn't mean
/dev/sda6 /home/caspian reiserfs defaults 0 1
Offline
tar cf - . | (cd /mnt/newhome/ ; tar xfp - )
Is the fastest way to copy from one filesystem to another.
Don't mind the speed, mind the peace of mind and easier correct results
E.g. tar handles links properly, whereas with cp you have to be careful that it won't "copy through" the contents of the link. I would never move data of system partitions with all kind of special files with cp.
Last edited by grep (2008-11-13 19:29:19)
Offline
No i meant:
/dev/sda6 /home reiserfs defaults,noatime 0 1
And i wrote in the earlier post that during gdm login the error was that /home/caspian doesn't seem to be a valid location.
Offline
Less say so and more output please.
ls -la /home
mount
tail /var/log/errors.log
cat /etc/fstab
Tar itself doesn't do any compression, and even makes the transferred data larger by the TAR & file headers! And even if you apply compression, CPU usage will be through the roof. You'll have to measure that if that actually gives you a speed advantage.
Quick google will tell you all you need to know
Offline
No need for that, the problem is solved. The filesystem was messed up on that particular partition. Once i recreated ext3 on it everything worked just fine. Thanks for all your help everyone...
Offline