I'm running out of space on my /usr partition. What I would like to do is temporarily move /usr to the partition where / lives (I made / a bit too big, and /usr too little). Then resize the /usr partition.Then mount /usr back to the /usr partition. i.e.
Currently: hda1 / hda6 /usr
Then:
hda1 /
(cfdisk shenanigans to increase size of hda6)
Then back to: hda1 / hda6 /usr
However, as /usr contains most my programs, I am unsure as to how to do it.
My plan is to boot into a rescue disk (or would single user mode and a normal boot work? if I unmount /usr), change /etc/fstab (to not mount the /usr partition), make a dir called /usr on the root partition, copy the contents of the /usr partition to the /usr on the root partition. Reboot to check, then back into the rescue disk, cfdisk to enlargen the partition formerly known as /usr, mke2fs to create the file system,copy /usr on the root partition to the new one, change the /etc/fstab to mount the new /usr, and reboot.
I'm a little concerned in case permissions change... but does that sound right? Am I missing anything?
TIA Ricardo
On Sun, 2 Jun 2002, Ricardo Campos wrote:
My plan is to boot into a rescue disk (or would single user mode and a normal boot work? if I unmount /usr), change /etc/fstab (to not mount the /usr partition), make a dir called /usr on the root partition, copy the contents of the /usr partition to the /usr on the root partition. Reboot to check, then back into the rescue disk, cfdisk to enlargen the partition formerly known as /usr, mke2fs to create the file system,copy /usr on the root partition to the new one, change the /etc/fstab to mount the new /usr, and reboot.
yeah that should work, you can even do it with cp but what you really want to do is read the hard-disk upgrade HOWTO, anyhow if you do it wrong you can always get your old /usr back as you will know if you have screwed up pretty quickly =)
I did this the other day but mine was a little more complex as I didn't have enough space between different disks... and i was changing filesystems etc..... Hard disk upgrade howto will help tho.
Adam