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.

up vote 0 down vote accepted

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

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

  • But that has to be done after every reboot, it's better to add a line to /etc/fstab. – RalfFriedl Oct 11 at 13:09

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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