Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mounting volume to non-empty directory 1

Status
Not open for further replies.

fugtruck

MIS
Jul 1, 2009
62
0
0
US
I have my root filesystem on /dev/sda1. I want to mount another volume, sdb1, to the /usr directory. Once I do that, how would I go about deleting the contents from the /usr directory on sda1 other than booting the computer to a rescue disk (the computer is in a remote location and there is nobody to put a disk in for me)?
 
Backup or rsync exist /usr and rename /usr to /usr1.
Next mount /dev/sdb1 to /usr and restore all files
 
Try this:

mv /usr /usr_old
mkdir /usr
mount /dev/sdb1 /usr

Also, don't forget to edit your fstab file to reflect the changes.

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top