Koozali.org: home of the SME Server

Mounting new HDD

Chris

Mounting new HDD
« on: September 18, 2001, 03:26:00 PM »
Hello,

I was hoping that someone could help me as I am very new to this.
My server has been running for only two days. I have two hhd in the box and i can not tell if E-smith has mounted both. I would like to know the command(s) to tell me how many physical drives are 'mounted' and what space is on them.
I understand that the two hdd (if mounted) are one and will show the total space.
I believe that i have 2 3.2 gig dives in the server but the total space is only showing as 3.2.
I could bring down the server and pull the hdd drives and see if i could tell. But I was hoping that someone whould know a way to tell with out me doing that.

So could someone please ponit me to a HOWTO or a site with some help on it i would be very happy.

I would liketo say to the developers that they have done a fine job with this product.

WXP

Re: Mounting new HDD
« Reply #1 on: September 18, 2001, 04:20:49 PM »
>
> Hello,
>

Hi

>
> I was hoping that someone could help me as I am very new to
> this.

ok so lets try to help you...

> My server has been running for only two days. I have two hhd
> in the box and i can not tell if E-smith has mounted both. I
> would like to know the command(s) to tell me how many
> physical drives are 'mounted' and what space is on them.
>

I'm afraid E-Smith uses only one hard drive if you didnt tell him to mount the second one on a directory...
To see how many partitions you have just type :

fdisk
p

I think it is "p"... i'm not sure.. if i doesnt work look in the help menu commands

>
> I understand that the two hdd (if mounted) are one and will
> show the total space.

That's not exactly true.. you'll see the space on mounted directories not the space you have on devices.
To see how much space you have on the directories you mounted devices on, type :
df -H

"-H" will give you more comprehensive numbers for humans :) Like Mo et Go

> I believe that I have 2 x 3.2 gig drives in the server but the
> total space is only showing as 3.2.

That's what I said above.. E-Smith uses only one hard drive.
The installation erases everything on the first HD detected and uses the whole space.
If you want to uses both hard drive like one, you'll have to use RAID
hardware or software.
Or just mount the second harddrive on a directory...
But you can't mount two devices on ONE directory..

exemple:
mount /dev/hda1 /
mount /dev/hda2 /

Hope this help

Dan Brown

Re: Mounting new HDD
« Reply #2 on: September 18, 2001, 05:34:45 PM »
By default, e-smith will only use one hard drive, and the second one will be completely unused.  A df or mount command will show /dev/hda1 and /dev/hda6 as being used (/dev/hda5 is used for swap, and doesn't show in those lists as it isn't a mounted filesystem).  Since you're only using one drive, you will of course only have the capacity of one drive.

If you want to use both drives, the only _supported_ way to do that is with software RAID.  This will use both drives, but the second will be a mirror of the first--so you will still only have the capacity of one drive.  If you've done this, the devices in df will show as /dev/md*.

WXP

Re: Mounting new HDD
« Reply #3 on: September 18, 2001, 06:08:49 PM »
>
> If you want to use both drives, the only _supported_ way to
> do that is with software RAID.  This will use both drives,
> but the second will be a mirror of the first--so you will
> still only have the capacity of one drive.  If you've done
> this, the devices in df will show as /dev/md*.
>

I do not agree... I installed E-Smith on a 850Mo HD
I put 2 HDs in my computer.. one of 8,4Gb and another of 14,4Gb
I move the rep /home to /tmp/home
I created /home (to have an empty folder)
I created the matrice with the 8,4 and 14,4 gb HD and I then mounted the partition /dev/md0 on /home (in the init files) before E-Smith use the /home rep (because it uses some files in it at startup).
And I have about 23Gb on /home for my ibays....

I will give you the way to do it if I still have it at home...

WXP

Re: Mounting new HDD
« Reply #4 on: September 18, 2001, 08:39:32 PM »
Hi,

Here is the HowTo... Sorry it is in french,, I don't have the time to translate it at the moment. if someone could translate it for me it could be nice...

Thanx

ps : I do not take the responsability if it doesnt work... USE AT YOUR OWN RISKS

                   Raid en mode linéaire (testé sous RH)
         
                        Brossin Pierrick
            e-mail: pbrossin@gmx.net





Logiciels requis:
   -Les logiciles raidtools-0.90



              Création d'une matrice en Raid linéaire
              ----------------------------------------


Pour effectuer du Raid en mode linéaire, vous devez disposer de plusieurs partitions
qui ne sont pas forcément de la même taille.
Il vous faut, créer les 2 partitions et les formater; dans notre cas, nous utiliserons
les partitions /dev/hda7 et /dev/hdb1 qui sont respectivement des partitions de
8Go et 14Go ce qui va nous donner 22Go.

Une fois les 2 partitions créer proprement à l'aide de fdisk et mkfs.ext2, nous allons
créer la matrice raid sur /dev/md0 en concaténant les partition hda7 et hdb1.

Il faut savoir avant de se lancer, que si un des disques dur du raid tombe en panne, la matrice
sera complétement foutue !

Editez le fichier /etc/raidtab de façon à correspondre à votre configuration. Pour deux disques en mode
linéaire, voici un fichier type  :


raiddev /dev/md0
        raid-level      linear
        nr-raid-disks      2
        chunk-size      32
        persistent-superblock   1
        device             /dev/hda7
        raid-disk          0
        device             /dev/hdb1
        raid-disk          1


Ensuite, créer la matrice par la commande :

  mkraid /dev/md0

La commande initialise la matrice, écrit les superblocs persistants et active le périphérique.
Jetez un oeil à /proc/mdstat. Vous devriez y voir que la matrice fonctionne.

Pour arreter la matrice, utiliser la commande :

  raidstop /dev/md0

A présent créez un système de fichiers comme sur un périphérique quelconque, montez le, incluez le dans
votre fstab etc en faisant fdisk /dev/md0 et mkfs.ext2

Aide
-------

Dans Fdisk, quand il vous demande la fin de la partition, pour plus de facilité, appuyer
sur ENTER sans rien spécifier. Fdisk prendra automatiquement la taille maximal.


Brossin Pierrick

Dan Brown

Re: Mounting new HDD
« Reply #5 on: September 18, 2001, 11:06:01 PM »
You missed the one word I took the trouble to emphasize in my message, which was "supported".  Sure, there are other ways of using additional drives, but they aren't supported by e-smith.

DJ_Ramjet99

Re: Mounting new HDD
« Reply #6 on: September 19, 2001, 01:41:08 AM »
Hi,

Here is how I did it.

INSTALL SECOND HARD DRIVE
Create an I-bay that will server as the user access point for the second hard-drive in the normal fashion
·   Power off server and add harddrive
·   Repower harddrive and ensure it appears correctly in the BIOS
·   Log in as root
·   Dmesg | more will show existing and new drives (second drive likely to be hdb
·   fdisk /dev/hdb (or whatever it apppears as)
·   Within fdisk, use p to view existing partitions and delete as necessary
·   Use n to create a new partition (extended and start from cylinder 2, use default end cylinder)
·   w saves new partition information
·   Exit fdisk
·   mkfs /dev/hdb1
·   mkdir I-bay_name_you_created
·   use mc to edit /etc/fstab until you add your drive as below (this is how mine looks)

·   LABEL=/ / ext2 defaults 1 1
LABEL=/boot /boot ext2 defaults 1 2
/dev/hdb1 /home/e-smith/files/ibays/I_bay_name_you_chose ext2 defaults 1 1
/dev/hdc1 /home/e-smith/files/ibays ext2 defaults 1 1
/dev/hdd1 /home/e-smith/files/users ext2 defaults 1 1
/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/hda5 swap swap defaults 0 0

·   Edit file as above and required and save
·   mount -a

The drive should now appear in your network neighbourhood as an i-bay. I have been unable to set permissions on this i-bay however. Everytime I try to remove everyone access, I lose all access. Anyone know why this might be ?

Chris

Re: Mounting new HDD
« Reply #7 on: September 19, 2001, 11:18:24 AM »
Thank you all for your help.

WXP, Is there any reason why more that one HDD is not supported?

Thankyou to Dan WXP and DJ for supplying a workaround.

As this is my first play with a 'linux' back end it is proving quite interesting and this will be no exception.

Thanks again

WXP

Re: Mounting new HDD
« Reply #8 on: September 19, 2001, 12:32:57 PM »
>
> Thank you all for your help.
>

No problem...

>
> WXP, Is there any reason why more that one HDD is not
> supported?
>

Actually, E-Smith uses the first HD it found on your system.
The developers choosed to do so probably because it's way easier for newbies than choosing which HD. Think about a guy who doesnt know Linux at all.

"Please choose the HD you want to install E-Smith on"
"E-Smith detected two Hard Drive.. would you like to create a raid linear device to be able to use both as one"

I know some ppl who would be afraid and stop the installation.

The easier the better it is..  People can change this later .. it's not that hard.

For example, you have a 5 Gigs HD and another of 20 Gigs.
Let's say E-Smith uses the 5 Go one. Just run the Partition Magic Disk and reduce the E-Smith partition to 1Go to give it some room.
Don't forget to let the SWAP Partition alone....
Then create a new partition with the rest of the space (3-4Go) and create another partition on the 20 Go HD.
(You can maybe do it from Linux though I dont know how to resize partition.. but I know how to create them ...)
Then you do "exactly" what I said...
You'll have
 - 1Go for E-Smith System
 - 23-24 Go for users and ibays (the raid linear device)
 - SWAP Partition

> As this is my first play with a 'linux' back end it is
> proving quite interesting and this will be no exception.
>

Try to make this before copying all your important stuff..

Please if someone know how to resize partition under Linux tell me...
I can make an HowTo about this...

See ya

Sander

Re: Mounting new HDD
« Reply #9 on: September 21, 2001, 07:15:49 PM »
This is an online translation of
Création d'une matrice en Raid linéaire
_________________________________

I have learned french but not as much to translete it on my own. I thin I did the hardest part.

Can anyone who knows English and French translate it to conventional English so I could understand it too. there are errors in the English version so please translate it better. I dont take any responsibilyty for spelling and grammar and contenent errors.

Sander

To effectuate Raid in linear method, you must have access to several partitions that are not necessarily méme cut. It is necessary you, create the 2 partitions and to format them; in our case, we use the partitions /dev/hda7 and /dev/hdb1 that are respectively partitions 8GO and 14GO what will give to us 22GO. Once the 2 partitions to create properly has the help fdisk and mkfs.ext2, we will create the matrice raid on /dev/md0 in concaténant the partition hda7 and hdb1. It is necessary to know before to launch itself, that if one of the hard discs of the raid breaks down, the matrice will be screwed-up completely! Edit the file /etc/raidtab faéon has to correspond has your configuration. For two discs in linear method, here a typical file:

Pour effectuer du Raid en mode linéaire, vous devez disposer de plusieurs partitions
qui ne sont pas forcément de la même taille.
Il vous faut, créer les 2 partitions et les formater; dans notre cas, nous utiliserons
les partitions /dev/hda7 et /dev/hdb1 qui sont respectivement des partitions de
8Go et 14Go ce qui va nous donner 22Go.

Une fois les 2 partitions créer proprement à l'aide de fdisk et mkfs.ext2, nous allons
créer la matrice raid sur /dev/md0 en concaténant les partition hda7 et hdb1.

Il faut savoir avant de se lancer, que si un des disques dur du raid tombe en panne, la matrice
sera complétement foutue !

Editez le fichier /etc/raidtab de façon à correspondre à votre configuration. Pour deux disques en mode
linéaire, voici un fichier type :

raiddev /dev/md0
raid-level linear
nr-raid-disks 2
chunk-size 32
persistent-superblock 1
device /dev/hda7
raid-disk 0
device /dev/hdb1
raid-disk 1

Next, create the matrice by the order: mkraid /dev/md0 The order initialize the matrice, writes the persistent superblocs and activate the périphérique. Throw an eye has /proc/mdstat. You should see there that the matrice work. For arreter the matrice, use the order: raidstop /dev/md0 At present create a systeme of files as on a périphérique any, climb the, include the in your fstab etc while doing fdisk /dev/md0 and mkfs.ext2 Help -------. In Fdisk, when it requires the end for you of the partition, for more of ease, to lean on TO GRAFT without nothing to specify. Fdisk will take automatically cut it maximum.

Ensuite, créer la matrice par la commande : mkraid /dev/md0 La commande initialise la matrice, écrit les superblocs persistants et active le périphérique. Jetez un oeil a /proc/mdstat. Vous devriez y voir que la matrice fonctionne. Pour arreter la matrice, utiliser la commande : raidstop /dev/md0 A présent créez un systeme de fichiers comme sur un périphérique quelconque, montez le, incluez le dans votre fstab etc en faisant fdisk /dev/md0 et mkfs.ext2 Aide ------- Dans Fdisk, quand il vous demande la fin de la partition, pour plus de facilité, appuyer sur ENTER sans rien spécifier. Fdisk prendra automatiquement la taille maximal.

Greg Knoll

Re: Mounting new HDD
« Reply #10 on: September 29, 2001, 07:46:21 AM »
OK, so what does this mean?
If E-Smith only uses the first drive on install, then why is it using both my drives I have iontstalled?
[root@starbase9 /root]# df -H
Filesystem            Size  Used Avail Use% Mounted on
/dev/hdc2             9.8G  1.2G  8.1G  13% /
/dev/hda1              12M  2.7M  8.7M  23% /boot

I know I have a 12mb and a 9+ GB drive(s) installed, and as far as I know I didn't do anything out of the ordinary when I installed the system.
I didn't select any kind of RAID that I know of or recall.

Could it be that the first drive only has 12MB and the system needed more space so it took the next drive??

Accessing any of the shares on my server shows I have a capacity of 9.16 GB.