Hi,
I am trying to move my root partition to a hard disk with more space, but before I go and fluff things up, I wanted make sure I have the correct approach.
Currently
swap,
/,
/usr/local and
/home are all mounted on their own partitions, but
/ is now rather full and needs moving to a separate disk. I've installed a new disk and formatted as ext3 using fdisk and mkfs.ext3. This new disk I have mounted under
/new-disk to enable the copying of
/ to the new disk. Up to this point I have been following the instructions given in this Howto (
http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/).
Is there a reason not to use a
rsync -a --exclude=some-dir-to-exclude / /new-drive command, rather than
cp -a /bin /boot /other-dirs / /new-drive command?
I have come to understand that I don't want to copy
/proc as this is a virtual file system containing system data, which is populated at boot time. I also don't want to copy
/usr/local and
/home, all of which I can specify with the
--exclude= switch. Are there any other directories I shouldn't be copying? I am using Slackware 12.0 and the some of the dir aren't mentioned in the howto I am following, which I believe is quite old - but otherwise excellent to follow and explains the reasoning behind each stage.
/ currently contains the following dirs:
Code:
chris@dinosaur:~ $ ls -l /
total 92
drwxr-xr-x 2 root root 4096 2007-04-30 05:35 bin
drwxr-xr-x 2 root root 4096 2007-08-06 23:56 boot
drwxr-xr-x 21 root root 14120 2007-11-21 11:20 dev
drwxr-xr-x 63 root root 4096 2007-11-21 11:19 etc
drwxr-xr-x 5 root root 4096 2007-11-13 00:12 home
drwxr-xr-x 5 root root 4096 2007-07-31 19:31 lib
drwx------ 2 root root 16384 2007-07-30 23:04 lost+found
drwxr-xr-x 16 root root 4096 2007-11-21 11:20 media
drwxr-xr-x 11 root root 4096 2006-09-26 04:09 mnt
drwxr-xr-x 2 root root 4096 2007-11-21 11:03 new-disk
drwxr-xr-x 3 root root 4096 2007-08-08 16:06 opt
drwxr-xr-x 2 1016 users 4096 2007-07-16 06:32 pmount
dr-xr-xr-x 101 root root 0 2007-11-21 10:38 proc
drwxr-xr-x 22 root root 4096 2007-11-17 20:34 root
drwxr-xr-x 2 root root 4096 2007-07-19 18:36 sbin
drwxr-xr-x 2 root root 4096 2007-07-30 23:13 srv
drwxr-xr-x 12 root root 0 2007-11-21 10:38 sys
drwxrwxrwt 10 root root 16384 2007-11-21 10:56 tmp
drwxr-xr-x 17 root root 4096 2005-07-29 10:44 usr
drwxr-xr-x 16 root root 4096 2007-07-26 20:15 var
So directories I believe I definitely want to copy over are:
Code:
/bin
/boot
/dev
/etc
/lib
/lost+found
/media
/mnt
/opt
/root
/sbin
/tmp
/usr
/var
Directories I definitely wouldn't are:
Code:
/home
/new-disk
/proc
Directories I am unsure about are:
Is this the correct method and has anybody got any suggestions on the directories I am unsure about? I've had a quick read of
http://www.pathname.com/fhs/pub/fhs-2.3.html, and I'm guessing
/srv should be copied.
Anyway, any help/suggestions would be gratefully received.
Chris