我创建了一个TPU-VM实例(不是一个普通的计算实例),并使用以下命令将一个外部磁盘附加到它:
gcloud alpha compute tpus tpu-vm create TPU-VM-NAME \
--zone=europe-west4-a \
--accelerator-type=v3-8 \
--version=v2-alpha \
--data-disk source=[PATH/TO/DISK]现在,我想将该磁盘从TPU-VM中分离出来,但在Google云控制台的VM instances选项卡中找不到该实例(他们将其视为TPU实例,因此不会在其中列出)。我只能在TPU选项卡中找到它,但在TPU选项卡中,我无法将磁盘编辑出实例。
我也试过使用这个命令,但它不起作用:
gcloud compute instances detach-disk INSTANCE-NAME --disk=DISK-NAME它说找不到资源(projects/project-name/zone/instances/tpu-vm-name)。
发布于 2021-07-28 21:56:53
目前不支持为TPU VM体系结构分离磁盘。
发布于 2021-08-11 11:31:19
实际上,它是根据这个tutorial支持的!当您在TPU虚拟机中时,您需要遵循此配置。在分离磁盘之前,不要忘记创建磁盘,并确保您在TPU虚拟机和磁盘中使用相同的计费帐户。否则,系统将抛出INTERNAL ERROR。
sudo lsblk
#Find the disk here, and the device name. Most likely it will be "sdb". Given that is correct, format the disk with this command:
sudo mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdb
#Mount the disk - and give everyone
sudo mkdir -p /mnt/disks/flaxdisk
sudo mount -o discard,defaults /dev/sdb /mnt/disks/flaxdisk
sudo chmod a+w /mnt/disks/flaxdisk
#Configure automatic mount on restarts
sudo cp /etc/fstab /etc/fstab.backup
#Find the uid of the disk - you need this value in the following steps
sudo blkid /dev/sdb
#Add this to /etc/fstab with the correct uuid
UUID=52af08e4-f249-4efa-9aa3-7c7a9fd560b0 /mnt/disks/flaxdisk ext4 discard,defaults,nofail 0 2https://stackoverflow.com/questions/68495367
复制相似问题