GCP: I've created a snapshot of an VM using boot disk, and then i created a volume from this snapshot and attached and mount the volume to another VM. In the mount path, i don't find the /usr/bin directory.
The VM from which i've created the snapshot is running on COS(container optimize operating system).
/usr/bincontains executable files that are not part of the core operating system. These are considered to be system wide binaries. Since certain directories are excluded from snapshots, files belonging to these users will remain in the file system./bincontains executable files that are part of the core operating system. These files need to be accessible before/usrgets mounted. (for instance, the mount command is in/bin/mount).If the snapshot was created from a boot disk that was formatted with a filesystem that does not include the
/usr/bindirectory, then the volume will not have the/usr/bin directoryeither. Reformat the volume with a filesystem that includes the /usr/bin directory. You can do this using the mkfs.ext4 command from the Medium blog written by Peter Hou. Also,you can refer to the linode community page replies from bellis and dwfreed for more details.Once the volume has been reformatted, you can mount it again and the
/usr/bin directorywill be present.