0

Firstly, I am 20 years windows user. Recently, i decided move to unix and buy a centos server for my work.

Today, i found that I missed a 3TB disk drive, it does not show on my system.

I dont know how to describe it, so please see bellow:

lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sdb       8:16   0 111.8G  0 disk
├─sdb1    8:17   0    16G  0 part
│ └─md0   9:0    0    16G  0 raid1 [SWAP]
├─sdb2    8:18   0   512M  0 part
│ └─md1   9:1    0   512M  0 raid1 /boot
└─sdb3    8:19   0  95.3G  0 part
  └─md2   9:2    0 190.6G  0 raid6 /
sdc       8:32   0   2.7T  0 disk
├─sdc1    8:33   0    16G  0 part
│ └─md0   9:0    0    16G  0 raid1 [SWAP]
├─sdc2    8:34   0   512M  0 part
│ └─md1   9:1    0   512M  0 raid1 /boot
└─sdc3    8:35   0  95.3G  0 part
  └─md2   9:2    0 190.6G  0 raid6 /
sdd       8:48   0   2.7T  0 disk
├─sdd1    8:49   0    16G  0 part
│ └─md0   9:0    0    16G  0 raid1 [SWAP]
├─sdd2    8:50   0   512M  0 part
│ └─md1   9:1    0   512M  0 raid1 /boot
└─sdd3    8:51   0  95.3G  0 part
  └─md2   9:2    0 190.6G  0 raid6 /
sda       8:0    0 111.8G  0 disk
├─sda1    8:1    0    16G  0 part
│ └─md0   9:0    0    16G  0 raid1 [SWAP]
├─sda2    8:2    0   512M  0 part
│ └─md1   9:1    0   512M  0 raid1 /boot
└─sda3    8:3    0  95.3G  0 part
  └─md2   9:2    0 190.6G  0 raid6 /

sdc & sdd have actual length is 2.7T, but their child total is about 330GB, where is 2400GB remaining ?

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/md2        188G  2.8G  176G   2% /
tmpfs            16G     0   16G   0% /dev/shm
/dev/md1        496M   38M  433M   8% /boot

If you want to know any information, please tell me. Thank you.

trinvh
  • 101
  • 2

1 Answers1

2

You need these tools:

  • Install "lsscsi". It's very good to find out what drives you actually have.
  • Install "disktype". If you point it on a drive you'll be able to see what is actually there.
  • Use "cat /proc/mdstat" to see what's up with your software raid devices (/dev/md*)

Looks like you have:

  • /dev/md0 raid1 from 4 16Gb first partitions of every drive used for swap

  • /dev/md1 rais1 from 4 512Mb second partitions of every drive used for boot (give at least 1Gb!)

  • /dev/md3 raid6 from 4 95Gb third partitions of every drive used for root

Ok, this setup is rather nice.

Drives:

  • sda 111.8G
  • sdb 111.8G
  • sdc 2.7T
  • sdd 2.7T

See? Two small drives used at full capacity and two large drives used only a little. The third partitions of the large drives have the same size as the third partitions of the small drives and the rest of the space if not mapped to any partition.

I would make:

  • /dev/md0 boot - raid1 of first partition of two small dists
  • /dev/md1 swap - raid1 of second partition of two small dists
  • /dev/md2 root - raid1 of third partition of two small dists
  • /dev/md3 home - raid1 of the first partitions of both large disks

But you will not be able to remap the drives like this without reinstalling the system or backing it up, remapping drives and restoring the data back.

If you want just get you space back you can use "fdisk" to create forth partitions up to the end of both large drives. Then reboot to make the kernel see these partitions. Then connect them to /dev/md3 raid1 and use this raid for /home or whatever you need.

Dmitry Ilyin
  • 573
  • 2
  • 5
  • Thank you for suggestion. Everything i want is getting space back, without losing current data. Sorry for my ugly question, how to mount /dev/md3 (after create fourth partition) to /home, or can you show me instructions, please ? Thank you. – trinvh Jun 21 '16 at 06:41