I mount a device mount /dev/xvdf /mnt/mongo
and verify the mount using df-h
:
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 955M 6.9G 12% /
tmpfs 299M 44K 299M 1% /dev/shm
/dev/xvdf 20G 589M 19G 4% /mnt/mongo
But now I'm trying to figure out how to make it auto mount on boot.
I understand I need to add a new entry to /etc/fstab
, so I perform:
$ sed -i '$ a\/dev/xvdf /mnt/mongo xfs defaults 1 1' /etc/fstab
But, after reboot, it seems that the auto mount didn't work. The device didn't appear in the df -h
list.
Should I not use the sed
to add the entry? Is the entry I entered incorrect?
sudo
? Also the question is probably best directed at the *nix Q&A Forumnano /etc/fstab
as root, orsudo nano /etc/fstab
if sudo is enabled or if you are using ubuntu.sudo
. I didn't knownano
, it helped me for editing the file, thanks!dmesg
show? (And what Linux system are you using?)