Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I've just added a 2nd larger disk and would like to transfer /home to it.
I've tried this:
mkdir /mnt/newhome
mount -t ext3 /dev/sdb1 /mnt/newhome
cd /home
cp -ax * /mnt/newhome
unmount /mnt/newhome
up to now everthing is perfect.
mv /home /old_home
gives me:
mv: cannot move `/home' to `/old_home': Device or resource busy
I've tried doing:
init 3 and then repeating the move cmd but I get the same result, what am I doing wrong?
Geoff
Not 100% sure, but a couple things that could be causing it are that you could still be in the home directory (check your present working directory to make sure you're in /, not /home/...), or there could be a user logged in who's home is in /home (anybody but root). Try going down to runlevel 1, as runlevel 3 is normally the same as 5 but without a GUI, which could be causing interference. 1 is single-user, meaning only root can do anything.
As a final note, don't forget to edit your /etc/fstab file to auto-mount sdb1 as your /home. This line should work:
This might help.
This is my situation at the moment:
[root@localhost geoff]# df
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 15G 8,1G 5,8G 59% /
/dev/sda7 49G 16G 34G 32% /home
/dev/sdb1 199G 16G 176G 9% /mnt/newhome
If you boot from knoppix you can be pretty certain that home isn't being used or, worse, is changing under you. But I think that is not the problem. /home is likely to be a partition. Look in /etc/fstab to confirm or run "mount". If so, edit /etc/fstab so that /home points at the new partition instead. Maybe also make a directory /mnt/old_home and add a line to /etc/fstab to automatically mount that. Reboot for the new settings to take effect.
You could unmount /home whilst running on the system, but that might go horribly wrong. If you are logged in as root and no-one else is logged in you might be OK, otherwise I think this is just asking for trouble big time. Maybe not . Root's home is not (usually) in /home.
Before starting - Make a backup of /etc/fstab and have a working knoppix disk to hand in case you find yourself locked out!
Have fun, Entenbein.
p.s. try to keep a log of everything you do - copy it to a file (and keep saving the file) or write it down so that we can help you if anything goes wrong.
"edit /etc/fstab so that /home points at the new partition instead"
not sure how to do that, I can't call the new partition /home yet until I get rid of the old one.
I've checked on the new disk by mounting it as /newhome that my data is there.
Try logging into user and make sure that the shuffle worked. If it did you can delete the /home partition on the old drive and expand one of the other partition to regain the space.
Hi, I'm back with more pbs
To recover the space used by /home I deleted the old partition on sda.
I expected to be able to extend the / partion with gparted but no, for some reason when I booted the CD it could not find my screen (pbs with xorg?).
So, seeing as I had backed-up everything I re-installed Mandriva 2008 from my DVD. This obviously gives me back a /home on sda which I don't want.
Question:
how do I install Linux on sda without /home so that it will use the /home on sdb.
Geoff
During installation you should be prompted for the location to install the OS. I haven't used Mandriva, but other distros I have used offered the opportunity to select where to install /, /home, or any other directory to it's own partition.
So, during installation, elect to install / to sda and /home to sdb.
Last edited by bigrigdriver; 04-16-2008 at 03:57 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.