0

I've already attached two volumes to my EC2 instance and configured RAID0 for them. After a reboot, the volumes didn't re-attach. I thought I had configured them to attach on reboot in fstab but they didn't attach.

Here's the output from lsblk:

NAME    MAJ:MIN RM SIZE RO TYPE  MOUNTPOINT
xvda    202:0    0   8G  0 disk  
└─xvda1 202:1    0   8G  0 part  /
xvdf    202:80   0   1T  0 disk  
└─md127   9:127  0   2T  0 raid0 
xvdg    202:96   0  25G  0 disk  /journal
xvdh    202:112  0  50G  0 disk  /log
xvdi    202:128  0   1T  0 disk  
└─md127   9:127  0   2T  0 raid0 

But if I run df -h, xvdf and xvdi aren't there:

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.8G  1.4G  6.3G  18% /
devtmpfs         15G   80K   15G   1% /dev
tmpfs            15G     0   15G   0% /dev/shm
/dev/xvdg        25G   45M   24G   1% /journal
/dev/xvdh        50G   53M   47G   1% /log

Where did I go wrong? I'm using Amazon Linux.

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300

2 Answers2

0

I needed to reference the volume as /dev/md127 in fstab.

0

You have to simply mount "md127" to any folder. You can do that by below command.

mount -t ext4 /dev/md0 /opt

here I have mounted "md127" to /opt/ folder

RalfFriedl
  • 3,108
  • 4
  • 13
  • 17