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.
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.
I have installed a new larger 40 gig drive in my system. I now wish to move /usr, which currently resides on its own drive and almost full, to the new 40 gig drive so it will be a directory under /.
I guess I wasn't clear. in my first post. :-( /usr is currently residing on hdb. It is of course mounted as /usr. Now that I have a larger hda I want all the data from hdb moved to a directory called /usr on hda. I do not want to create another partition on hda. I have already run parted and enlarged / to take up the whole drive.
I want to eliminate the mount point /usr on hdb and remove the drive.
I'm new to this thing called linux so please excuse me if my terminology isn't exactly on.
I am assuming that I need to copy the contents of /usr to a temp directory, umount /usr and rename the temp dir to /usr. Only thing is I can't umount /usr, probably because files are in use -- it figures.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Rep:
Quote:
Originally posted by billkris I am assuming that I need to copy the contents of /usr to a temp directory, umount /usr and rename the temp dir to /usr. Only thing is I can't umount /usr, probably because files are in use -- it figures.
Any help is appreciated.
Bill
You won't be able to do this while you're running at level 3 or 5. There are too many processes that fire up and have open files when you're running in multiuser mode to allow this. (Crimeny, lsof tells me that I have nearly 3000 resources in use under /usr!) You're going to have to take the system into single user mode to do this. Then the process that you described will work. Take a look at the info page for cpio, specifically the section on copying directory structures. You can practice the directory copy a few times (/usr -> /scratch) until you're comfortable with how it works. Then you can go to single user and do the real thing. Don't forget to tweak /etc/fstab after you're certain that /usr has been successfully copied, prevent any mounting of old partition back onto it's original mount point.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.