new hard drive
Chris G
cl at isbd.net
Fri May 2 09:15:11 UTC 2008
On Fri, May 02, 2008 at 02:43:37AM -0400, scott wrote:
> I have a problem that I haven't encountered before on linux. My hard
> drive is almost full.
>
> I am wondering what I can do. Install a second drive and copy all my
> partitions, then remove the old drive and still have a bootable drive?
>
> Anyone know if this can be done? Sort of a hot swap scenario.
>
I'd recommend adding a second drive and moving *some* of the
partitions across to it. Or, if your installation has everything on
one parition, create a new partition on the new drive for /home for
example and then copy all your existing /home hierarchy to the new
drive, rename your old /home to /oldhome and then mount the new
partition as /home.
When you're happy it's all OK you can delete /oldhome.
You do need to analyse where all your space is being used up first to
decide which hierarchies it makes sense to move. It is very
convenient having /home on its own drive though.
To see where all the space is going:-
sudo du -xk --max-depth=1 /
This will tell you all about the root partition, if you have other
partitions you'll have to do the same but with the last parameter
changed, e.g. for home:-
sudo du -xk --max-depth=1 /home
(... and the --max-depth=1 *is* necessary so that you don't follow
mount points to other drives, *and* it doesn't ignore the space used
below depth 1)
--
Chris Green
More information about the ubuntu-users
mailing list