Re: Post install partitioning
On Thu, 2002-07-18 at 16:00, alex wrote:
> A real beginner's question here:
>
> Let's say your Debian is installed and has been used for some time on a
> single large partition. Is it possible or practical to create new
> partitions and format them for system files and move their data to these
> partitions? Would paths be disrupted and could they be fixed?
Assuming you have spare disk space, there is no problem at all.
Suppose you want to create a new partition for /var:
Boot into single-user mode - this is because with /var you will be
deleting stuff that is currently in use in a multi-user
environment. It isn't necessary if you're moving /home or the like.
# cfdisk /dev/hdc # partition new hard disk
# mke2fs /dev/hdc1 # Make a file system on new partition
# mount /dev/hdc1 /mnt # mount it on /mnt
# cd /var # don't forget this or the next commands
# will destroy everything
# cp -a . /mnt # copy the filetree to the new filesystem
# rm -rf . # delete it from the old filesystem
# umount /mnt # remove the new partition from /mnt
# mount /dev/hdc1 /var # and put it in its new position
Edit /etc/fstab to insert the line for mounting /var automatically.
Go to multi-user mode again.
All paths in /var will be unchanged and no action is required. The
entry in /etc/fstab will ensure that /var is mounted when the system
comes up and everything will be as it was before, but with more space.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"For God so loved the world, that he gave his only
begotten Son, that whosoever believeth in him should
not perish, but have everlasting life." John 3:16
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: