# Need Help with 2 HDD [ SOLVED ]

## sleepingsun

In first time when I install gentoo i have one HDD 250gb and works perfect and its ATA hard drive and working great ! 

ATA HDD is 

/dev/hda1

/dev/hda2

/dev/hda3

and tight now i buy SATA Maxtor 160gb HDD ! 

and its visible like

/dev/sda1

But when i wont to mount tham or copy anything i get massage access denied ! 

Its formated with fdisk  and created with fdisk like /dev/sda1 and its linux partition ext3 ! 

Need help how is posible to mount automaticly like /dev/hda ? 

And also writable !Last edited by sleepingsun on Wed May 28, 2008 6:05 pm; edited 1 time in total

----------

## Keruskerfuerst

Output of fdisk -l?

/etc/fstab?

----------

## cyrillic

... and also the output of

```
# mount

# df -hT 
```

----------

## sleepingsun

fdisk -l

```
localhost ~ # fdisk -l

Disk /dev/hda: 251.0 GB, 251000193024 bytes

255 heads, 63 sectors/track, 30515 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x10b810b7

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1               1           5       40131   83  Linux

/dev/hda2               6          68      506047+  82  Linux swap / Solaris

/dev/hda3              69       20515   164240527+  83  Linux

/dev/hda4   *       20516       30515    80325000    7  HPFS/NTFS

Disk /dev/sda: 163.9 GB, 163928604672 bytes

255 heads, 63 sectors/track, 19929 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x7ad77418

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1               1       19929   160079661   83  Linux

Disk /dev/dm-0: 163.9 GB, 163921572864 bytes

255 heads, 63 sectors/track, 19928 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table
```

FSTAB

```
 /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't

# needed; notail increases performance of ReiserFS (at the expense of storage

# efficiency).  It's safe to drop the noatime options if you want and to

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda1               /boot           ext2            defaults,noatime                        1 2

/dev/hda2               none            swap            sw                                      0 0

/dev/hda3               /               ext3            noatime                                 0 1

proc                    /proc           proc            nodev,nosuid,noexec                     0 0

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec                     0 0

/dev/fd0                /mnt/floppy     auto            noauto                                  0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

# shm                   /dev/shm        tmpfs           nodev,nosuid,noexec                     0 0
```

mount

```

localhost ~ # mount

/dev/hda3 on / type ext3 (rw,noatime)

proc on /proc type proc (rw,noexec,nosuid,nodev)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)

udev on /dev type tmpfs (rw,nosuid)

devpts on /dev/pts type devpts (rw,nosuid,noexec)

/dev/hda1 on /boot type ext2 (rw,noatime)

shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)

usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

/dev/hda4 on /media/disk type ntfs (rw,nosuid,nodev,uid=0,utf8)
```

df -hT

```
localhost ~ # df -hT

Filesystem    Type    Size  Used Avail Use% Mounted on

/dev/hda3     ext3    155G   28G  119G  19% /

udev         tmpfs     10M  184K  9.9M   2% /dev

/dev/hda1     ext2     38M   11M   26M  31% /boot

shm          tmpfs    1.8G     0  1.8G   0% /dev/shm

/dev/hda4     ntfs     77G  9.4G   68G  13% /media/disk
```

----------

## cyrillic

 *fdisk -l wrote:*   

> Disk /dev/sda: 163.9 GB ...
> 
> Disk /dev/dm-0: 163.9 GB ...

 

It looks like device-mapper has hijacked your new 160GB harddrive, and that is why you don't have permission to use it like a normal harddrive.

----------

## sleepingsun

And what to do to fix this ?

----------

## cyrillic

Unless you are doing something fancy like RAID, LVM, EVMS, or harddrive encryption, you probably don't even need device-mapper installed on your system.

You can get rid of the userspace part here

```
# emerge -C device-mapper 
```

and the kernel part here

```
Device Drivers  --->

  Multiple devices driver support (RAID and LVM)  --->

    < >   Device mapper support 
```

----------

## sleepingsun

 *Quote:*   

> emerge -C device-mapper

 

```
localhost ~ # emerge -C device-mapper

--- Couldn't find 'device-mapper' to unmerge.

>>> No packages selected for removal by unmerge
```

I'm using udev !

----------

## sleepingsun

Ok i found device mapper in kernel and i remove tham ! Now i have this situation ! 

fdisk -l 

```
localhost ~ # fdisk -l

Disk /dev/hda: 251.0 GB, 251000193024 bytes

255 heads, 63 sectors/track, 30515 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x10b810b7

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1               1           5       40131   83  Linux

/dev/hda2               6          68      506047+  82  Linux swap / Solaris

/dev/hda3              69       20515   164240527+  83  Linux

/dev/hda4   *       20516       30515    80325000    7  HPFS/NTFS

localhost ~ #
```

FSTAB is untouched like in first post ! 

mount

```
localhost ~ # mount

/dev/hda3 on / type ext3 (rw,noatime)

proc on /proc type proc (rw,noexec,nosuid,nodev)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)

udev on /dev type tmpfs (rw,nosuid)

devpts on /dev/pts type devpts (rw,nosuid,noexec)

/dev/hda1 on /boot type ext2 (rw,noatime)

shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)

usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

/dev/hda4 on /media/disk type ntfs (rw,nosuid,nodev,uid=0,utf8)

localhost ~ #
```

df-hT

```
localhost ~ # df -hT

Filesystem    Type    Size  Used Avail Use% Mounted on

/dev/hda3     ext3    155G   28G  119G  19% /

udev         tmpfs     10M  164K  9.9M   2% /dev

/dev/hda1     ext2     38M   11M   26M  31% /boot

shm          tmpfs    1.8G     0  1.8G   0% /dev/shm

/dev/hda4     ntfs     77G  9.4G   68G  13% /media/disk
```

And also my HDD SATA is not visible right now !

----------

## cyrillic

If "fdisk -l" is not showing your SATA drive, then maybe you removed the driver for your SATA controller when recompiling the kernel.

Can you post the output of "lspci" ?

----------

## Keruskerfuerst

1. The extended partition on the second drive does not contain logical drives.

2. /etc/fstab does not contain mount points for the second drive.

----------

## sleepingsun

 lspci   

```
localhost ~ # lspci         

00:00.0 Host bridge: Intel Corporation E7205 Memory Controller Hub (rev 03)

00:01.0 PCI bridge: Intel Corporation E7505/E7205 PCI-to-AGP Bridge (rev 03)

00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 02)

00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 82)

00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 02)

00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)

00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation NV31 [GeForce FX 5600XT] (rev a1)

02:01.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 07)

02:01.1 Input device controller: Creative Labs SB Live! Game Port (rev 07)

02:03.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)

02:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

02:09.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)

02:0a.0 RAID bus controller: Silicon Image, Inc. SiI 3112 [SATALink/SATARaid] Serial ATA Controller (rev 02)

02:0c.0 RAID bus controller: Promise Technology, Inc. PDC20276 (MBFastTrak133 Lite) (rev 01)

localhost ~ # 
```

I dont put anything on fstab becouse i think that udev do that automaticly !

What suggest to do  ?

----------

## cyrillic

Here are the three controllers that you could plug a harddrive into

```
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)

02:0a.0 RAID bus controller: Silicon Image, Inc. SiI 3112 [SATALink/SATARaid] Serial ATA Controller (rev 02)

02:0c.0 RAID bus controller: Promise Technology, Inc. PDC20276 (MBFastTrak133 Lite) (rev 01)  
```

And here are the drivers you would need for those controllers

```
Device Drivers  --->

  SCSI device support  --->

    <*> SCSI disk support

  <*> Serial ATA (prod) and Parallel ATA (experimental) drivers  --->

    <*>   Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support

    <*>   Silicon Image SATA support

    <*>   Promise PATA 2027x support 
```

----------

## sleepingsun

Thanks ! That helps and workin excelent ! 

Thanks a lot !

----------

