Re: Moving Home Directory
On 10 Nov 2007 19:44:29 GMT, Moog wrote:
[color=blue]
> $ cp -vax /home /mnt/tempdisk
>
> WARNING: I did this, and for some bizarre reason, (I can't quite
> fathom it) there was an extra folder created. (Can anyone tell why
> from the above commands[/color]
You asked to copy the /home directory and it's contents.
[color=blue]
> and amend please?)[/color]
cp -vax /home/* /mnt/tempdisk <==== just home contents, please :)
Re: Moving Home Directory
Bit Twister illuminated alt.os.linux.ubuntu by typing:[color=blue]
> On 10 Nov 2007 19:44:29 GMT, Moog wrote:
>[color=green]
>> $ cp -vax /home /mnt/tempdisk
>>
>> WARNING: I did this, and for some bizarre reason, (I can't quite
>> fathom it) there was an extra folder created. (Can anyone tell why
>> from the above commands[/color]
>
> You asked to copy the /home directory and it's contents.
>[color=green]
>> and amend please?)[/color]
>
> cp -vax /home/* /mnt/tempdisk <==== just home contents, please :)[/color]
D'oh.
Thanks for pointing that out BT. Much appreciated.
--
Moog
"Some mornings it just doesn't seem worth it to gnaw through the
leather straps."
Re: Moving Home Directory
On Sat, 10 Nov 2007 19:44:29 +0000, someone purporting to be Moog scrawled
firmly:
[color=blue]
>
> WARNING: I did this, and for some bizarre reason, (I can't quite
> fathom it) there was an extra folder created. (Can anyone tell why
> from the above commands and amend please?)
>
> My username's home folder appeared as
> /home/home/moog
>
> Easily solved, though i could be talking straight out of my arse here...[/color]
The reason being because /home is supposed to be mounted on /
What you have done effectively is mounted /home - the directory you copied
on to the new drive - in /home, hence your /home/home problem.
I guess there's more than one way around this but i think the easiest way
would be to not copy /home to the new drive, but the user name(s) therein
cp -vax /home/{USER_NAME} /mnt/tempdisk
Hence when you mount it in /home you'll have the user-names and not the
directory /home you copied.
Make sense?
Also Im not sure why you dont just use 'cp -R' I guess you have your
reasons?
Hope that helps.. Great heads up for those that havent thought about these
things yet so good effort!
Re: Moving Home Directory
On Sat, 10 Nov 2007 20:10:01 +0000, someone purporting to be Moog scrawled
firmly:
[color=blue][color=green]
>>
>> cp -vax /home/* /mnt/tempdisk <==== just home contents, please :)[/color]
>
> D'oh.
>[/color]
I was too slow! think Bit Twister said it a bit more succinctly.
Re: Moving Home Directory
On 10 Nov 2007 19:44:29 GMT
Moog <efcmoog@gmail.com> wrote:
[color=blue]
> Hi all...
>
> With all the recent talk of seperate home directories, I decided to
> take the plunge today to see what all the fuss was about.
>
> Crikey. My box is *quick* now. I'm estimating it is around 30% faster
> after I did it.[/color]
I'm in the process of doing this myself, been ongoing for quite some
time.
[color=blue]
> Any questions? Fire away.[/color]
I have a lot of downloaded files, many of them are ISOs of distros that
I like to keep JIC I want to check them out. When copying it takes a
long time (no surprises there) but during that time my machine is very
sluggish to the point of being almost unusable, e.g. no way playing
videos, they go like powerpoint slide shows.
Given that I can't speed the copying process up with some sort of 29th
century technology that someone brings back in a time machine, is it
possible to copy this stuff without slowing the whole system down?
--
If you can do ballet then you can do anything
except reach high things because you're dinky.
Kiera Best - Aged 6.
Re: Moving Home Directory
On Sat, 10 Nov 2007 20:51:17 +0000, Trevor Best wrote:
[color=blue]
> Given that I can't speed the copying process up with some sort of 29th
> century technology that someone brings back in a time machine, is it
> possible to copy this stuff without slowing the whole system down?[/color]
You might try lowering the priority.
nice -n 19 whatever_cmd_here with args if any
And if you realy want to dink around,
Read the last 4 lines of this reply, I'll wait. . . . . . . . . . . . . . . .
[url]http://rudd-o.com/archives/2007/10/02/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that/[/url]
--
The warranty and liability expired as you read this message.
If the above breaks your system, it's yours and you keep both pieces.
Practice safe computing. Backup the file before you change it.
Do a, man command_here or cat command_here, before using it.
Re: Moving Home Directory
Oddity illuminated alt.os.linux.ubuntu by typing:[color=blue]
> On Sat, 10 Nov 2007 19:44:29 +0000, someone purporting to be Moog scrawled
> firmly:
>[color=green]
>>
>> WARNING: I did this, and for some bizarre reason, (I can't quite
>> fathom it) there was an extra folder created. (Can anyone tell why
>> from the above commands and amend please?)
>>
>> My username's home folder appeared as
>> /home/home/moog
>>
>> Easily solved, though i could be talking straight out of my arse here...[/color]
>
> The reason being because /home is supposed to be mounted on /
>
> What you have done effectively is mounted /home - the directory you copied
> on to the new drive - in /home, hence your /home/home problem.
>
> I guess there's more than one way around this but i think the easiest way
> would be to not copy /home to the new drive, but the user name(s) therein
>
> cp -vax /home/{USER_NAME} /mnt/tempdisk
>
> Hence when you mount it in /home you'll have the user-names and not the
> directory /home you copied.[/color]
Thanks. That explains it perfectly.
[color=blue]
> Make sense?
>
> Also Im not sure why you dont just use 'cp -R' I guess you have your
> reasons?[/color]
Simple reason. I was nervous about file permissions. Using sudo, I
wasn't sure whether ownership would change (someone may be able to
explain this better)
Anyway....using
$ man cp
I cam to the conclusion that the following flages would make sure
everything would copy over correctly permissions included.
-v = verbose mode. I can see the copying progressing. This comforts
me.
-a = archive and is equivalent to dpR d- preserves any links. p-
preserves permissionsand timestamps. R- recursively copies all directories,
subdirectories and files
-x = "one file system"
Call me paranoid, but I wasn't sure a straight -R would work
correctly. Better safe than sorry?
[color=blue]
> Hope that helps.. Great heads up for those that havent thought about these
> things yet so good effort![/color]
Thank you.
--
Moog
"Some mornings it just doesn't seem worth it to gnaw through the
leather straps."
Re: Moving Home Directory
Oddity illuminated alt.os.linux.ubuntu by typing:[color=blue]
> On Sat, 10 Nov 2007 20:10:01 +0000, someone purporting to be Moog scrawled
> firmly:
>[color=green][color=darkred]
>>>
>>> cp -vax /home/* /mnt/tempdisk <==== just home contents, please :)[/color]
>>
>> D'oh.
>>[/color]
> I was too slow! think Bit Twister said it a bit more succinctly.[/color]
Although you description was easier to understand for the layman. IN
fact, I think it was superb. Thanks again.
--
Moog
"Some mornings it just doesn't seem worth it to gnaw through the
leather straps."
Re: Moving Home Directory
Trevor Best illuminated alt.os.linux.ubuntu by typing:[color=blue]
> On 10 Nov 2007 19:44:29 GMT
> Moog <efcmoog@gmail.com> wrote:
>[color=green]
>> Hi all...
>>
>> With all the recent talk of seperate home directories, I decided to
>> take the plunge today to see what all the fuss was about.
>>
>> Crikey. My box is *quick* now. I'm estimating it is around 30% faster
>> after I did it.[/color]
>
> I'm in the process of doing this myself, been ongoing for quite some
> time.[/color]
I really hope my experiences will help you Trevor.
[color=blue][color=green]
>> Any questions? Fire away.[/color]
>
> I have a lot of downloaded files, many of them are ISOs of distros that
> I like to keep JIC I want to check them out. When copying it takes a
> long time (no surprises there) but during that time my machine is very
> sluggish to the point of being almost unusable, e.g. no way playing
> videos, they go like powerpoint slide shows.
>
> Given that I can't speed the copying process up with some sort of 29th
> century technology that someone brings back in a time machine, is it
> possible to copy this stuff without slowing the whole system down?[/color]
Hmmmm. I think you've been given a "priority" answer.
However, I would strongly suggest not trying to run anything while
moving your home folder. Perhaps an "overnight copy"?
BTW. I forgot to add to the original post that once you are up and
running, you can safely remove /sda1/home/{username} (or whatever your
path is. However, it does act as a great fall back if you wish to
leave it there.
Alternatively, you can mv rather than cp.
HTH.
--
Moog
"Some mornings it just doesn't seem worth it to gnaw through the
leather straps."
Re: Moving Home Directory
On Sat, 10 Nov 2007 21:04:15 +0000, someone purporting to be Moog scrawled
firmly:
[color=blue]
> Oddity illuminated alt.os.linux.ubuntu by typing:[/color]
[color=blue][color=green]
>>
>> Also Im not sure why you dont just use 'cp -R' I guess you have your
>> reasons?[/color]
>
> Simple reason. I was nervous about file permissions. Using sudo, I
> wasn't sure whether ownership would change (someone may be able to
> explain this better)
>
> Anyway....using
> $ man cp
>
> I cam to the conclusion that the following flages would make sure
> everything would copy over correctly permissions included.
>
> -v = verbose mode. I can see the copying progressing. This comforts
> me.
>
> -a = archive and is equivalent to dpR d- preserves any links. p-
> preserves permissionsand timestamps. R- recursively copies all directories,
> subdirectories and files
>
> -x = "one file system"
>
> Call me paranoid, but I wasn't sure a straight -R would work
> correctly. Better safe than sorry?[/color]
Better safe than sorry indeed,
I do believe when done as a user, cp -R maintains permissions but not
timestamps so thats good to know - I use "last modified" all the time to
find out where ive been.
Thanks again
Re: Moving Home Directory
On 10 Nov 2007 21:04:15 GMT, Moog wrote:[color=blue]
>
> -a = archive and is equivalent to dpR d- preserves any links. p-
> preserves permissionsand timestamps. R- recursively copies all directories,
> subdirectories and files[/color]
Hehehe, I wonder about those time stamps.
I moved my install from one drive to another. I also use the process
to keep a hot backup of current install for when I want to play around
with something which I know could screw it up royaly.
Process/commands were
Format target directory to make it empty. [ faster than rm :) ]
cd /etc
cp fstab fstab_old
cp fstab fstab_new
Modify fstab_new to have / mounted at sda14
cd /boot/grub/
Modify menu.lst_new to boot new install by copying current install stanza,
change old and new labels and new partition values.
Boot a rescue cd
mkdir /old /new
mount -t auto /dev/sdb2 /old
mount -t auto /dev/sda14 /new
cd /old
cp -a . /new
cd /new/etc
cp fstab_new fstab
cd
umount /old /new
Remove cd and pick new install
Use GUI interface to Re-install grub's menu.lst location in MBR
When I ran "aide.check --init" to create a new
Advanced Intrusion Detection Environment baseline, aide
complained about ctime being in the future. :(
ctime was in the future becase HW clock was GMT and local time is Cenral USA.
Re: Moving Home Directory
Moog illuminated alt.os.linux.ubuntu by typing:
[color=blue]
> <...>
> BTW. I forgot to add to the original post that once you are up and
> running, you can safely remove /sda1/home/{username} (or whatever your
> path is. However, it does act as a great fall back if you wish to
> leave it there.
>
> Alternatively, you can mv rather than cp.[/color]
Sorry. Ignore the above. I am drunk...pleased with myself after doing
the /home move. (It's like moving house but quicker)
The stuff I wrote about mv rather than cp and removing /sda/yadda is
absolute guff.
I'm quite happy with my install now. I'm hoping BT or Oddity are
reading this......hence......
How can I remove my *old* /home folder to free up space on my system
disk?
I've been looking for it everywhere and cannot find it.
Bloody Vodka.
--
Moog
"Some mornings it just doesn't seem worth it to gnaw through the
leather straps."
Re: Moving Home Directory
Oddity illuminated alt.os.linux.ubuntu by typing:[color=blue]
> On Sat, 10 Nov 2007 21:04:15 +0000, someone purporting to be Moog scrawled
> firmly:
>[color=green]
>> Oddity illuminated alt.os.linux.ubuntu by typing:[/color]
>[color=green][color=darkred]
>>>
>>> Also Im not sure why you dont just use 'cp -R' I guess you have your
>>> reasons?[/color]
>>
>> Simple reason. I was nervous about file permissions. Using sudo, I
>> wasn't sure whether ownership would change (someone may be able to
>> explain this better)
>>
>> Anyway....using
>> $ man cp
>>
>> I cam to the conclusion that the following flages would make sure
>> everything would copy over correctly permissions included.
>>
>> -v = verbose mode. I can see the copying progressing. This comforts
>> me.
>>
>> -a = archive and is equivalent to dpR d- preserves any links. p-
>> preserves permissionsand timestamps. R- recursively copies all directories,
>> subdirectories and files
>>
>> -x = "one file system"
>>
>> Call me paranoid, but I wasn't sure a straight -R would work
>> correctly. Better safe than sorry?[/color]
>
> Better safe than sorry indeed,
>
> I do believe when done as a user, cp -R maintains permissions but not
> timestamps so thats good to know - I use "last modified" all the time to
> find out where ive been.
>
> Thanks again[/color]
No problem. Although check out BT's experience. It seems that -p may
rely on hardware clocks.
--
Moog
"Some mornings it just doesn't seem worth it to gnaw through the
leather straps."
Re: Moving Home Directory
Bit Twister illuminated alt.os.linux.ubuntu by typing:[color=blue]
> On 10 Nov 2007 21:04:15 GMT, Moog wrote:[color=green]
>>
>> -a = archive and is equivalent to dpR d- preserves any links. p-
>> preserves permissionsand timestamps. R- recursively copies all directories,
>> subdirectories and files[/color]
>
> Hehehe, I wonder about those time stamps.
> I moved my install from one drive to another. I also use the process
> to keep a hot backup of current install for when I want to play around
> with something which I know could screw it up royaly.
>
> Process/commands were
>
> Format target directory to make it empty. [ faster than rm :) ]
> cd /etc
> cp fstab fstab_old
> cp fstab fstab_new
> Modify fstab_new to have / mounted at sda14
>
> cd /boot/grub/
> Modify menu.lst_new to boot new install by copying current install stanza,
> change old and new labels and new partition values.
>
>
> Boot a rescue cd
> mkdir /old /new
> mount -t auto /dev/sdb2 /old
> mount -t auto /dev/sda14 /new
> cd /old
> cp -a . /new
> cd /new/etc
> cp fstab_new fstab
> cd
> umount /old /new
>
> Remove cd and pick new install
> Use GUI interface to Re-install grub's menu.lst location in MBR
>
> When I ran "aide.check --init" to create a new
> Advanced Intrusion Detection Environment baseline, aide
> complained about ctime being in the future. :(
>
> ctime was in the future becase HW clock was GMT and local time is Cenral USA.[/color]
Extremely intersting BT. So is there any way around this?
--
Moog
"Some mornings it just doesn't seem worth it to gnaw through the
leather straps."
Re: Moving Home Directory
On 10 Nov 2007 21:54:36 GMT, Moog wrote:
[color=blue]
> How can I remove my *old* /home folder to free up space on my system
> disk?
> I've been looking for it everywhere and cannot find it.[/color]
Hehehe, I'll guess it is hiding under /home.
If you try to umount /home it will fail with a busy message.
Try this.
sudo -i
whoami
cd /home
touch a_new_home <==== just a file name to indicate
where you are
exit <=== exits root sudo terminal
exit
Now you know there is a_new_home file in the new home directory.
Verify you know the partition number of the old home
Insert a rescue cd and reboot the sytem
mkdir /junk
mount -t auto /dev/old_home_partition /junk
cd /junk
ls
If there is not a_new_home file and you see original home users you
know where you are.
/bin/rm -r * aught to clean it out.
cd
umount /junk
shutdown -r
pop out cd
Re: Moving Home Directory
On 10 Nov 2007 22:01:30 GMT, Moog wrote:
[color=blue][color=green]
>> ctime was in the future becase HW clock was GMT and local time is Cenral USA.[/color]
>
> Extremely intersting BT. So is there any way around this?[/color]
Have not looked into it. Thought about setting clock to local time
next time.
I decided to wait 7 hours and then run the aide.check --init :-D
I did the move yesterday and as you can see the date displayed by this
ls /etc snippet shows original value.
drwxr-xr-x 2 root root 4096 2007-10-09 14:40 cron.hourly
drwxr-xr-x 2 root root 4096 2007-09-14 16:51 cron.monthly
-rw-r--r-- 1 root root 335 2007-09-14 16:51 crontab
drwxr-xr-x 2 root root 4096 2007-10-09 12:17 cron.weekly
drwxr-xr-x 2 root root 4096 2007-09-14 16:51 cron.yearly
Re: Moving Home Directory
On Sat, 10 Nov 2007 21:54:36 +0000, Moog wrote:
[color=blue]
> Moog illuminated alt.os.linux.ubuntu by typing:
>[color=green]
>> <...>
>> BTW. I forgot to add to the original post that once you are up and
>> running, you can safely remove /sda1/home/{username} (or whatever your
>> path is. However, it does act as a great fall back if you wish to leave
>> it there.
>>
>> Alternatively, you can mv rather than cp.[/color]
>
> Sorry. Ignore the above. I am drunk...pleased with myself after doing
> the /home move. (It's like moving house but quicker)
>
> The stuff I wrote about mv rather than cp and removing /sda/yadda is
> absolute guff.
>
> I'm quite happy with my install now. I'm hoping BT or Oddity are reading
> this......hence......
> How can I remove my *old* /home folder to free up space on my system
> disk?
> I've been looking for it everywhere and cannot find it.
>
> Bloody Vodka.[/color]
I assume that your original /home was not a separate partition, but
rather just a part of /, correct?
If so, you must unmount /home to see those original files, which are
still taking space.
Just boot into single user mode. Make sure /home is not mounted. Then
just delete everything under /home, of course leaving the /home directory
itself.
Now when you reboot normally, you will find the space freed on /, and
everything should work normally.
--
Joe - Registered Linux User #449481
joe at hits - buffalo dot com
"Hate is baggage, life is too short to go around pissed off all the
time..." - Danny, American History X
Re: Moving Home Directory
On Sat, 10 Nov 2007 20:59:09 GMT
Bit Twister <BitTwister@mouse-potato.com> wrote:
[color=blue]
> On Sat, 10 Nov 2007 20:51:17 +0000, Trevor Best wrote:
>[color=green]
> > Given that I can't speed the copying process up with some sort of 29th
> > century technology that someone brings back in a time machine, is it
> > possible to copy this stuff without slowing the whole system down?[/color]
>
> You might try lowering the priority.
>
> nice -n 19 whatever_cmd_here with args if any[/color]
I did try nice-ing it, didn't specify a number but since the process
uses very little CPU time I didn't expect a difference.
[color=blue]
> And if you realy want to dink around,
> Read the last 4 lines of this reply, I'll wait. . . . . . . . . . . . . . . .
>
> [url]http://rudd-o.com/archives/2007/10/02/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that/[/url][/color]
I've read a bit through this and it makes sense, describes my problem
to a tee. The fact that if I interrupt the copy then unmount the volume
from nautilus I get the "please wait while writing data" for several
minutes afterwards.
xosview shows this cache taking up everything, I thought with 1.5GB I
had quite a bit of RAM, things are bit more normal with swappiness set
to 1, e.g. I'm not actually waiting for the letters to appear on screen
as I type. It's still not great, but it's an improvement, thanks.
I still might not be able to watch a video whilst copying large files,
but I can still listen to the radio.
--
If you can do ballet then you can do anything
except reach high things because you're dinky.
Kiera Best - Aged 6.
Re: Moving Home Directory
On Sun, 11 Nov 2007 01:55:19 +0000, Trevor Best wrote:
[color=blue]
> On Sat, 10 Nov 2007 20:59:09 GMT
> Bit Twister <BitTwister@mouse-potato.com> wrote:
>[color=green]
>> On Sat, 10 Nov 2007 20:51:17 +0000, Trevor Best wrote:
>>[color=darkred]
>> > Given that I can't speed the copying process up with some sort of
>> > 29th century technology that someone brings back in a time machine,
>> > is it possible to copy this stuff without slowing the whole system
>> > down?[/color]
>>
>> You might try lowering the priority.
>>
>> nice -n 19 whatever_cmd_here with args if any[/color]
>
> I did try nice-ing it, didn't specify a number but since the process
> uses very little CPU time I didn't expect a difference.
>[color=green]
>> And if you realy want to dink around, Read the last 4 lines of this
>> reply, I'll wait. . . . . . . . . . . . . . . .
>>
>> [url]http://rudd-o.com/archives/2007/10/02/tales-from-responsivenessland-[/url][/color][/color]
why-linux-feels-slow-and-how-to-fix-that/[color=blue]
>
> I've read a bit through this and it makes sense, describes my problem to
> a tee. The fact that if I interrupt the copy then unmount the volume
> from nautilus I get the "please wait while writing data" for several
> minutes afterwards.
>
> xosview shows this cache taking up everything, I thought with 1.5GB I
> had quite a bit of RAM, things are bit more normal with swappiness set
> to 1, e.g. I'm not actually waiting for the letters to appear on screen
> as I type. It's still not great, but it's an improvement, thanks.
>
> I still might not be able to watch a video whilst copying large files,
> but I can still listen to the radio.[/color]
I've found that SATA disks suffer much more that other technologies for
this. When I am doing rar extracts from a network drive to my local,
everything is fine. I can watch a movie, or do whatever. If I am doing
the same thing, but the source and destination are both on the local SATA
drive, the process goes much faster, but the system is pretty much
unusable while it is going.
--
Joe - Registered Linux User #449481
joe at hits - buffalo dot com
"Hate is baggage, life is too short to go around pissed off all the
time..." - Danny, American History X