Unix Technical Forum

2nd hard disk setup

This is a discussion on 2nd hard disk setup within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi, I'm running 9.1 and I'd like to use 2 hard disks. On the first, there would be the ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 10:56 AM
G. Smith
 
Posts: n/a
Default 2nd hard disk setup

Hi, I'm running 9.1 and I'd like to use 2 hard disks. On the first, there
would be the system, and /home would be on the 2nd.
But I receive an error message.
/home is still on the 1st disk. Can anybody tell me how to move that
directory on hdb1?

My /etc/fstab:

none /proc proc defaults 0 0
/dev/hda1 / ext3 defaults 1 1
/dev/hda2 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,user 0 0
/dev/sr0 /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/sr1 /mnt/cdrw iso9660 noauto,user,ro 0 0
/dev/hdb1 /home ext3 defaults 1 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 10:56 AM
Two Ravens
 
Posts: n/a
Default Re: 2nd hard disk setup

G. Smith wrote:

> Hi, I'm running 9.1 and I'd like to use 2 hard disks. On the first,
> there would be the system, and /home would be on the 2nd.
> But I receive an error message.
> /home is still on the 1st disk. Can anybody tell me how to move that
> directory on hdb1?
>
> My /etc/fstab:
>
> none /proc proc defaults 0 0
> /dev/hda1 / ext3 defaults 1 1
> /dev/hda2 swap swap defaults 0 0
> /dev/fd0 /mnt/floppy auto noauto,user 0 0
> /dev/sr0 /mnt/cdrom iso9660 noauto,user,ro 0 0
> /dev/sr1 /mnt/cdrw iso9660 noauto,user,ro 0 0
> /dev/hdb1 /home ext3 defaults 1 2


Your /etc/fstab shows home on on /dev/hdb1, as you'e got root on /dev
hda1 your /etc/fstab must be right.
--
Two Ravens
"...hit the squirrel..."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 10:56 AM
Thomas Overgaard
 
Posts: n/a
Default Re: 2nd hard disk setup


G. Smith wrote :

> Hi, I'm running 9.1 and I'd like to use 2 hard disks. On the first, there
> would be the system, and /home would be on the 2nd.
> But I receive an error message.


What's the error message? In Linux error messages is quite often part of
the solution.
--
Thomas O.

This area is designed to become quite warm during normal operation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 10:56 AM
Scott Eberl
 
Posts: n/a
Default Re: 2nd hard disk setup

"G. Smith" <undisclosed@domain.com> wrote in message
news:c6bb3g$a7623$1@ID-204724.news.uni-berlin.de...
> Hi, I'm running 9.1 and I'd like to use 2 hard disks. On the first, there
> would be the system, and /home would be on the 2nd.
> But I receive an error message.
> /home is still on the 1st disk. Can anybody tell me how to move that
> directory on hdb1?
>
> My /etc/fstab:
>
> none /proc proc defaults 0 0
> /dev/hda1 / ext3 defaults 1 1
> /dev/hda2 swap swap defaults 0 0
> /dev/fd0 /mnt/floppy auto noauto,user 0 0
> /dev/sr0 /mnt/cdrom iso9660 noauto,user,ro 0 0
> /dev/sr1 /mnt/cdrw iso9660 noauto,user,ro 0 0
> /dev/hdb1 /home ext3 defaults 1 2


Well you would need to edit your /etc/fstab to mount your /home to another
drive.

/dev/hda2 /home ext3 defaults 1 1

that should do the trick.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 10:56 AM
JM
 
Posts: n/a
Default Re: 2nd hard disk setup

Scott Eberl wrote:

> "G. Smith" <undisclosed@domain.com> wrote in message
> news:c6bb3g$a7623$1@ID-204724.news.uni-berlin.de...
>> Hi, I'm running 9.1 and I'd like to use 2 hard disks. On the first, there
>> would be the system, and /home would be on the 2nd.
>> But I receive an error message.
>> /home is still on the 1st disk. Can anybody tell me how to move that
>> directory on hdb1?
>>
>> My /etc/fstab:
>>
>> none /proc proc defaults 0 0
>> /dev/hda1 / ext3 defaults 1 1
>> /dev/hda2 swap swap defaults 0 0
>> /dev/fd0 /mnt/floppy auto noauto,user 0 0
>> /dev/sr0 /mnt/cdrom iso9660 noauto,user,ro 0 0
>> /dev/sr1 /mnt/cdrw iso9660 noauto,user,ro 0 0
>> /dev/hdb1 /home ext3 defaults 1 2

>
> Well you would need to edit your /etc/fstab to mount your /home to another
> drive.
>
> /dev/hda2 /home ext3 defaults 1 1
>
> that should do the trick.



That's not going to work. His fstab shows that swap is on /dev/hda2. He
can not put his /home/partition and his swap on the same partition. His
fstab looks good.

I would do a fdisk /dev/hdb to see if you actually have an hdb1. Also chack
your dmesg. and see that you have an hdb and an hdb1. You might have put
hdb on the secondary IDE channel or you did not set up HDB to be a slave on
the primary channel.

JM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 10:57 AM
David
 
Posts: n/a
Default Re: 2nd hard disk setup

G. Smith wrote:
> Hi, I'm running 9.1 and I'd like to use 2 hard disks. On the first, there
> would be the system, and /home would be on the 2nd.
> But I receive an error message.
> /home is still on the 1st disk. Can anybody tell me how to move that
> directory on hdb1?
>
> My /etc/fstab:
>
> none /proc proc defaults 0 0
> /dev/hda1 / ext3 defaults 1 1
> /dev/hda2 swap swap defaults 0 0
> /dev/fd0 /mnt/floppy auto noauto,user 0 0
> /dev/sr0 /mnt/cdrom iso9660 noauto,user,ro 0 0
> /dev/sr1 /mnt/cdrw iso9660 noauto,user,ro 0 0
> /dev/hdb1 /home ext3 defaults 1 2


You need to copy the contents of /home to the new disk. Login as
root to do this.

mkdir /new
mount /dev/hdb1 /new # use correct device.

cp -a /home/* /new
# DO NOT copy /home since you will still have a /home directory
for a mount point to the new disk you only want the files and
directories copied to the new disk/partition.

umount /new
mv /home /home-old # save files until your sure things
# are working properly.

mkdir /home # make new mount point for /home

Now if you have your /etc/fstab configured for the right device
/home should reside on the new disk but you will have to either
reboot or remount /home before the changes will take affect.

When done and everything is working you can delete the /new and
/home-old directories to free up disk space.

--
Confucius: He who play in root, eventually kill tree.
Registered with The Linux Counter. http://counter.li.org/
Slackware 9.1.0 Kernel 2.4.26 SMP i686 (GCC) 3.3.3
Uptime: 6 days, 14:01, 3 users, load average: 0.28, 0.17, 0.18
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-19-2008, 10:58 AM
Mike
 
Posts: n/a
Default Re: 2nd hard disk setup

On 2004-04-23, Scott Eberl <scott@airea420.com> wrote:
> "G. Smith" <undisclosed@domain.com> wrote in message
> news:c6bb3g$a7623$1@ID-204724.news.uni-berlin.de...
>> Hi, I'm running 9.1 and I'd like to use 2 hard disks. On the first, there
>> would be the system, and /home would be on the 2nd.
>> But I receive an error message.
>> /home is still on the 1st disk. Can anybody tell me how to move that
>> directory on hdb1?
>>

Have no problems with the following setup
mkdir /userdir
mount -t ext3 /dev/hdb1 /userdir
cp -dpR /home /userdir
mv /home /home.bak
ln -s /userdir/home /home
Remove /home.bak if everything is OK.
Did the same for /usr/local and /opt

--
++++++++++++++++++++++++++++++++
Mike Slack 9.1
email: micr at zeelandnet dot nl
++++++++++++++++++++++++++++++++
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:34 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com