Re: moving directories to new partition
On Mon, 16 Dec 1996, Richard Morin wrote:
> I am in need of some advice about how to go about moving some of the
> directories off of my main partition and onto one I just made.
> /dev/hda4 is currently mounted /
> /dev/hda8 is currently mounted /tmpmount
> I'd like to be able to move /home, /root, /lib, /bin, and a couple
> others over to /dev/hda8
Let me first suggest caution, as I've made the classic oops with /lib
before. If you proceed with your plans, you risk being without /bin (if
the partition holding it won't mount) and having an unfixable system. Not
a good thing.
My normal approach is to create a new directory somewhere (if there won't
be too many I put it on /) and give it a representative name (/slashextend
in your case?). In that directory, I make the appropriate directories
(bin, home, lib, root) and migrate the files (using either tar cvf
somefile /bin; cd /slashextend; tar xvpf /path/to/somefile OR cp -p -r
/thisdir /thatdir). Once the migration is tested, then I rmdir the
original directory and place a symbolic link from /home to
I'd suggest that you consider putting more on your / partition (as opposed
to less as you propose) and then freeing up some space elsewhere.
I do some of the above on my box. I have a Linux "server" and a
triple-boot workstation (95, NTW, Linux). Unfortunately, I have an overly
new network card which isn't supported, so I don't have this fully working
yet. I have the following partitions on the server:
The usual: (hda and hdc are both Quantum 850, hdc2 is 120M swap)
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/hda1 19485 14050 4429 76% /
/dev/hdc4 288354 33 273428 0% /tmp
/dev/hda2 223494 144283 67670 68% /usr
/dev/hdc3 198123 8697 179195 5% /var
The not-so-usual (hdb is a 3.1G WD).
/dev/hda3 560060 13660 517471 3% /nfs
/dev/hdb1 2990073 914789 1920659 32% /server
/nfs contains /nfs/home, /nfs/usr/local, and /nfs/spool/mail. Once I get
the workstation up and networked, I can just mount /nfs via NFS into the
workstation, symlink /home, /usr/local, and /var/spool/mail, and I'll have
all of my appropriate files with only one NFS mount. I've got 560M to
play with between personally-built programs, home directories, and
incoming mail. The symlinks mentioned above are already in place on the
server, so the setup will be identical on server and workstation (except
for export out vs. mounted in).
/server contains /server/ftp, and /home/ftp is a symlink to /server/ftp.
I already provide a mirror of ftp.debian.org/debian/, and I might end up
providing a variety of other services in the future, so this way I can use
one big drive in a variety of ways without having to dump, repartition,
and restore. I used to mount the big drive on /nfs/home/ftp, but that
becomes very restrictive (I have to make other directories available by
ftp if I ever want to make new directories on that partition).
I tend to play a lot with performance tuning and disk usage, so holler if
you have questions. :)
Peter J. Templin, Jr. Client Services Analyst
Computer & Communication Services tel: (717) 524-1590
Bucknell University firstname.lastname@example.org
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com