Koozali.org: home of the SME Server

Add HDD without format

Wietse

Add HDD without format
« on: March 13, 2003, 03:59:25 PM »
Hello,

I can find lots of info how to add a HDD, but I want to do it without formatting! What is the best way to do this?!

Thanks in advance!
Wietse

kees blokland

Re: Add HDD without format
« Reply #1 on: March 13, 2003, 04:53:38 PM »
Hi Wietse,

Make a place where it can live:

mkdir /mnt/newdisk
mount /dev/magic_words /mnt/newdisk

where magic_words is the partition you want to mount.

I did one just now. The partition I wanted to see was /hdb6  (it used to be a normal e-smith disk). All I did was mount /dev/hdb6 /mnt/newdisk

and after that you can see it. Now of course, the mount command is clever enough to recognise the format etc,  this is not always the case. If not, then you will have to read the 'man mount' documentation. ( mount -t filessytem etc etc )

This is however a quick way to mount a disk and copy loads of stuff. If you want it to be seen by the normal e-smith system, the same applies, just mount it somewhere as an i-bay and do something like:

mount /dev/hdb6 /home/e-smith/files/ibays/olddisk/files  
(make the oldddisk ibay first of course..)

To make it permanent, have a look at /etc/fstab (and the doc 'man fstab)


good luck,  kees

Wietse

Re: Add HDD without format
« Reply #2 on: March 13, 2003, 05:11:18 PM »
Ohw ho... slow down plz :)

First of all, thanks for your (very) quick reply! But since I am at work, I cannot test it live, but to make sure things will work out when I get home I just want to make sure things will go allright...

First I hook up my HDD, then when booted, I give these commands:

mkdir /mnt/newdisk
mount /dev/hdb6 /mnt/newdisk

then (with a positive mind) I assume the drive is "recognised", then what... cause I get a little mixed up by the options given there... I want it to be accessed by an i-bay, that would be fine, so I "take a look at /etc/fstab"?

But what do I need to look for? :) Guess I have to add a line right? Something like:

LABEL=/hdb6            /home/e-smith/ibays/disc2/files         ext2        ???

Little help next to the part allready given (and appriciated!) would be great!

Thanks in advance!

kees blokland

Re: Add HDD without format
« Reply #3 on: March 13, 2003, 06:25:08 PM »
>First I hook up my HDD, then when booted, I give these commands:
>mkdir /mnt/newdisk    (OR whatever you like!)
>mount /dev/hdb6 /mnt/newdisk  

The hdb referred to the disk where I happened to see it:
YOU have to look with 'dmesg | more'  to see what yours is called.
Or: hda=1st primary, hdb=2nd on primary, hdc=1st on secondary, hdd=2 on secondary. But dmesg is easier.

The partition where your data lives COULD be 6 but no guarantee. It depends what is on it at present

Use 'fdisk /dev/hdX'  to see the partitions, use the p to print the table.Mine looks like this:  ( DO BE CAREFULL, DO NOT WRITE TO YOUR DISK. USE WITH CARE)
/dev/hdb1 = boot
/dev/hdb2 = Extended
/dev/hdb5 = Linux Swap
/dev/hdb6 = Linux <- this is where the action and your data is..

Don't worry about the fstab entry yet, first get to the point where you can see it manually. If you mess up, than all you do is reboot & try again.

Once you get the hang of seeing it where you like (as in the previous example) then you can experiment putting it in an ibay. Look at the documentation for adding an extra disk. You can still use that, just skip the formatting bits.

sorry for the 2 second replies, me at work too...

kees

Wietse

Re: Add HDD without format
« Reply #4 on: March 13, 2003, 06:38:00 PM »
Okay, thanks again for your reply :)

reading you message I start to think that I can only use a linux-partioned drive...? I just formatted (FAT32 if I'm right) the drive and copied some data to it, now I want the data in my server...

but I will be home in an hour or so, then I'll just take a shot at it and we'll see...

kees blokland

Re: Add HDD without format
« Reply #5 on: March 13, 2003, 09:46:56 PM »
You can add almost any filesystem, but now you really have to start reading the mount manual..

do a bit of googling, you will find many hints..

http://www.geocities.com/tipsforlinux/articles/3.html

Michael Soulier

Re: Add HDD without format
« Reply #6 on: March 15, 2003, 04:19:24 PM »
kees blokland wrote:
>
> mkdir /mnt/newdisk
> mount /dev/magic_words /mnt/newdisk

The gentleman said that he wanted to do it without formatting. There's one step here that needs to be inserted. You should create the filesystem on the disk before you mount it.  

Lets say you already have a /dev/hda disk, and you add a second as a slave to hda, making it /dev/hdb.

mkfs -t /dev/hdb

will create the filesystem. Then you can mount it. If this is SME <= 5.5, use "ext2" for the filesystem type. If this is 5.6, use "ext3".

Cheers,
Mike

Wietse

Re: Add HDD without format
« Reply #7 on: March 22, 2003, 07:10:59 PM »
Please help me out, cuase I can't get it to work properly! This is what I have so far:

[root@linux /root]# fdisk -l

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

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1         2     16033+  83  Linux
/dev/hda2             3      3736  29993355    5  Extended
/dev/hda5             3        35    265041   82  Linux swap
/dev/hda6            36      3736  29728251   83  Linux

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

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1      4865  39078081    c  Win95 FAT32 (LBA)