LeRoy Cressy on 31 Aug 2004 18:29:02 -0000


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

Re: [PLUG] Adding a new HD


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Art Alexion wrote:
| I am adding a new (additional) hard drive.  My current HD has a simple
| ext3 partitioning: (/, /boot, & /swap).  I want to move /home to the new
| drive as well as installing a new distro.
|
| Can I just do a
|
|    mkdir /newhome
|
| on the new HD, and then
|
|    mv /home /newhome
|    mv /newhome/home /home
|
| That doesn't seem right.
|
| Or is there something I should be doing with dd?

First you need to use a disk partitioning tool like fdisk or cfdisk to
partition the new drive.  Depending on the size of the drive should
determine how you partition the drive.  If this is a new drive like 80GB
I don't think you want a home partition of that size unless you really
require a home partition that big.  You could partion the drive into 4
20 gig chunks and use accordingly.  The choice is totally up to you.

I personally like to have the following partitions:
/		100M
/boot		120M
/usr		4G
/usr/local	2G
/var		This depends on what will be stored on /var
	/var/www	Website
	/var/lib/?	Database Storage

/home		Depends on the number of users

swap		120M is usually good.

/ /boot /usr /usr/local sizes are basically fixed on what you install on
them.  On the other hand /home could be spread across several partitions
like /home/a /home/b /home/c or whatever other scheme you want to use.
/var also could be divided up into several partitions if you are using a
database like postgres which stores the data in /var/lib/postgres/data/
You could make this as a separate partition.

Anyway, after you decide the partitions along with the sizes you require
run your disk partitioning software and partition the new drive.

After the new drive is partitioned, then you need to create a filesystem
for each partition.

I like the ext3 journal partition

mke2fs -c -b 1024 -i 1024 -m 1 -j /dev/hdb1
	-c	Checks for bad blocks.  There are some that don't think
		this is necessary for a new drive, but I do it anyway
	-b	block size 1024 being the smallest.  For home
		directories I think this is a good size.
	-i	inode size in most cases should be the same as -b
	-m	the percentage reserved for the lost and found directory
	-j	create a journal

You have to do this for every partition that you created.
Let's say that you decided that /dev/hda1 will be the new home directory
first you should mount it like:

mount /dev/hda1 /mnt
# copy everything from /home to the new partition
cp -a /home/* /mnt/

Next edit /etc/fstab to automatically mount your new home paretition:

/dev/hdb1    /home    ext3    defaults                  0       0

The above line instructs linux to mount /dev/hdb1 as /home on bootup

I hope that this answers any questions that you have.

|
| Or should I install the new distro to the new HD and then just move the
| existing /home files to /home on the new distro?  I am assuming no major
| conflict in sharing home among the two distros as long as it is in its
| own partition.
|
| I feel like I am missing something critical.
|


- -- Rev. LeRoy D. Cressy mailto:leroy@lrcressy.com /\_/\ ~ http://lrcressy.com ( o.o ) ~ Phone: 215-535-4037 > ^ < ~ FAX: 215-535-4285

gpg fingerprint:  62DE 6CAB CEE1 B1B3 359A  81D8 3FEF E6DA 8501 AFEA

For info on enigmail:    http://lrcressy.com/linux/mozilla.pdf
For info on gpg:         http://www.gnupg.org/

Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me. (John 14:6)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFBNMMYP+/m2oUBr+oRAirRAJ4wtC8FJUDSIaJ0AJGyjoom7y1f6ACeI5MQ
O+WpL+UqvQYAt86AfIuy5PQ=
=/qXb
-----END PGP SIGNATURE-----
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug