[plug] File system question

Brian Tombleson brian at paradigmit.com.au
Tue Jan 22 12:51:27 WST 2002


From: "Denis Brown" <dsbrown at cyllene.uwa.edu.au>

> A two-disk system with several partitions on each disk.
> On /dev/hdb2 I set up a Linux ext2 partition /FOO
> On /dev/hda1 I have a directory foo under /
> I decide to use the (larger) /FOO partition and so want to copy all files
> in /foo to /FOO and remove the original /foo directory.  I can do the copy
> using cp with the --recursive option to copy directories under /foo.  So
> far so good.

Errr.. except ownership of the files.  The new files will all be owned by
the user who did the cp(1).  tar(1) might be a better option.

> Now I edit (as root) fstab to mount /foo on /dev/hdb2, reboot and all
seems
> okay.

> My question is this:-
> The space taken up by the files originally present in the /foo directory
on
> hda1 are presumably "still there" but I cannot delete them because doing a
> rm * in foo now refers to my "new" foo which is on hdb2.  If the foregoing
> makes sense, is the space originally taken by foo's files on hda1 now
> automatically available for reuse or do I have to perform an additional
> operation to unlink the now redundant file space?



More information about the plug mailing list