Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
i'm running out of room on my hard disk, so i have installed a new hard disk to be mounted as /home/mike which is my home folder...
what i want to know is the easiest way of firstly copying the entire contents of my current home folder to the new disk? then altering fstab so that the system boots up pointing /dev/hdc1 to /home/mike so that it appears to the system as though nothing has changed, i.e. x works, etc...
sorry if this is really easy, i'm just worried about permissions etc...
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697
Rep:
To make it easier and quicker post contents of /etc/fstab.
Post output of ' /sbin/fdisk -l '. Must be done as root.
What partition on the second drive are you wanting mike to be on.
With the above I could write a step by step for you.
I am guessing you only wish to move your home directory mike to the new drive. I would move the entire /home directory.
Brian1 has asked you to post the right info, and perhaps gone to walk the dog. You probably want to get busy, so I hope it's not considered impolite to "jump in"...
What you need to do now (as root, logged in in a <CTL><ALT><F1> console, do NOT also be logged in to X as yourself, you only want one user, root, or your home partition will be active) is the following:
Make a new mountpoint for your new drive: mkdir /mnt/newhome
Mount your new drive there mount -t reiserfs /dev/hdc1 /mnt/newhome
Copy all your files over, complete with permissions etc. cd /home
tar cf - . | (cd /mnt/newhome && tar xBfp -)
Don't worry if you get messages like "xxxxx: Pipe: Ignored"
#unmount your new disk umount /dev/hdc1
Now edit your fstab so that the line
"/dev/hdb3 /home reiserfs defaults 0 0"
becomes
"/dev/hdc1 /home reiserfs defaults 0 0"
Reboot (is probably safest), or you could try Edit: cd / ; /Edit umount /dev/hdb3 ; mount -a df -h should give you a nice-looking output
Now all you have to do is decide what to do with the (redundant) old home partition (/dev/hdb3), and tidy up (rmdir /mnt/newhome)
Hope it all goes smoothly, if you foul-up, you should be able to login as root at a CTL><ALT><F1> console and repair things.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697
Rep:
Looks good to do as tredegar says. Makes these answer easier with the users info instead of providing examples.
For the fstab you can add the last line for /dev/hdc1. Then just rename the one for /dev/hdb3 /home to /dev/hdb3 /home_backup. Before it could mount you need to make the /home_backup directory. ' mkdir /home_backup '
Great post! I was just about to ask the same question and you saved me the trouble. My Debian server is host to all our family's pictures/movies and our iPod library. It's too big for the current disk space to back up and a new disk is on the way...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.