DebianThis forum is for the discussion of Debian 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.
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 am going to be buying a 100GB HD soon as my current one is starting to run out of space! Now what i would like to do is home the whole /home directory to hdb1.
I want to do this without effecting any of my settings and want to to happen as smooth as possible! Can anyone lend any insights as to how i may do this and having hdb1 to mount automatically..... im not too good with fstab file at the moment so any help would be much apreciated
This differs slightly depending on if your /home is now a separate partition, or included in /. Posting your fstab will get a better answer if this does not work, but basically you make your new partition in a temporary location (/mnt perhaps), copy the current /home to the new one (either use for example "cp -a /home /mnt/home", or something like "rsync -acvSx /home/ /mnt/home" or a variety of other commands -- someone probably has a good link for options), either modify your old fstab entry or add it in (if new) to read "/dev/hdb1 /home ext3 defaults 1 2" (assuming of course you use the ext3 filesystem). If you have a current /home partition, umount it and mount up the old and test it out. If /home is part of /, just mount it on top first for testing. Later assuming all goes right, you can umount the new /home and get rid of the of files.
Hey Thanks for your responce. I will try this in a few days once the HD arrivies. Just to note tho then /home is located on the same partition as / so both are on hda1
Sounds good. Just check and double check everything you are doing three times. Make and write down a plan. Proofread your command line carefully before hitting return. Moving a directory tree to a new location is simple, but can be disaster with a small mistake. The important thing is to maintain all ownership and permissions, maintaining proper links, and generally not crossing filesystem boundaries. If you use rsync, you may consider adding the -H option to preserve hard links if you have them. Don't forget to read the man pages and do not take any command for granted.
The simplist way of course to accomplish your task is:
However, I don't recommend this because if something does go wrong, you may be out of luck. If you have a way to backup /home to another location before any of this, that of course would not hurt at all :-)
Oh, and sorry for the disruption our imperial non-elected president has brought to your fair town.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.