GCP Filestore is a managed file storage, the competitor equivalents being: AWS’s EFS and Azure Files. While following the great GCP documentation on how to mount the Filestore NFS managed disk to a VM, I faced the following error:
mount: wrong fs type, bad option, bad superblock on <NFS_IP_address>:/mnt/data, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so.
- GCP Filestore
- GCP VM
On CentOS / RHEL, run the following command:
sudo yum install -y nfs-utils
sudo apt install -y nfs-common
If you are dealing with CIFS instead, run:
sudo apt install -y cifs-utils
On a side note, don’t forget to add the NFS mount entry in
/etc/fstab, because on the next VM reboot, the mounted disk will “disappear”. Example
/etc/fstab NFS entry:
<NFS_IP_ADDRESS>:/data /mnt/data nfs defaults 0 0.
To check your current NFS options, run:
Related post: NFS mounting in /etc/fstab and verification.
If you have any other great solutions on this topic, or even issues, feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.