FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 04-23-2008, 06:33 PM
Darryl Tidd
 
Default Home on separate drive

Hey guys, I'm having some trouble, hope you can help.
I have installed a second hard drive and I would like to move my /home
dir to it. I have read some tutorials, but I am having trouble
figuring it out.
This is the output of mount in terminal

/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.22-14-generic/volatile type tmpfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,noexec,nosuid,nodev)

none on /proc/fs/vmblock/mountPoint type vmblock (rw)
/dev/scd0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,user=dtidd)
//192.168.0.1/QOPENSYS on /media/remote type cifs (rw,mand)
/dev/sdb1 on /media/disk type ext3 (rw)


This is my fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=28107d44-f66e-4358-a2a3-a77be8002ce6 / ext3
defaults,errors=remount-ro 0 1

# /dev/sda5
UUID=58e5f69c-5a65-4b32-9798-ae0dbafd2f0d none swap
sw 0 0

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0


//server/share/media/remote cifs
credentials=/home/user/credentials 0 0

/dev/sdb1 /media/disk ext3 defaults 0 1

Where /dev/sdb1 is my second hard drive.

I understand that I need to mount /dev/sdb1 as /media/home for instance
and I need to copy my current /home to the new /home, I'm just having
trouble finding the method.


Thanks
Darryl Tidd
N5DLT

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-23-2008, 06:58 PM
Phil Sexton
 
Default Home on separate drive

Darryl Tidd wrote:
> Hey guys, I'm having some trouble, hope you can help.
> I have installed a second hard drive and I would like to move my /home
> dir to it. I have read some tutorials, but I am having trouble
> figuring it out. This is the output of mount in terminal
> /dev/sda1 on / type ext3 (rw,errors=remount-ro)
> proc on /proc type proc (rw,noexec,nosuid,nodev)
> /sys on /sys type sysfs (rw,noexec,nosuid,nodev)
> varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
> varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
> udev on /dev type tmpfs (rw,mode=0755)
> devshm on /dev/shm type tmpfs (rw)
> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
> lrm on /lib/modules/2.6.22-14-generic/volatile type tmpfs (rw)
> securityfs on /sys/kernel/security type securityfs (rw)
> binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
> (rw,noexec,nosuid,nodev)
> none on /proc/fs/vmblock/mountPoint type vmblock (rw)
> /dev/scd0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,user=dtidd)
> //192.168.0.1/QOPENSYS on /media/remote type cifs (rw,mand)
> /dev/sdb1 on /media/disk type ext3 (rw)
>
>
> This is my fstab
>
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> proc /proc proc defaults 0 0
> # /dev/sda1
> UUID=28107d44-f66e-4358-a2a3-a77be8002ce6 / ext3
> defaults,errors=remount-ro 0 1
> # /dev/sda5
> UUID=58e5f69c-5a65-4b32-9798-ae0dbafd2f0d none swap
> sw 0 0
> /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
>
>
> //server/share/media/remote cifs
> credentials=/home/user/credentials 0 0
> /dev/sdb1 /media/disk ext3 defaults 0 1
>
> Where /dev/sdb1 is my second hard drive.
>
> I understand that I need to mount /dev/sdb1 as /media/home for instance
> and I need to copy my current /home to the new /home, I'm just having
> trouble finding the method.
> Thanks
> Darryl Tidd
> N5DLT
>

I usually use tar and pipe it over, retaining permissions.

As root:
# cd <source directory
# tar cf - . | (cd <destination directory> && tar xBfp -)

--
Phil Sexton: http://www.myspace.com/philsexton
Praise Whistlers Abroad: http://praisewhistlers.org/
Naomi's Fancy: http://www.naomisfancy.net/
Naomi's Fancy myspace: http://www.myspace.com/naomisfancy/
The Old Bush: http://www.cdbaby.com/naomisfancy/
Crossing Borders: http://cdbaby.com/cd/naomisfancy2
Naomi's Fancy Free tunes:
http://www.naomisfancy.net/modules.php?name=Downloads

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-23-2008, 07:47 PM
NoOp
 
Default Home on separate drive

On 04/23/2008 11:33 AM, Darryl Tidd wrote:
> Hey guys, I'm having some trouble, hope you can help.
> I have installed a second hard drive and I would like to move my /home
> dir to it. I have read some tutorials, but I am having trouble
> figuring it out.
[snip]

Courtesy of Nils when I wanted to do the same:

> On 12/11/2007 11:09 PM, Nils Kassube wrote:
>> > NoOp wrote:
>>> >> Working on upgrading an very old system with a small hard drives. I did
>>> >> an upgrade from Feisty to Gusty. Prior to the upgrade the 1st (6Gb)
>>> >> drive had 2.2Gb free space on it. Afterwards it only has 1GB left (and
>>> >> that includes after removing fonts that I don't use, apt-get autoclean,
>>> >> apt-get autoremove, etc., etc.), so I added a second hard 7Gb hard
>>> >> drive.
>>> >>
>>> >> Second drive is in and working fine (ext3), now I'd like to move the
>>> >> Home directory to the 2nd hard drive so that I can free up space on the
>>> >> first drive. Any quick/easy command line suggestions on how to do this?
>> >
>> > Mount your second drive to the /mnt directory. Then use the command
>> >
>> > sudo cp -a /home/* /mnt
>> >
>> > Now you have a copy of everything in your /home directory on the second
>> > drive's root directory. Then edit (as root) /etc/fstab and add a line
>> >
>> > somedrivespec /home ext3 defaults 0 2
>
> somedrivespec /home ext3 defaults 0 0
> (/dev/sdb1 /home ext3 defaults 0 0)
> worked. 0 2 gave me dmrc & no media errors.
>
> Thanks! :-) Home now has 7.1G of user space and all is well again. :-)
>
>


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-23-2008, 09:36 PM
Nils Kassube
 
Default Home on separate drive

NoOp wrote:
> Courtesy of Nils when I wanted to do the same:

Oh, great - you still have that mail. I was about to write that stuff
again because I don't have it any more

> >> > somedrivespec /home ext3 defaults 0 2
> >
> > somedrivespec /home ext3 defaults 0 0
> > (/dev/sdb1 /home ext3 defaults 0 0)
> > worked. 0 2 gave me dmrc & no media errors.

That's interesting. According to the fstab man page it should be a 0 or 2
at the end. And for some of my disks the entry actually is 2 (probably I
had copied one of those entries for the original mail). Do you have a
special setup for that disk like LVM? Perhaps you can't fsck an LVM
volume?


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-23-2008, 10:09 PM
NoOp
 
Default Home on separate drive

On 04/23/2008 02:36 PM, Nils Kassube wrote:
> NoOp wrote:
>> Courtesy of Nils when I wanted to do the same:
>
> Oh, great - you still have that mail. I was about to write that stuff
> again because I don't have it any more

That's the advantage of using the gmane.org nntp server for the list :-)

>
>> >> > somedrivespec /home ext3 defaults 0 2
>> >
>> > somedrivespec /home ext3 defaults 0 0
>> > (/dev/sdb1 /home ext3 defaults 0 0)
>> > worked. 0 2 gave me dmrc & no media errors.
>
> That's interesting. According to the fstab man page it should be a 0 or 2
> at the end. And for some of my disks the entry actually is 2 (probably I
> had copied one of those entries for the original mail). Do you have a
> special setup for that disk like LVM? Perhaps you can't fsck an LVM
> volume?

Don't recall - I'd set up the computer for my mother-in-law's nurse. I
have to log into it later this week to check it anyway, so I can check then.

Gary


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-23-2008, 10:14 PM
Darryl Tidd
 
Default Home on separate drive

NoOp wrote:
> On 04/23/2008 11:33 AM, Darryl Tidd wrote:
> Courtesy of Nils when I wanted to do the same:
>
>
>> On 12/11/2007 11:09 PM, Nils Kassube wrote:
>>
>>>>
>> somedrivespec /home ext3 defaults 0 0
>> (/dev/sdb1 /home ext3 defaults 0 0)
>> worked. 0 2 gave me dmrc & no media errors.
>>
>> Thanks! :-) Home now has 7.1G of user space and all is well again. :-)
>>
>>
>>
Thanks, worked great, I have printed out one tutorial that is one page
and another that is two, But the short sweet
answer you gave me worked like a charm.
Darryl

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-23-2008, 11:02 PM
Rashkae
 
Default Home on separate drive

Darryl Tidd wrote:
> Hey guys, I'm having some trouble, hope you can help.
> I have installed a second hard drive and I would like to move my /home
> dir to it. I have read some tutorials, but I am having trouble
> figuring it out. This is the output of mount in terminal
> /dev/sda1 on / type ext3 (rw,errors=remount-ro)
> proc on /proc type proc (rw,noexec,nosuid,nodev)
> /sys on /sys type sysfs (rw,noexec,nosuid,nodev)
> varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
> varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
> udev on /dev type tmpfs (rw,mode=0755)
> devshm on /dev/shm type tmpfs (rw)
> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
> lrm on /lib/modules/2.6.22-14-generic/volatile type tmpfs (rw)
> securityfs on /sys/kernel/security type securityfs (rw)
> binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
> (rw,noexec,nosuid,nodev)
> none on /proc/fs/vmblock/mountPoint type vmblock (rw)
> /dev/scd0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,user=dtidd)
> //192.168.0.1/QOPENSYS on /media/remote type cifs (rw,mand)
> /dev/sdb1 on /media/disk type ext3 (rw)
>
>
> This is my fstab
>
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> proc /proc proc defaults 0 0
> # /dev/sda1
> UUID=28107d44-f66e-4358-a2a3-a77be8002ce6 / ext3
> defaults,errors=remount-ro 0 1
> # /dev/sda5
> UUID=58e5f69c-5a65-4b32-9798-ae0dbafd2f0d none swap
> sw 0 0
> /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
>
>
> //server/share/media/remote cifs
> credentials=/home/user/credentials 0 0
> /dev/sdb1 /media/disk ext3 defaults 0 1
>
> Where /dev/sdb1 is my second hard drive.
>
> I understand that I need to mount /dev/sdb1 as /media/home for instance
> and I need to copy my current /home to the new /home, I'm just having
> trouble finding the method.
> Thanks
> Darryl Tidd
> N5DLT
>

You already have the drive mounted.. now you just need to copy your
existing home to the new drive. (it's best if as many programs are
closed as possible while doing this)

sudo cp -ax /home/. /media/disk

After that is done, you need to find out what the uuid of the new home
partition is:

sudo vol_id /dev/sdb1


that should reveal a string of alpha-numeric characters which are your
new UUID. it's best to copy with mouse to avoid typing errors.

Next you need to edit your fstab file

gksudo gedit /etc/fstab

Delete the line that refers to /dev/sdb1

create a new line in your fstab for home:

UUID=28107d44-f66e-4358-a2a3-a77be8002ce6 /home ext3 defaults 0 1

Note: don't copy the UUID I used above, it's the UUID for your root file
system,, be sure to paste the UUID copied from vol_id instead.


It's a very good idea to use UUID on a modern system with multiple hard
drives instead of /dev/sd[whatever]. The order of drives in /dev can
change depending on how the system is booted.

Save your changes to fstab and reboot, you should be done.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-23-2008, 11:17 PM
NoOp
 
Default Home on separate drive

On 04/23/2008 03:14 PM, Darryl Tidd wrote:
> NoOp wrote:
>> On 04/23/2008 11:33 AM, Darryl Tidd wrote:
>> Courtesy of Nils when I wanted to do the same:
>>
>>
>>> On 12/11/2007 11:09 PM, Nils Kassube wrote:
>>>
>>>>>
>>> somedrivespec /home ext3 defaults 0 0
>>> (/dev/sdb1 /home ext3 defaults 0 0)
>>> worked. 0 2 gave me dmrc & no media errors.
>>>
>>> Thanks! :-) Home now has 7.1G of user space and all is well again. :-)
>>>
>>>
>>>
> Thanks, worked great, I have printed out one tutorial that is one page
> and another that is two, But the short sweet
> answer you gave me worked like a charm.
> Darryl
>

Thank Nils - he's the one that provided me with the solution :-)

BTW: out of curiosity, did you use
/home ext3 defaults 0 0
or
/home ext3 defaults 0 2



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-24-2008, 02:17 PM
Darryl Tidd
 
Default Home on separate drive

NoOp wrote:
> Thank Nils - he's the one that provided me with the solution :-)
>
> BTW: out of curiosity, did you use
> /home ext3 defaults 0 0
> or
> /home ext3 defaults 0 2
>
>
>
>
Thanks to Nils then for providing the answer to you and to you for
passing it along.
I used /home etc3 defaults 0 0
Darryl

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 02:05 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org