LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   adding 2nd internal HD to debian server (http://www.linuxquestions.org/questions/linux-hardware-18/adding-2nd-internal-hd-to-debian-server-4175450130/)

Dobbelme 02-14-2013 09:21 AM

adding 2nd internal HD to debian server
 
Hi,

i own a small debian wheezy server, containing 2 internal HD's, 1 USB 16Gb disk, and one 1TB USB drive.

i noriced, by using the command df -h, that my 2nd HD is not been mounted to the system.

Code:

/dev# df -h
Bestandssysteem                                        Grootte Gebruikt Besch Geb% Aangekoppeld op
rootfs                                                    917G      51G  820G  6% /
udev                                                      10M        0  10M  0% /dev
tmpfs                                                      25M    1,3M  24M  6% /run
/dev/disk/by-uuid/9e8f4419-f55b-4376-b273-df3318b4c4d2    917G      51G  820G  6% /
tmpfs                                                    5,0M        0  5,0M  0% /run/lock
tmpfs                                                      50M        0  50M  0% /run/shm
/dev/sdc1                                                  15G    166M  15G  2% /home/X/backup
/dev/sdd1                                                917G    200M  871G  1% /home/X/disk2

/dev/sdc1 is the 16Gb USB drive
/dev/sdd1 is my 1TB usb drive

sfdisk -l show's:
Code:

Disk /dev/sda: 121601 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/sda1  *      0+    31-    31-    248832  83  Linux
/dev/sda2        31+ 121508- 121478- 975764480  83  Linux
/dev/sda3    121508+ 121601-    93-    746497    5  Extended
/dev/sda4          0      -      0          0    0  Empty
/dev/sda5    121508+ 121601-    93-    746496  82  Linux swap / Solaris

Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/sdb1          0+ 121601- 121602- 976760833    5  Extended
/dev/sdb2          0      -      0          0    0  Empty
/dev/sdb3          0      -      0          0    0  Empty
/dev/sdb4          0      -      0          0    0  Empty
/dev/sdb5          0+ 121601- 121602- 976760832  83  Linux

Disk /dev/sdc: 1949 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/sdc1          0+  1948    1949-  15655311  83  Linux
/dev/sdc2          0      -      0          0    0  Empty
/dev/sdc3          0      -      0          0    0  Empty
/dev/sdc4          0      -      0          0    0  Empty

Disk /dev/sdd: 121601 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/sdd1          0+ 121600  121601- 976760031+  7  HPFS/NTFS/exFAT
/dev/sdd2          0      -      0          0    0  Empty
/dev/sdd3          0      -      0          0    0  Empty
/dev/sdd4          0      -      0          0    0  Empty

and parted /dev/sdb print all shows:
Code:

Model: ATA SAMSUNG HD105SI (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size    Type      File system  Flags
 1      1048kB  1000GB  1000GB  extended
 5      1049kB  1000GB  1000GB  logical  ext4


Model: ATA SAMSUNG HD105SI (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size  Type      File system  Flags
 1      1049kB  256MB  255MB  primary                boot
 2      256MB  999GB  999GB  primary
 3      999GB  1000GB  764MB  extended
 5      999GB  1000GB  764MB  logical


Model:  USB DISK 2.0 (scsi)
Disk /dev/sdc: 16,0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size    Type    File system  Flags
 1      32,3kB  16,0GB  16,0GB  primary  ext4


Model: SAMSUNG HD103SJ (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size    Type    File system  Flags
 1      1024B  1000GB  1000GB  primary  ext4

based on this info i am pretty much sure that /dev/sdb1 is my 2nd internal HD.

by performing mkfs.ext4 /dev/sdb1 i should be able to ad a FS to it, and by mounting the device it should be reachable.

my question is, how i am be sure that /dev/sdb1 is truelly my 2nd HD?

i am afraid that i break something by performing the mkfs-command

dilbert_uk 02-14-2013 09:42 AM

Quote:

Originally Posted by Dobbelme (Post 4891530)
based on this info i am pretty much sure that /dev/sdb1 is my 2nd internal HD.

by performing mkfs.ext4 /dev/sdb1 i should be able to ad a FS to it, and by mounting the device it should be reachable.

"sdb" is probably your 2nd drive. "sdb1" is an extended partition. An extended partition is only a container for other partitions.
"sdb" is partitioned in an, at least, unusual way. The only partition that you can try to format is "sdb5".

Dobbelme 02-14-2013 02:48 PM

additional info:
Code:

# fdisk -s /dev/sda2
975764480


TobiSGD 02-16-2013 06:39 AM

Quote:

Originally Posted by Dobbelme (Post 4891530)
my question is, how i am be sure that /dev/sdb1 is truelly my 2nd HD?

As we can see in the output of df, your /-partition has the UUID 9e8f4419-f55b-4376-b273-df3318b4c4d2. Just run
Code:

blkid
as root and search for the UUID to find out which partition (and therefore which disk) is your system disk.


All times are GMT -5. The time now is 05:13 PM.