Re: Help with Linux command

2005-01-01 Thread Steve Lamb
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.  :)

--
 Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
   PGP Key: 8B6E99C5   | main connection to the switchboard of souls.
---+-


signature.asc
Description: OpenPGP digital signature


Re: Help with Linux command

2005-01-01 Thread Alvin Oga


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
alvin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Help with Linux command

2005-01-01 Thread Steve Lamb
Alvin Oga wrote:
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
You're making a false asumption.  From the original message:
If I want to swap the mount point and all it's content between /usr
and /home.
Swap the mount point *and all it's content*.
The disk space I originally intended for /usr and /home needs to be swapped.
Dsk space already needs to be swapped.
- there is two possible answers...

   a) change the mount points only ... 
Changing mount points doesn't help.  As said in the original message the 
content needs to be moved as well.

- 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 )
No, we're not.  We're saying to swap the mount points *and* move the data 
as per his initial request.

- moving data is messy but is trivial 2 command lines if one has
the space for holding both at the same time
We know he has enough space.  He said one parition is 2Gb.  That means 
the data there (home) is under 2Gb presently and the data in the other 
partition is able to fit into it; also 2Gb.  Since the 2nd partition is 10Gb 
he can easily fit 4Gb into that to make the swap.  ;)

- 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
4Gb.
- simple swapping of mount point is trivial, if the data is
in the correct sized partitions
It isn't.
= swapping mount points is a complete solution
= as was previously posted
Except it leaves him with his usr on home and home on usr.  Even worse, 
as I pointed out, since usr houses a lot of essential programs one could have 
a really tough time recovering from that situation.

--
 Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
   PGP Key: 8B6E99C5   | main connection to the switchboard of souls.
---+-


signature.asc
Description: OpenPGP digital signature


Re: Help with Linux command

2005-01-01 Thread Alvin Oga

hi ya steve

On Sat, 1 Jan 2005, Steve Lamb wrote:

 Alvin Oga wrote:
  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
 
  You're making a false asumption.  From the original message:

yes and no .. depends on th point of view 
and just for clarification ...

 If I want to swap the mount point and all it's content between /usr
 and /home.

both mount points and data is moved ...

mount /dev/hdaxxx on /home
mount /dev/hdaxxx on /usr

but if one wants to take data on /dev/hdaxxx ( say 2GB ) and put that on
/dev/hdayyy ( say 10GB), than changing mount points will not help 

but, mounting /dev/ on /home or /foo-bar will move the data with it
except in one case its called(accessed differently) /home/tom or /foo-bar/tom
- data is moved for free 

c ya
alvin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Help with Linux command

2005-01-01 Thread Steve Lamb
Alvin Oga wrote:
yes and no .. depends on th point of view 
and just for clarification ...
No, no point of view.
If I want to swap the mount point and all it's content between /usr
and /home.

both mount points and data is moved ...
No data is moved.  You're presuming that he has them backwards and the 
data is on the correct physical volumes.

but if one wants to take data on /dev/hdaxxx ( say 2GB ) and put that on
/dev/hdayyy ( say 10GB), than changing mount points will not help 
Exactly!  That's what he said in the original message.  He realized he 
had mounted them incorrectly.  /usr was the 10Gb and /home was the 2Gb.  He 
wanted /home to be the 10Gb and /use the 2Gb.  Since they are *populated with 
data* he requested information not only on how to remount those partitions but 
how to *move the contents* as well.

but, mounting /dev/ on /home or /foo-bar will move the data with it
except in one case its called(accessed differently) /home/tom or /foo-bar/tom
	- data is moved for free 
Yes, we all get that.  It does not solve the problem that his /usr data 
is on a 10Gb partition, his /home data is on a 2Gb partition and the data 
needs to be swapped *and* remounted.

--
 Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
   PGP Key: 8B6E99C5   | main connection to the switchboard of souls.
---+-


signature.asc
Description: OpenPGP digital signature


Re: Help with Linux command

2004-12-31 Thread Alvin Oga


On Fri, 31 Dec 2004, Syed Huq wrote:

 I realized that I made a mistake in the partition size between the two
 and I would like to swapthem. The disk space I originally intended
 for /usr and /home needs to be swapped.

just edit /etc/fstab and swap it in there ( 2nd column )

(as root)
umount /home
umount /usr
mount -av 

and you should be back in biz

or do it the super hard way and reboot, power off even

c ya
alvin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Help with Linux command

2004-12-31 Thread Olav
Op vr, 31-12-2004 te 17:47 -0800, schreef Alvin Oga:

 On Fri, 31 Dec 2004, Syed Huq wrote:
 
  I realized that I made a mistake in the partition size between the two
  and I would like to swapthem. The disk space I originally intended
  for /usr and /home needs to be swapped.
 
 just edit /etc/fstab and swap it in there ( 2nd column )
 
 (as root)
 umount /home
 umount /usr
 mount -av 
 
 and you should be back in biz

Right, but do not forget to move the data.

 or do it the super hard way and reboot, power off even
 
 c ya
 alvin



-- 
Met vriendelijke groet,
Olav.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Help with Linux command

2004-12-31 Thread Steve Lamb
Olav wrote:
Right, but do not forget to move the data.
Might also want to use a shell like sash.  Moving /usr is dicey since it 
is where lots of programs live.  ;)  Best to have the essentials compiled in 
in case something goes wonky.

--
 Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
   PGP Key: 8B6E99C5   | main connection to the switchboard of souls.
---+-


signature.asc
Description: OpenPGP digital signature


Re: Help with Linux command

2004-12-31 Thread Alvin Oga


On Fri, 31 Dec 2004, Steve Lamb wrote:

 Olav wrote:
  Right, but do not forget to move the data.
 
  Might also want to use a shell like sash.  Moving /usr is dicey since it 
 is where lots of programs live.  ;)  Best to have the essentials compiled in 
 in case something goes wonky.

if i understood correctly,  the original question was dealing with
partitions ...
mount /dev/hdaxxx /home
mount /dev/hdayyy /usr

.. vs ..
 
mount /dev/hdaxxx /usr
mount /dev/hdayyy /home


= to do the above, just change /etc/fstab

= now /home and /usr is swapped 
--= no copying of data is needed

== if one wants to move /home/data-stuff to the otehr partition,
   you need to make sure you have enough space for both /usr and /home
   at the same time ...

- if not ... put all that data someplace else 
( some place reliable )

( /usr and /home can be huge amts of data )

c ya
alvin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Help with Linux command

2004-12-31 Thread Kent West
Syed Huq wrote:
Hi,
If I want to swap the mount point and all it's content between /usr
and /home. What should I do ?
I realized that I made a mistake in the partition size between the two
and I would like to swapthem. The disk space I originally intended
for /usr and /home needs to be swapped.
Thanks,
Rathon
--
 

It's easiest if you have a third partition large enough to hold the 
smaller of your two /usr and /home partitions, although you can do it if 
you have enough free space for one of your partitions on the other, but 
it's messy.

It's very easy to mess up no matter how you do it. You'll want to boot 
into single-user mode (or better, boot off a LiveCD, such as Knoppix), 
copy/move the data, preserving permissions, unmount and remount with the 
new mount points, and edit /etc/fstab to reflect the new mount points.

I would boot off Knoppix, mount the /usr and /home partitions, along 
with a third empty partition, say /spare; then cp -a /home /spare, 
double-check that did what I wanted, then rm -rf /home; cp -a /usr 
/home, again double-checking that it did what I wanted (you don't want 
/home/usr; you want /home[the files/dirs in /usr]); then rm -rf 
/usr; and finally cp -a /spare /usr and rm -r /spare. Then fix the 
mount point settings in /etc/fstab, and reboot.

--
Kent
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]