Click to See Complete Forum and Search --> : Mounted additional partitions but...


Livermoron
02-01-2001, 01:17 AM
OK,

I was able to mount additional partitions on my HD but here is my problem.

I used the mount points /home and /var. I wanted to split these out as separate partitions.

I already had several usere set up in the home dir, and there is a bunch of stuff in the var dir also.

After mounting the additional partitons, the data has gone into hiding. Now when I view the contents of the directories, there is only an empty lost and found directory listed.

When I comment out the hda6 and hda7 mount commands in etc/fstab, they don't mount at startup and the data that is supposed to be in those directories is there.

What do I need to do to move the information in the existing home and var directories onto the new disk partitions so that when I mount them they contain my user accounts etc...?

Thanks in advance

iDxMan
02-01-2001, 01:28 AM
You could:

mount the new partitions under /mnt/home and /mnt/var
copy all the necessary data over.
Delete the old stuff from /home and /var
unmount from /mnt
then remount to the proper locations.

or
tar all the data you need in an archive
delete stuff
mount new partitions
restore stuff

---eg:
tar -zvcf /home_save.tar.gz /home
tar -zvcf /var_save.tar.gz /var

etc.
etc..


-r

demian
02-01-2001, 01:38 AM
[list=1]
unmount the newly created partitions
mount /dev/hda6 to /mnt
cd to /home (or /var depending on what will go to hda6)
do tar cSpf - . | (cd /mnt/ ; tar xvSpf - )
umount /mnt
mount hda7 to /mnt
the tar thing again
edit fstab
type mount -a
see if everything is there
unmount /var /home
delete old stuff in /var and /home (cd to the dirs and do rm -rf ./*)
mount -a
Done.
[/list=a]

Livermoron
02-01-2001, 10:00 AM
thanks for the help