Koozali.org: home of the SME Server

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

Michiel Blotwijk

Re: Extra hdd question (yes, I did use search!)
« Reply #15 on: August 28, 2003, 01:06:43 PM »
> 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

That's the beauty of Linux. There are 10^6 ways of doing the same thing :-)

However, personally I think your approach can be confusing and dangerous. Once you mount the new drive to /home, the original content of that directory will be "hidden" behind the content of your new disk. But it will be hard to know for sure. Are you really looking at the new /home, or is it still the old one because the drive didn't mount for whatever reason?

If you diligently do a backup/copy/diff before deleting, the chances of doing something irrevocable are close to zero. But then again, paranoia is a virtue :-)

Besides, most people add a new hard disk only when they need more disk space. Leaving all the stuff on the disk as a kind of backup, beats this purpose.


>    BTW, I like to use /home/e-smith/files/ as a mount point.
Very valid point (in fact that's what I also do :D) I'll add your recomendation to the howto.

Thanks for the feed back
Michiel

Tom Keiser

Re: Extra hdd question (yes, I did use search!)
« Reply #16 on: August 28, 2003, 05:35:46 PM »
Michiel Blotwijk wrote:
>
> > 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
>
> However, personally I think your approach can be confusing
> and dangerous. Once you mount the new drive to /home, the
> original content of that directory will be "hidden" behind
> the content of your new disk. But it will be hard to know for
> sure. Are you really looking at the new /home, or is it still
> the old one because the drive didn't mount for whatever reason?

No matter which mount point you use, if there's no content in your ibays, your big new drive didn't mount, so there's no chance for confusion.

Tom

Charlie Brady

Re: Extra hdd question (yes, I did use search!)
« Reply #17 on: August 29, 2003, 07:13:51 PM »
Michiel Blotwijk wrote:

> 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?

Not misusing, using. FasTrak Lite M/B RAID controllers sometimes (always?) show up as /dev/hde and /dev/hdg and work fine.

> That might explain the "too many mounted file
> systems" message.

I suspect the problem is with duplicate partition labels.

Charlie

Charlie Brady

Re: Extra hdd question (yes, I did use search!)
« Reply #18 on: August 29, 2003, 07:15:40 PM »
Charlie Brady wrote:
 
> > That might explain the "too many mounted file
> > systems" message.
>
> I suspect the problem is with duplicate partition labels.

Cancel that, I see that a better answer has already been discovered.

Charlie

Arjay

Re: Extra hdd question (yes, I did use search!)
« Reply #19 on: August 29, 2003, 07:37:06 PM »
Michiel Blotwijk wrote:
>
> http://mirror.contribs.org/smeserver/contribs/mblotwijk/HowToGuides/AddExtraHardDisk.htm
>
> As allways, comments are apreciated.
> Michiel

Step 2: Partition the disk
-==========================
[root@Cs2MainServer root]# fdisk /dev/hdc

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-39813, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-39813, default 39813):
Using default value 39813

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@Cs2MainServer root]#
-==================================================


Step 3: Format the new partition
-==========================================
[root@Cs2MainServer root]# mkfs -t ext2 /dev/hdc1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2508352 inodes, 5016430 blocks
250821 blocks (5.00%) reserved for the super user
First data block=0
154 block groups
32768 blocks per group, 32768 fragments per group
16288 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.[root@Cs2MainServer root]# tune2fs -j /dev/hdc1
tune2fs 1.27 (8-Mar-2002)
Creating journal inode: done
This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@Cs2MainServer root]#
-===============================================


Step 4: Create a mounting point for the new disk
-====================================
[root@Cs2MainServer root]# mkdir /mnt/bigdisk
[root@Cs2MainServer root]#
=====================================


Step 5: Automount at boot time
-======================================
LABEL=/                 /                       ext3    usrquota,grpquota        1 1
LABEL=/boot1            /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda2               swap                    swap    defaults        0 0
/dev/hdc1 /mnt/bigdisk ext3 usrquota,grpquota 1,1


[root@Cs2MainServer root]# mount -a
[mntent]: line 19 in /etc/fstab is bad
[root@Cs2MainServer root]#
-============================================

-----> i really followed everything in your howto bro, actually im just copy and pasting it but still i have this: [mntent]: line 19 in /etc/fstab is bad
error that keeps on coming out. what will i do?

Michiel

Re: Extra hdd question (yes, I did use search!)
« Reply #20 on: August 29, 2003, 07:51:57 PM »
> [root@Cs2MainServer root]# mount -a
> [mntent]: line 19 in /etc/fstab is bad

So something is wrong in your /etc/fstab file. Could it be that you modified the file with some Windows text editor?

An other possibility could be that you didn't finish the last line with a new line. Please check and let us know if that didn't help.

Arjay

Re: Extra hdd question (yes, I did use search!)
« Reply #21 on: August 29, 2003, 10:20:50 PM »
Michiel wrote:
>
> > [root@Cs2MainServer root]# mount -a
> > [mntent]: line 19 in /etc/fstab is bad
>
> So something is wrong in your /etc/fstab file. Could it be
> that you modified the file with some Windows text editor?

-------> no other program was used to edit /etc/fstab than pico

 
> An other possibility could be that you didn't finish the last
> line with a new line. Please check and let us know if that
> didn't help.

---> i did a new line. i even tried to add another new line to make sure but that error still comes up. i also tried going throught the whole process while omitting the first step to see if there would be a different output. but sadly, the error on /etc/fstab still comes up

Michiel

Re: Extra hdd question (yes, I did use search!)
« Reply #22 on: August 29, 2003, 11:07:58 PM »
> /dev/hdc1 /mnt/bigdisk ext3 usrquota,grpquota 1,1

Sorry, my error. The correct line should be:

/dev/hdc1 /mnt/bigdisk ext3 usrquota,grpquota 1 2

(note that there should be no comma between the 1 and  2 at the end!)

Arjay

Re: Extra hdd question (yes, I did use search!)
« Reply #23 on: August 29, 2003, 11:14:09 PM »
Michiel wrote:
>
> > /dev/hdc1 /mnt/bigdisk ext3 usrquota,grpquota 1,1
>
> Sorry, my error. The correct line should be:
>
> /dev/hdc1 /mnt/bigdisk ext3 usrquota,grpquota 1 2
>
> (note that there should be no comma between the 1 and  2 at
> the end!)


so in the:
-============================================
Mount the disk to /home/e-smith/files and make it automountable

[root@hogwarts /]# umount

[root@hogwarts /]# pico /etc/fstab

/dev/hdc1 /home/e-smith/files ext3 usrquota,grpquota 1,1
 -==============================================

will it be: /dev/hdc1 /home/e-smith/files ext3 usrquota,grpquota 1 2
--> like the one on top?

or it will be:
/dev/hdc1 /home/e-smith/files ext3 usrquota,grpquota 1 1   ?????

Michiel

Re: Extra hdd question (yes, I did use search!)
« Reply #24 on: August 29, 2003, 11:28:47 PM »
Both will work, but 2 seems to be the recommended value. From man fstab:

The sixth field, (fs_passno), is used by the fsck(8)  pro­
gram to determine the order in which filesystem checks are
done at reboot time.  The root filesystem should be speci­
fied  with  a fs_passno of 1, and other filesystems should
have a fs_passno of 2.  Filesystems within a drive will be
checked  sequentially, but filesystems on different drives
will be checked at the same time  to  utilize  parallelism
available in the hardware.  If the sixth field is not pre­
sent or zero, a value of zero is returned  and  fsck  will
assume that the filesystem does not need to be checked.

Arjay

Re: Extra hdd question (yes, I did use search!)
« Reply #25 on: August 29, 2003, 11:37:50 PM »
thanks bro! great help! its already 3am here but im still not sleeping coz i still cant figure out where i went wrong. luckily youre there to assist. i can now go to sleep.
:-)

Arjay

Re: Extra hdd question (yes, I did use search!)
« Reply #26 on: August 30, 2003, 05:19:40 PM »
Michiel, bro what if i fresh installed a sme5.6 then mounted hdc1 to /home/e-smith/files... the files are there but the box dont recognize the users, groups and owners of the ibays... what will i do? replace the current accounts, configuration, domains, hosts and networks files with the one in my backup? coz i have a problem in my last backup... when i load it up, named daemon wont work well. maybe because im configuring named.conf that time that ive backup the system then my backups before this "shittie" backup were all delete.

what steps will i take?

Kent Budolfsen

Re: Extra hdd question (yes, I did use search!)
« Reply #27 on: September 24, 2003, 11:47:16 PM »
Hi all

Help Please!!

I've tried to mount an xtra harddisk as Michiel wrote in the Howto-guide, and it mounted fine but I couldn't see the xtra GBs.

Then I made a change to the fstab-file and now my SME-server only starts in Read-only-mode.

What do I do...?

The Fstab-file is as follows:

LABEL=/                 /                       ext2    usrquota,grpquota1 1
LABEL=/boot             /boot                   ext2    defaults         1 2
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro  0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner     0 0
none                    /proc                   proc    defaults         0 0
none                    /dev/pts                devpts  gid=5,mode=620   0 0
/dev/hdc5               swap                    swap    defaults         0 0
/dev/hdd1               /home/e-smith/files     ext2    usrquota,grpquota1 1

Kent

Clint

Re: Extra hdd question (yes, I did use search!)
« Reply #28 on: September 25, 2003, 11:33:29 AM »
Hey, now that I got one server running, I decided to start on getting a general purpose webserver machine up and running, again, with 2 hard disks (gotta use all this space somewhere :D ).

Following the guide on contribs.org, I ran into a slight difficulty.

Since the quotacheck thing throws up an error, and I was too lazy to attempt fixing it, I decided to bypass it entirely, and entered this into my fstab file instead of what the guide suggested:

/dev/hde1 /home/e-smith/files/ ext3 defaults 1,2

Works like a charm, and no error messages. Is there a specific reason you included quotacheck in your guide?

Seems to work well, I'm testing again using the Linux ISO method. While not scientific, it does ensure that it isn't copying to my little 9gb hdd :D

Michiel

Re: Extra hdd question (yes, I did use search!)
« Reply #29 on: September 25, 2003, 11:55:25 AM »
> specific reason you included quotacheck in your guide?

quotacheck is entirely optional, but if your users find out there are no quota on that disk, 9GB might not be enoug to store all their MP3's :-)

> /dev/hde1 /home/e-smith/files/ ext3 defaults 1,2

The comma at the end shouldn't be there.

Just out of curiosity, what error did you get from quotacheck?

Michiel