[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with Linux command

On Sat, 1 Jan 2005, Steve Lamb wrote:

> Alvin Oga wrote:
> > if i understood correctly,  the original question was dealing with
> > partitions ...
>      This is true.  But if he's already installed (which he has) those 
> partitions are populated.  Now, I'm not saying that the original poster is a 
> complete neophyte as to think the data would move with the fstab entry but 
> this list is archived and people do search it so an incomplete answer of 
> switching the partitions without also mentioning that the user needs to move 
> the data around as well might be a gotcha for someone else in the future. 
> Best to be clear that the data needs to be moved by the user as well as the 
> fstab entries being switched.  :)

given /home has the correct home data and is say  2GB on say /dev/hdaxxx
given /usr  has the correct usr  data and is say 10GB on say /dev/hdayyy

if as in the original reply, to simply "swap the /home and /usr partition"

- there is two possible answers...

   a) change the mount points only ... 
      ( for simple swap partitions ( as mount points ) where the data 
      ( is in the correctly sized partitions
		== it's a common problem for installing a new distro
		== into the wrong partition because one forgot which
		== one was assigned what size ??
		==	( double checking would have prevented it )

	with current: /etc/fstab
	/dev/hdaxxx	/home  ( has /home/X11R6, /home/bin, /home/sbin )
	/dev/hdayyy	/usr   ( has /usr/tom /usr/dick /usr/harry )

	New fstab with Swapped partitions ( mount points )
	/dev/hdaxxx	/usr   (is now /usr/X11R6 /usr/bin /usr/sbin )
	/dev/hdayyy	/home  (is now /home/tom /home/dick /home/harry )

	==> no copying of data is needed
	all of the same "home" data that was on  /dev/hdayyy is now still 
	as it was on /dev/hdayyy but is now called and accessed correctly
	as /home/tom instead of /usr/tom like it was before

- the other is like you guys are doing, leaving the mount points the
  same and moving the data from one partition to another is a lot more
  work ( that may or may not be needed, depending on the desired partition
  size for each /usr and /home )
	- moving data is messy but is trivial 2 command lines if one has
	the space for holding both at the same time

- trick question is ... 
	how much space is needed in /home vs /usr and is it
  	worth fixing by moving data from one partition into the other

	- simple swapping of mount point is trivial, if the data is
	in the correct sized partitions

	= swapping mount points is a complete solution
	= as was previously posted

c ya

Reply to: