Koozali.org: home of the SME Server

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6

microlatina

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« on: January 25, 2005, 06:39:43 AM »
I am running SME server V.6 on an old Compaq server. It has a SCSI board AHA2940W and the system it was originally installed with just one HDD of the two Cheetah 4 MB HDD available. I don´t need the RAID feature but I would like to mount a second HDD identical to the one that is now running. I have all the hardware elements to plug the HDD in.

I have 3 questions:

1. is this possible without the need of re-installing the SME server ?

2. is it possible to just double disk space by adding the 2nd. HDD without the RAID feature ?

3. which is the procedure to make SME know that a new HDD has to be formatted and mounted in terms of commands, etc.

Thank you very much friends in advance for this help.

ClaudioG

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #1 on: January 25, 2005, 10:01:35 AM »
>1. is this possible without the need of re-installing
>the SME server ?
Yes

>2. is it possible to just double disk space by adding
>the 2nd. HDD without the RAID feature ?
Yes and no. You can mount new volume wherever you want: you can add space same point, not double at all

>3. which is the procedure to make SME know that a new
>HDD has to be formatted and mounted in terms of
>commands, etc.
a) type fdisk -l
you must see all devices available; I think you see
/dev/sda -> current device
/dev/sdb -> second hard disk
b) create partition with fdisk, i.e. /dev/sdb1
ATTENTION: modify partition destroy any data on disk!
c) create file system on /dev/sdb1 (ext3)
ATTENTION: create file system destroy any data on partition!
mkfs.ext3 /dev/sdb1
d) mount new filesystem where you want
for mounting new volume for ibay test, you nedd:
add in /etc/fstab line like:
/dev/sdb1   /home/e-smith/files/ibays/test   ext3 default

Regards
ClaudioG

microlatina

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #2 on: January 25, 2005, 01:59:25 PM »
Claudio:

Thank you very much for your instructions. This is what I first see, still without connecting the 2nd. HDD to the SCSI board:

login as: root
Sent username "root"
root@192.168.5.1's password:
Last login: Mon Jan 24 08:06:40 2005 from pc-00070.efexor.com
Welcome to the Mitel Networks SME Server.
[root@sunshine root]# fdisk -l

Disk /dev/sda: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1        13    104391   83  Linux
/dev/sda2            14        46    265072+  82  Linux swap
/dev/sda3            47       522   3823470   83  Linux
[root@sunshine root]#

Is this OK ? I´ll do it step by step. Now I will connect the 2nd. drive and be back to you if you don´t mind. Now, when you say ..

Quote
you can add space same point, not double at all


you mean that the 2nd. drive 4MB space will be added to the available space left in the first one, right ? This happens when you mount the 2nd. drive, right ? and this will stay every time I power up the machine, correct ?

Thanks a lot

ClaudioG

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #3 on: January 25, 2005, 07:32:12 PM »
Quote
Is this OK ? I´ll do it step by step. Now I will connect the 2nd. drive and be back to you if you don´t mind.

All OK, you can connect second disk.

Quote

you mean that the 2nd. drive 4MB space will be added to the available space left in the first one, right ? This happens when you mount the 2nd. drive, right ? and this will stay every time I power up the machine, correct ?


With SME you "substitute" one directory with single file system; thus you can mount new file system under some "directory": i.e. you can move all /home in other file system (that can reside on other disk).
When you type
cd /home
you see new file system.

PS:...my english is very little...

Regards
ClaudioG

microlatina

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #4 on: January 25, 2005, 09:22:56 PM »
Hello Claudio,

I appreciate your help very much. I reside in Buenos Aires, Argentina so this is my English, and yours is very good for me to understand. Where are you located ? I hope you will not feel your time is abused, so please tell me in case  you are busy enough to follow this help.

I will test all this in the evening, because I am at work and it is now 17:20 Hs here. I think that I've got what you mean with the substitution of one directory for the new volume free space.

I'll tell you later what happened.

Now, another little question: If I would start the instalation from zero, with both HDD physically connected to the single SCSI board, how can you instruct SME that you want to use 2 HDD, 4 MB each but not in a RAID feature ? I think that I didn't see the way to do that and it assumes that you always would like to use RAID feature.

Very kind regards

ClaudioG

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #5 on: January 25, 2005, 10:07:30 PM »
Quote
Where are you located ?

Verona, Italy

Quote
If I would start the instalation from zero, with both HDD physically connected to the single SCSI board, how can you instruct SME that you want to use 2 HDD, 4 MB each but not in a RAID feature ?

No, AIK, this feature require Logical Volume Manager or file system that provide this service; SME standard install do not provide features like this

You say: ....2 HDD, 4 MB each...
I think 4GB each... :-)
Regards
ClaudioG

microlatina

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #6 on: January 25, 2005, 10:59:24 PM »
Yes yes Claudio, I´m sorry. The 2 HDD have a 4GB size each.javascript:emoticon(':lol:')

I am home now, and will start testing.

javascript:emoticon(':pint:') this is for la bella Italia and for Verona...cheers.

I´ll be back.
Thank you

microlatina

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #7 on: January 26, 2005, 01:22:53 AM »
Hello Claudio:

This is what I´ve got when I connect the 2nd. HDD to the board, just as you said:

Quote
login as: root
Sent username "root"
root@192.168.5.1's password:
Last login: Mon Jan 24 21:38:42 2005 from pc-00070.efexor.com
Welcome to the Mitel Networks SME Server.
[root@sunshine root]# fdisk -l

Disk /dev/sda: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1        13    104391   83  Linux
/dev/sda2            14        46    265072+  82  Linux swap
/dev/sda3            47       522   3823470   83  Linux

Disk /dev/sdb: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1   *         1        33    265041   82  Linux swap
[root@sunshine root]#


It seems that SME recognizes this new HDD as /dev/sdb1/ , correct ?

Should I proceed to format and mount ?

Kind regards

ClaudioG

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #8 on: January 26, 2005, 03:16:32 PM »
Quote
It seems that SME recognizes this new HDD as /dev/sdb1/ , correct ?

Should I proceed to format and mount ?

Yes, you can now:
a) create partition(s)
b) make file system
c) mount

Regards
ClaudioG

microlatina

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #9 on: January 26, 2005, 05:25:42 PM »
Claudio:

After the 3 procedures, this is what fdisk -l shows:

Quote
[root@sunshine etc]# fdisk -l

Disk /dev/sda: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1        13    104391   83  Linux
/dev/sda2            14        46    265072+  82  Linux swap
/dev/sda3            47       522   3823470   83  Linux

Disk /dev/sdb: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1   *         1        33    265041   82  Linux swap
[root@sunshine etc]#


Now, this is what /etc/fstab contains, but I think that the HDD is not really mounted yet...probably sintax at some point. I changed the word "default" for "defaults" ... but still I see some numbers 0,0 that maybe we should include , right ?

Quote
[root@sunshine etc]# cat fstab
#------------------------------------------------------------
# BE CAREFUL WHEN MODIFYING THIS FILE! It is updated automatically
# by the SME server software. A few entries are updated during
# the template processing of the file and white space is removed,
# but otherwise changes to the file are preserved.
# For more information, see http://www.e-smith.org/custom/ and
# the template fragments in /etc/e-smith/templates/etc/fstab/.
#
# copyright (C) 2002 Mitel Networks Corporation
#------------------------------------------------------------
LABEL=/1                /                       ext3    usrquota,grpquota        1 1
LABEL=/boot             /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/sda2               swap                    swap    defaults        0 0
/dev/sdb1        /home/e-smith/files/ibays/test ext3    defaults
[root@sunshine etc]#


I think that this should show an i-bay called "test" at the panel ? Please could you tell me how I could probe that the HDD is really there ...

Thank you !!

ClaudioG

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #10 on: January 28, 2005, 10:54:17 AM »
Quote
Disk /dev/sdb: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 33 265041 82 Linux swap
[root@sunshine etc]#


Your disk has wrong file system: sdb1 is swap fs, notdata fs.
You must create partition and then create file system
before mount.

If you want only one file system (all space), you must:
a) delete swap partition from sdb
b) create one partition
c) make file system

WARNING, fdisk is so powerfull...

For a) and b), you can:
fdisk /dev/sdb
type m for help
type d for delete current partition
type n for create new partition

remember to type w for write you change.

for c) you can use (for the first partition on the disk):
mkfs.ext3 /dev/sdb1


Regards,
ClaudioG

microlatina

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #11 on: January 28, 2005, 04:14:49 PM »
Dear Claudio:

I followed your instructions step by step.
A. delete partition using d option in fdisk
B. create a new partition with option n (extended not primary)
C. create file system with your syntax.

After all, this his is what mkfs.ext3 /dev/sdb1  shows:

Quote
[root@sunshine root]# mkfs.ext3 /dev/sdb1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
66264 inodes, 265041 blocks
13252 blocks (5.00%) reserved for the super user
First data block=1
33 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Writing inode tables: done
Creating journal (8192 blocks): 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@sunshine root]#


after that ... this is what fdisk -l shows:

Quote
[root@sunshine root]# fdisk -l

Disk /dev/sda: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1        13    104391   83  Linux
/dev/sda2            14        46    265072+  82  Linux swap
/dev/sda3            47       522   3823470   83  Linux

Disk /dev/sdb: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1   *         1        33    265041   82  Linux swap
[root@sunshine root]#


As I can see this is a Linux swap fs, not a data fs
I can´t figure how to make it "data" instead of "swap".

The result is the same as before.
Where is my error ??



ClaudioG

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #12 on: February 01, 2005, 06:58:47 PM »
Quote
As I can see this is a Linux swap fs, not a data fs
I can´t figure how to make it "data" instead of "swap".


you must change partition id with fdisk command "t":
Quote
Command (m for help): t


type 82-> linux swap
type 83-> linux


you must set type 83.

then you can create file system

Regards
ClaudioG

microlatina

I need to add a 2nd. SCSI Cheetah HDD to my SME v.6
« Reply #13 on: February 01, 2005, 09:33:37 PM »
Hello Claudio:

I did some research and discovered that there is a RED Hat 7.3 on line manual. Even if I apply what the manual says, it doesn´t work as espected. Red Hat warns about the fdisk command is tricky and sometimes returns some weird results.

It seems to me that is not so easy to make an fdisk  recently created partition to be simply 83 type. The problem is that fdisk assumes the partition to be of type 82. Okay. Then you can think that changing type to 83 has to be very easy. It is not.

You first have to make an EXTENDED partition that works as a container for other partitions. These other partitions accept to be changed from 82 to 83 type. Otherwise if you send the "t" subcommand to fdisk it returns that you have to delete the partition first because it can´t be changed from 82 to 83 right away. This is what I finally could get.

Example - Create partition using fdisk command:

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

Command (m for help):


Use "w" to write partition to disk:

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

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


Now check to see what is really on disk:

Quote
[root@sunshine root]# fdisk /dev/sdb1

Command (m for help): p

Disk /dev/sdb1: 255 heads, 63 sectors, 32 cylinders
Units = cylinders of 16065 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
/dev/sdb1p1             1        32    257008+  83  Linux


Now you can see that this partition is called
Quote
/dev/sdb1p1
and not
Quote
/dev/sdb1


Now lets try to make a file system on this 83 partition. See what we have on disk after boot:

Quote
[root@sunshine root]# fdisk -l

Disk /dev/sda: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1        13    104391   83  Linux
/dev/sda2            14        46    265072+  82  Linux swap
/dev/sda3            47       522   3823470   83  Linux

Disk /dev/sdb: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1   *         1        33    265041   82  Linux swap


...again the old 82 type partition !!!
Make file system anyway:

Quote
[root@sunshine root]#  mkfs.ext3 /dev/sdb1p1
mke2fs 1.27 (8-Mar-2002)
Could not stat /dev/sdb1p1 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
[root@sunshine root]#


Impossible. Not recognized.
But the 83 type partition is there !

Quote
[root@sunshine root]# fdisk -l                                                  
Disk /dev/sda: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1        13    104391   83  Linux
/dev/sda2            14        46    265072+  82  Linux swap
/dev/sda3            47       522   3823470   83  Linux

Disk /dev/sdb: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1   *         1        33    265041   82  Linux swap
[root@sunshine root]# fdisk /dev/sdb1

Command (m for help): p

Disk /dev/sdb1: 255 heads, 63 sectors, 32 cylinders
Units = cylinders of 16065 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
/dev/sdb1p1             1        32    257008+  83  Linux

Command (m for help):


Any ideas ?

Kind regards.

microlatina

First part of the problem solved - type 83 fs is now OK
« Reply #14 on: February 02, 2005, 08:52:07 PM »
Dear Claudio:

Please excuse all my writting.
I had the feeling that something was really wrong and I re-installed SME Server 6 from scratch.
This is the first time I indicated the installer that only one HDD had to be used instead of the RAID feature, but this time the 2 HDD were present at install time :o)

Finally, I could get what you indicated at first:

Quote
[root@sunshine root]# fdisk -l

Disk /dev/sda: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1        13    104391   83  Linux
/dev/sda2            14        46    265072+  82  Linux swap
/dev/sda3            47       522   3823470   83  Linux

Disk /dev/sdb: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1             1       522   4192933+  83  Linux
[root@sunshine root]#


Now I have added a single line to /etc/fstab as follows:

Quote
[root@sunshine root]# cat /etc/fstab
#------------------------------------------------------------
# BE CAREFUL WHEN MODIFYING THIS FILE! It is updated automatically
# by the SME server software. A few entries are updated during
# the template processing of the file and white space is removed,
# but otherwise changes to the file are preserved.
# For more information, see http://www.e-smith.org/custom/ and
# the template fragments in /etc/e-smith/templates/etc/fstab/.
#
# copyright (C) 2002 Mitel Networks Corporation
#------------------------------------------------------------
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/sda2               swap                    swap    defaults        0 0
/dev/sdb1               /home/e-smith/files/ibays  ext3


Is this last line correct or should it be like this ?

Quote
/dev/sdb1 /home/e-smith/files/ibays ext3 defaults 0 0


How can I test that the extra space 4GB are really available ?
Is this existing mount/point correct ? Should I create an ibay and use this new ibay as mount/point ?

Quote
/home/e-smith/files/ibays


Kind regards