Koozali.org: home of the SME Server

Extra hdd question (yes, I did use search!)

Clint

Extra hdd question (yes, I did use search!)
« on: August 21, 2003, 12:25:05 PM »
Ok, so I installed e-smith 6 beta 3 on my server, and I'm trying to get the following configured:

hde mounted in place of /home/e-smith/files/ibays/isos/ (or whatever the path to the iso ibay is)
hdf mounted in place of /home/e-smith/files/ibays/mp3s/ (or whatever the path to the mp3 ibay is)

I would like both in ext3 format, and to automount to the system each time it boots.

Can anyone give me step-by-step (the *exact* commands to enter, etc.) instructions on how to do this?

Assume the drives are not partitioned/formatted, this is a fresh install, and I have not done anything to the fstab.

I did search and tried following the advice given in other threads, but ended up breaking something and the machine wouldn't boot all that correctly anymore (it gives a few errors and freezes half of the time).

Thank you so much.

Although I am learning, it is a slow process. I should have made a reinstall disc before trying something like this :D

Byte

Re: Extra hdd question (yes, I did use search!)
« Reply #1 on: August 21, 2003, 01:18:41 PM »
OK, so you have now installed or reinstalled SME! Next you want to format both hd's at command type

mkfs -t ext2 /dev/hde

then to convert to ext3 type again at command prompt

tune2fs -j /dev/hde

now do same for other drive.

Then edit the /etc/fstab file and add 2 more lines at bottom of last line...

/dev/hde                /home/e-smith/files/ibays/                  ext3    usrquota,grpquota   1 1

now type mount -a which will mount all drives with any luck your nearly there...

Next you want to create quota's on them so just above the root of your new hds run this command at the prompt...

quotacheck -avug

Should come back OK (will be back at command line if ok)

Now reboot and it should all be mounted when you next log in.

Hope this gives you some guide.

Cheers

Byte

Michiel Blotwijk

Re: Extra hdd question (yes, I did use search!)
« Reply #2 on: August 21, 2003, 02:27:55 PM »
Shouldn't we first partition the disk?
fdisk /dev/hde
and when prompted:
n
p
1
(accept the suggested first&last cylinders)
w

> OK, so you have now installed or reinstalled SME! Next you
> want to format both hd's at command type
>
> mkfs -t ext2 /dev/hde

mkfs -t ext2 /dev/hde1 (or whatever number you gave the partiton in fdisk)

>
> then to convert to ext3 type again at command prompt
>
> tune2fs -j /dev/hde

tune2fs -j /dev/hde1

> Then edit the /etc/fstab file and add 2 more lines at bottom
> of last line...
>
> /dev/hde              
> /home/e-smith/files/ibays/                  ext3  
> usrquota,grpquota   1 1

/dev/hde1      /home/e-smith/files/ibays/        ext3   usrquota,grpquota   1 1

> now type mount -a which will mount all drives with any luck

Didn't know that option. Works indeed :-)

> your nearly there...
>
> Next you want to create quota's on them so just above the
> root of your new hds run this command at the prompt...
>
> quotacheck -avug
>
> Should come back OK (will be back at command line if ok)
>
> Now reboot and it should all be mounted when you next log in.

I don't think rebooting is really needed here. That's more of a Microsoft-thing :-)

This question has come up several times, so maybe we should put it up on contribs.org as a how-to?

Michiel

Byte

Re: Extra hdd question (yes, I did use search!)
« Reply #3 on: August 21, 2003, 02:38:07 PM »
Oops assumed it would already been fdisked, thanks Michiel for pointing out.

How-to would be good for newbies, if i can help let me know been using SME (e-smith) since the very first time it came out (think we were there number 3 customer when we brought support from them along time ago.

Byte

Michiel Blotwijk

Re: Extra hdd question (yes, I did use search!)
« Reply #4 on: August 21, 2003, 05:11:08 PM »

Byte

Re: Extra hdd question (yes, I did use search!)
« Reply #5 on: August 21, 2003, 07:57:53 PM »
Might be good to add a SCSI table at top, I use SCSI :-)

 
 IDE controller   Device name
 Master 1          /dev/sda
 Slave 1            /dev/sdb
 Master 2         /dev/sdc
 Slave 2          /dev/sdd
 
Just my thoughts

Kind Regards

Byte

Byte

Re: Extra hdd question (yes, I did use search!)
« Reply #6 on: August 21, 2003, 08:01:12 PM »
oops, also step 5 should be...

quotacheck -avug /dev/hdc

and you might want to change step 4 the bit where you type df how about df -T that will show your drive even having EXT3 as well :-)

Just another few things that I thought might be useful

Byte

Clint

Re: Extra hdd question (yes, I did use search!)
« Reply #7 on: August 21, 2003, 10:09:19 PM »
Wow, wow, wow. Thanks so much guys! I never expected such a large responce from the comunity!

I still have to reinstall e-smith, but as soon as I get it finished (installing while I type), I will try all your suggestions :D

Thanks again!

Clint

Re: Extra hdd question (yes, I did use search!)
« Reply #8 on: August 21, 2003, 11:18:06 PM »
Ok, so I followed the instructions for both drives, and when I go to mount, I get the error: "wrong fs type, bad option, bad superblock on /dev/hde1, or too many mounted file systems"

Same for /dev/hdf1 :(

What am I doing wrong?

Again, thanks for the help.

Clint

Re: Extra hdd question (yes, I did use search!)
« Reply #9 on: August 21, 2003, 11:29:36 PM »
Oops, never mind. Figured it out, I was formating the hdds all screwy...

Works great, thanks guys!

Michiel Blotwijk

Re: Extra hdd question (yes, I did use search!)
« Reply #10 on: August 22, 2003, 12:00:15 AM »
Did fdisk, mkfs or tune2fs return any errors?

Try fdisk /dev/hde and hit p to get an overview of the partitions and their type.

BTW, how come you mount them to /dev/hde? Most motherboards I know of only have two IDE controllers, i.e. /dev/hda through /dev/hdd. Are you misusing the IDE controllers of some RAID-board? That might explain the "too many mounted file systems" message.

Michiel

Clint

Re: Extra hdd question (yes, I did use search!)
« Reply #11 on: August 22, 2003, 12:06:44 AM »
I formatted the hdds wrong, I formatted with ext3 the first command (which didn't work too well), and that is what was causing the errors.

I'm using a promise ata-133 drive controller that came with a hard drive I purchaced recently. It is just a device controller, and doesn't do RAID or anything special (bty, they make great ata-133 controllers under most any os, Maxtor is selling them with their 160+ drives). It uses hde, hdf, hdg, and hdh normaly (according to the website).

It doesn't pop up any errors now, and I'm testing to see if the full capasity is avalible by copying every Linux ISO I have to the ibays the drives are mounted in.

Thanks so much, I couldn't have done it without you guys.

Michiel Blotwijk

Re: Extra hdd question (yes, I did use search!)
« Reply #12 on: August 22, 2003, 12:06:50 AM »
Byte,

I incorporated your comments except for this one:

> quotacheck -avug /dev/hdc

That will check also the quota on /, resulting in the following error message:

[root@perkamentus root]# quotacheck -avug
quotacheck: Quota for users is enabled on mountpoint / so quotacheck might damage the file.
Please turn quotas off or use -f to force checking.

Michiel

Byte

Re: Extra hdd question (yes, I did use search!)
« Reply #13 on: August 22, 2003, 12:19:19 AM »
The way you done the quota check you are checking the root / HD you need to go into the directory you created ie

cd /home/e-smith/files/ibay/

now your in the folder which is the root of that path (hope you know what I mean)

then if you run that quotacheck -auvg command it will run corretly, if you dont then you are likey to have quota problems for that hd


Please let me know if you have any problems

Cheers

Byte

Tom Keiser

Re: Extra hdd question (yes, I did use search!)
« Reply #14 on: August 28, 2003, 08:09:36 AM »
Michiel:

   Your how-to is great, but I have a (dumb) question.  You suggest mounting the new drive at /mnt/bigdrive, copying the contents of /home to the new drive, and then remove the contents of the original /home directory.

   Once the new drive is later mounted at /home, the original drive and its data in the /home directory should never interfere with the data on the new drive. (Not in my experience, anyway). So is it really necessary to rm the /home directory on the original drive?  I see that original drive as a kind of a backup of the settings, and don't copy to the newdrive until all the ibays and users, etc., are configured. If there is a risk involved in doing this, I've been blessedly spared from it.

   BTW, I like to use /home/e-smith/files/ as a mount point.

Regards,

Tom