0

CentOS 6.5, Software RAID1 with 2 x 160GB

As I'm running out of disk space, I want to add a third disk (1TB) that will be used for non-critical data.

How can I add a extra sata disk to the OS without touching the RAID ?

extra info:

Filesystem            Size  Used Avail Use% Mounted on
/dev/md1               39G   13G   25G  34% /
proc                     0     0     0   -  /proc
sysfs                    0     0     0   -  /sys
devpts                   0     0     0   -  /dev/pts
tmpfs                  24G     0   24G   0% /dev/shm
/dev/md2              104G   81G   18G  83% /vz


[root@~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sdb3[1] sda3[0]
      110143360 blocks super 1.1 [2/2] [UU]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md1 : active raid1 sdb2[1] sda2[0]
      40959872 blocks super 1.0 [2/2] [UU]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md0 : active raid1 sdb1[1] sda1[0]
      5115840 blocks super 1.1 [2/2] [UU]

unused devices: <none>

2 Answers 2

1

Just use the disk as a normal disk. Just make sure it is not loaded by the boot manager. I guess it will show up as /dev/sdc.

Just partition and format, then mount.

fdisk /dev/sdc
[...create a partition...]

mkfs.ext4 /dev/sdc1
mkdir /your/mount/point
mount /dev/sdc1 /your/moint/point
2
  • Thank you for the fast response. So, all I have to do is add the disk, format / mkfs and the add it to fstab, like any other normal disk. Feb 24, 2014 at 10:00
  • Yes, I guess so. Because to me it looks like a normal disk, doesn't it?
    – SamK
    Feb 24, 2014 at 17:15
0

Just connect new disk. If your motherboard supports hot swap, you will see some messages in dmesg. Then new disk will appear in /proc/partitions as /dev/sdc (probably). So, you can easily create partitions using fdisk /dev/sdc.

Once you have partitions ready, you have to create some filesystem - depends on your preferences: mkfs.xfs /dev/sdc1 (disk name + partition number) and finaly, you can mount it wherever you want (mount /dev/sdc1 /some/place/)

I'd suggest you to add another row to your /etc/fstab to get it mounted after reboot.

2
  • in fstab the entries are preceeded with UUID... is it necessary to fill in that field ? (example: UUID=b41b7142-1f2b-4b96-8c9c-edeadac04ba6 /vz ext4 defaults 1 2 ) Feb 24, 2014 at 10:19
  • Using UUID's are better than using device names. Get the UUID of your device with the blkid command.
    – SamK
    Feb 24, 2014 at 17:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .