How to mount drive at Google Cloud (Google Compute Engine)?
15,808
When you issue the mount command, check if you are not mounting a whole drive instead of a single partition or try to add the correct partition to the mount command.
(ex.: mount /dev/disk/by-id/scsi-0Google_PersistentDisk_instance-3-part1 /your/mount/location )
Did you had any error messages?
Have you also tried gsutil - Google Cloud Storage Tool?
Related videos on Youtube
Author by
inno.vlad
Updated on September 18, 2022Comments
-
inno.vlad over 1 year
I have runned instance in Google Compute Engine with 120Gb boot drive.
But I'm not able to use it.
1. sudo df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 9.9G 1.1G 8.3G 12% / tmpfs 3.6G 0 3.6G 0% /dev/shm 2. sudo ls -l /dev/disk/by-id/* lrwxrwxrwx. 1 root root 9 Nov 3 09:00 /dev/disk/by-id/google-instance-3 -> ../../sda lrwxrwxrwx. 1 root root 10 Nov 3 09:00 /dev/disk/by-id/google-instance-3-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 9 Nov 3 09:00 /dev/disk/by-id/scsi-0Google_PersistentDisk_instance-3 -> ../../sda lrwxrwxrwx. 1 root root 10 Nov 3 09:00 /dev/disk/by-id/scsi-0Google_PersistentDisk_instance-3-part1 -> ../../sda1 3. sudo fdisk -l Disk /dev/sda: 134.2 GB, 134217728000 bytes 4 heads, 32 sectors/track, 2048000 cylinders Units = cylinders of 128 * 512 = 65536 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x0003b4b9 Device Boot Start End Blocks Id System /dev/sda1 17 163825 10483712+ 83 Linux
I have spended several hours trying to mount it in different ways even have changed instance but unsuccessfully.
UPD: If someone has this issue follow this instruction: https://cloud.google.com/compute/docs/disks#repartitionrootpd
-
Misha Brukman over 9 yearsSee this answer for how to automate the resize process for your VM's boot disks.
-
-
inno.vlad over 9 years1. mount /dev/disk/by-id/scsi-0Google_PersistentDisk_instance-3-part1 /mnt/new - no error messages at all. but no result. If I change to Google_PersistentDisk_instance-3 mount: /dev/sda already mounted or /mnt/new2 busy
-
Pedro Sousa over 9 years@inno.vlad what about error messages? What does
dmesg | tail
shows you right after you try to mount the drive? -
inno.vlad over 9 yearseth0: no IPv6 routers present udev: starting version 147 SELinux: 2048 avtab hash slots, 294585 rules. SELinux: 9 users, 12 roles, 4142 types, 228 bools, 1 sens, 1024 cats SELinux: 81 classes, 294585 rules type=1305 audit(1415009600.895:260): audit_pid=0 old=885 auid=4294967295 ses=4294967295 subj=system_u:system_r:auditd_t:s0 r es=1 type=1305 audit(1415009600.993:261): audit_enabled=0 old=1 auid=0 ses=1 subj=system_u:system_r:auditctl_t:s0 res=1 type=1305 audit(1415009601.015:262): audit_pid=4036 old=0 auid=0 ses=1 subj=system_u:system_r:auditd_t:s0 res=1
-
inno.vlad over 9 years/dev/sda1 on / type ext4 (rw,barrier=0) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0") /dev/sda1 on /mnt/new type ext4 (rw)
-
inno.vlad over 9 yearsits strange answer: mount: /dev/sda already mounted or /mnt/new2 busy because it was new folder and if sda has mounted where is i? (Disk /dev/sda: 134.2 GB, 134217728000 bytes)
-
inno.vlad over 9 yearsFilesystem Size Used Avail Use% Mounted on /dev/sda1 9.9G 1.4G 8.0G 15% / tmpfs 3.6G 0 3.6G 0% /dev/shm /dev/sda1 9.9G 1.4G 8.0G 15% /mnt/new
-
inno.vlad over 9 yearsno. umount: /mnt/new2: not mounted
-
Pedro Sousa over 9 yearsYou have a drive with 134.2GB but you only have one partition with 10GB created. If you want to use more space from that drive, you will have to either re-create sda1 with more blocks, or add new partitions to the disk.
-
Pedro Sousa over 9 yearsNo problem. Glad it works.