Adding second hard disk

In preparation foe openSuse 11, I am trying to add a second hard drive (250gb). I pre-configured the second drive with gparted to make it extended with an ext3 partition. Gparted reported 232gb available.
Firstly there is a funny in that suse sees my hard drives as sata, when they are in fact pata
So sda has my present system and it works.
If I do a hardware check I have /dev/sda & /dev/ sdb
I have added in fstab the following:
/dev/sdb1 /media/sdb auto defaults 0 2
After reboot I look in /media/sdb and find 6.5gb free of 19.7gb

What have I done wrong?

Actually sda is for scsi, and this is happens with newer kernels (on all distros, you will rarely see hda pop up)

Post the output of fdisk -l.

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0006018e

Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 2873 20972857+ 83 Linux
/dev/sda3 2874 30401 221118660 83 Linux

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c4e57

Device Boot Start End Blocks Id System
/dev/sdb1 1 30401 244196001 5 Extended
/dev/sdb5 1 30401 244195969+ 83 Linux

This shows that /dev/sdb1 is an Extended partition. This means that it contains partitions numbered higher then 4. In this case it contains the partion /dev/sda5. This last one is th real partition you should use. So change your fstab to mount /dev/sda5 instead of dev/sda1 (hope /dev/sda1 is not ruined in the meantime.

Btw, I do not know why an Extended partition is made. This is not realy needed when you only want only one partition on the disk. Your other disk just has three partitions, none of them in an the extended partition (which was thus not made at all). Maybe it is a hobby of the tool you used :confused: .

Hi Henk
Thanks for your help. I put in the extended partition with gparted. The disk is still empty. If I change it with gparted to be just ext3, would this be OK?

We have too sync a bit I think :stuck_out_tongue:

In your first post you said: I pre-configured the second drive with gparted to make it extended with an ext3 partition.
When this is true, it is you that made an extended (I do not know why) we know as sdb1 and then a logical partition in it (sdb5). Now you say you made it ext3. I know almost nothing about gparted, but when gparted can make ext3 file systems on partitions and you told it to do so I suppose that is OK. Did you try to mount it in the way I told you?

When you mount there will be two possibilities:
a. the fs is OK and when you type **df **you will see the Gigs.
b. the fs is not there and you will get an error.

Btw why did you not use YaST > System > Partitioner. This can make partitions and filesystems on them and has fields to fill in for the mounting. All in one!

If it’s empty, easier is to open Yast → System → Partitioner. Highlight sdb5 and delete it. Highlight sdb1 and delete it. Click “create” and create a “Primary” (sdb1) and tick to “format” it as “ext3”

Hi Henk
Yes, it was me that made the extended partition (a hangover from windows days), and then I put an ext3 partition in it.

In the meantime, I made the whole disk ext3 (using gparted) and I can get the full size disk.

The only problem I have now is the read write permissions. I can’t write as yet.
I did not think of using suse’s partition manager. I will look at that now

As it is still empty now you can follow swerdna’s advise and get rid of that extended partition. Else after years you will still think of this slip of you :eek: .

I should at least tell in fstab it is ext3, though it may work without:
/dev/sdb1 /media/sdb ext3 auto defaults 0 2

And who knows when you let YaST do its tricks, maybe it is read/write after all.

You’ll need to set up a directory, say /home, and you’ll have
to be root to do that. That done you can change owner and
group to your ordinary user account.

And btw I wouldn’t mount it under media, that directory should
be reserved for removable media like CD/DVD or USB memories,
although this is not mandatory, just a good habit. Create a
top level directory on your primary drive, say /mysecond and
use yast>system>partitioner to change the mountpoint to this
directory.

Or, if this space is ment for a specific user, put it somewhere in his home dirrectory.

I think the meaning of these last posts is to learn you that it is not like e.g. MS-DOS and derivates where all disk(partition)s are at the toplevel and each has its own directory tree, in Linux you can put your disk(partition) where you need it anywhere in the directory tree. So it is well worth to meditate a little bit about it. :rolleyes:

Hi
I started from the beginning again. To summarise for those who are not so clued op (like me):
Set the second hard drive to slave.
Check in hardware that the drive is recognised
Use partioner in yast to set to ext3 and set mountpoint.
edit fstab as described above
Set permissions -
go to console and log in as root
chmod 777 directoryname (or filename) (this gives all permissions :root, group & user)
restart computer

Thanks to all who helped me - I am now backing up my home folder !!! :):):slight_smile: