加入收藏 | 设为首页 | 会员中心 | 我要投稿 大连站长网 (https://www.0411zz.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

linux – 如何在Google Cloud(Google Compute Engine)上安装驱动

发布时间:2021-05-24 16:24:21 所属栏目:Linux 来源:网络整理
导读:我在Google Compute Engine中使用120Gb启动驱动器运行了实例. 但我无法使用它. 1. sudo df -hFilesystem Size Used Avail Use% Mounted on/dev/sda1 9.9G 1.1G 8.3G 12% /tmpfs 3.6G 0 3.6G 0% /dev/shm2. sudo ls -l /dev/disk/by-id/*lrwxrwxrwx. 1 root

我在Google Compute Engine中使用120Gb启动驱动器运行了实例.

但我无法使用它.

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

我花了好几个小时尝试以不同的方式安装它,即使已更改实例但未成功.

UPD:如果有人遇到此问题,请按照以下说明操作:https://cloud.google.com/compute/docs/disks#repartitionrootpd

解决方法

发出mount命令时,请检查是否未安装整个驱动器而不是单个分区,或尝试将正确的分区添加到mount命令.

(例如:mount / dev / disk / by-id / scsi-0Google_PersistentDisk_instance-3-part1 / your / mount / location)

你有没有错误信息?

你有没有试过gsutil – Google Cloud Storage Tool?

(编辑:大连站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!