1
[root@server]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  1.8T  0 disk
├─sda1   8:1    0    1M  0 part
├─sda2   8:2    0  500M  0 part /boot
├─sda3   8:3    0   10G  0 part /
├─sda4   8:4    0    1K  0 part
└─sda5   8:5    0  1.8T  0 part /home
sdb      8:16   0  1.8T  0 disk
sdc      8:32   0  1.8T  0 disk
sdd      8:48   0  1.8T  0 disk

I need to mount the 3 disks ( sdb, sdc ,sdd ) in '/home/' that located in partition sda5, so I can get all usable storage in server ( 7.2 Tb ) in one directory. what I have to do first?

Should I start by creating a new partition in each of these 3 devices, then I can later mount the 3 partitions to /home? or I can directly mount the 3 devices in partition /home ?

1

you must use lvm to do this.

1 - pvcreate

pvcreate /dev/sda5
pvcreate /dev/sdb
...

2 - vgcreate (this create a "common space" for all volumes)

vgcreate vghome /dev/sda5 /dev/sdb /dev/sdc /dev/sdd

3 - lvcreate (this add all together)

lvcreate -n lvhome -l 100%FREE

4 - filesystem must be formated

mkfs -t ext3 /dev/vghome/lvhome

5 - mount

mount /dev/vghome/lvhome /home

please note

  • all previous content of /home will be erased.
  • a failure of a single disk will make /home unavailable

to procedd unmount /dev/sda5 (you may need to comment /etc/fstab and reboot). beware pvcreate will destroy (after confirmation) all data in /home.

  • I don't have LVM . It doesn't work without LVM ? – Zorba Jan 29 '17 at 9:17
  • you have zfs ? which zfs will give you a path ? – Archemar Jan 29 '17 at 15:10
  • @Zorba There are other ways than LVM, but LVM is the easiest and most flexible method, so you should use LVM. LVM is a standard Linux feature, so you do have LVM if you have CentOS or any other Linux distribution. – Gilles Jan 29 '17 at 23:14
-2
  • You should create partitions on all the new drives by using either fdisk or gdisk utility.

-then format them by using a mkfs command (e.g., mkfs -t ext4 /dev/disk1).

  • then mount them with mount command (e.g., mount -t ext4 /dev/disk1 /mnt/mount).

  • Finally, make sure you add your new drive entries to /etc/fstab file, so they get mounted automatically upon reboot.

  • 3
    I fail to see how this will add disk space as OP request. – Archemar Jan 29 '17 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.