You are not logged in.

#1 2008-04-20 15:25:16

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Advice on adding disk space

I've got Arch installed on a 100Gb drive. I have separate partitions as below:

/             7.6 Gb
/boot       0.4 Gb
/home   91.0 Gb
swap        1.0 Gb

Now I'm adding a new secondary drive that has 40Gb of free space, which I'd like to use for Arch.

I need to free up more space for / and /boot, as I'm always bumping against the limit on those two partitions.

There's a lot of stuff under /home that I could easily move to a secondary drive, but I'm not so sure about moving stuff from / or from /boot. I'm thinking I should have "mission critical" files on my primary hard drive.

Also, I'd prefer to judiciously shift stuff from / and from /boot rather than trying to "grow" either of these two partitions. I once had a bad experience once trying to resize a partition. Yes, I had backed up my data, but it was still a big hassle getting Humpty back together again.

Are there any directories under / that can safely be moved to a partition on a secondary drive?

Same question for /boot: can any of the directories under /boot be moved to a secondary drive.

Any suggestions would be very very helpful. Thanks.

Last edited by dhave (2008-04-20 15:33:44)


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#2 2008-04-20 16:07:56

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Advice on adding disk space

A slow but safe way is to use Gparted liveCD....just free up some space on your /home partition, fire up the Gparted LiveCD and:

1. Shrink /home
2. Enlarge  /boot
3. Shrink /boot
4. Enlarge /

Got it ? smile


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#3 2008-04-20 17:35:53

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Advice on adding disk space

moljac024 wrote:

A slow but safe way is to use Gparted liveCD....just free up some space on your /home partition, fire up the Gparted LiveCD and:

1. Shrink /home
2. Enlarge  /boot
3. Shrink /boot
4. Enlarge /

Got it ? smile

Well, my experience with resizing partitions using parted is about 80 percent positive. Twice, really, I've borked things in a big way when I was resizing partitions. Neither time was I resizing a mounted partition. I don't know what it is that went wrong -- doubtless something that I could have controlled -- but I don't want to take the risk. That's why I thought I'd just move some directories away from /, but I'm not sure what's safely moveable.

I'm thinking of just moving /usr entirely to the secondary disk, but then I'd be in a fix if something happened to that disk, or if I really needed that drive bay for something else.

Last edited by dhave (2008-04-20 19:36:28)


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#4 2008-04-20 17:45:27

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Advice on adding disk space

Here's a related question: if I want to copy /usr to the new partition, can I do so as I'm actually using my current installation of Arch? Or do I need to reboot with a live CD? I don't want some files to get left behind because they're in use.

Note that I'll be copying and not moving, at least in the first phase of this operation.

The procedure I'm planning to use is courtesy of Regor in this post, to wit:

1) mount the new filesystem somewhere out of the way. e.g. "mount /dev/hdXX /mnt/new"
2) copy over the contents of /usr there: "cp -a /usr/* /mnt/new"
3) create a directory under that filesystem for home to live in. e.g. "mkdir -pv /mnt/new/usr/local/home" (The example puts it in /usr/local so the system won't be tempted to mess with it)
4) copy contents of /home to the new directory: "cp -a /home/* /mnt/new/usr/local/home"
5) create new fstab entries for both filesystems. e.g.:
Code:
/dev/hdXX         /usr   ext3   defaults  0 1
/usr/local/home   /home  none   bind      0 0

6) reboot.
7) once it's determined that it all works right, boot some other media and delete the contents of the old /usr and /home to free up that space.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

Board footer

Powered by FluxBB