# how to extend the /usr partition



## coolatt (Mar 31, 2009)

hi all.

I have created a new partition (/dev/da0s2a) & moved /var there.
Now I want to extend the /usr partition by using the space from the old /var.

Please advise me how to do this.Thanks.


----------



## SirDice (Mar 31, 2009)

There are several ways to do it. You could move /usr/home or /usr/local there. Or if the partitions of /usr and the old /var are next to each other, back up /usr, remove those partitions, create a new /usr partition using the free space and restore the backup.

This would all need to be done in single user mode of course.


----------



## hedwards (Mar 31, 2009)

SirDice said:
			
		

> This would all need to be done in single user mode of course.


Depends, if he's just moving /usr/home over, then I wouldn't bother, just make sure that nothing's using the slice and move it. I generally do that and nothing bad happens. But one needs to be careful that it's not being used otherwise bad things happen. Chances are unless you're logged in via su that it's completely untouched.

It's probably not a bad practice anyways where possible. Just because it leaves you an easier path to backups and you don't really have to backup and restore each time you decide to reinstall.


----------

