On Saturday 21 March 2009 20:05:42 Jarry wrote:
> Hi,
>
> I found out my /usr is getting full pretty fast, so I want
> to increase it before it happens a real problem. I have:
>
> /dev/md4 (sda5+sdb5), ~5GB size, used for /var, nearly empty
> /dev/md5 (sda6+sdb6), ~5GB size, used for /usr, nearly full (90%)
> And I have /backup on separate partition (hda1), big enough
>
> What I think of is this procedure: First I copy /var and /usr:
> cp -a /var /backup
> cp -a /usr /backup

Yes

> Then I intend to reboot with install-cd, repartition sda/sdb
> (make sda5/sdb5 smaller and sda6/sdb6 bigger), create new
> /dev/md4 and /dev/md5, mount them, and copy the content back.

Yes

> cp -a /mnt/gentoo/backup/var /mnt/gentoo/var
> cp -a /mnt/gentoo/backup/usr /mnt/gentoo/usr

Um, no. This gives you new usr and var directories like so:

/usr/usr/
/var/var

You want:

cp -a /mnt/gentoo/backup/var /mnt/gentoo/
cp -a /mnt/gentoo/backup/usr /mnt/gentoo/

> Is it a correct procedure? All partitions are ext3 type, no lvm2,
> moreover on /dev/md so I can not extend/shrink them while using...

It's correct, and it also highlights just what a PITA it is to manipulate 
traditional disk partitions. With lvm, this becomes a breeze. With ZFS (we 
might see it one day) this becomes invisible.


-- 
alan dot mckinnon at gmail dot com

Reply via email to