Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
329 views
in Technique[技术] by (71.8m points)

linux - GCP emergency mode not available fs '/' is on read only

My fs '/' is on ro mode and I cannot umount it and remount it in rw. All command like a simple touch test give me the error

fs is mounted on read only

I have tried to change the fstab to add rw, but I cannot edit any file in all fs '/', seems all fs is impacted

Can I boot on emergency mode to change the fstab ? I cannot found interactive console like in VMware.

Thanks for help.

question from:https://stackoverflow.com/questions/65833266/gcp-emergency-mode-not-available-fs-is-on-read-only

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can detach the disk from the VM using the below command:

gcloud compute instances detach-disk my-instance --disk=my-disk --zone us-central1-a

Attached it to any working VM as a secondary disk using the below command:

gcloud compute instances attach-disk example-instance  --disk DISK --zone us-central1-a

After mounting the disk you are able to change fstab file. After that detach from this vm again re-attach to original VM.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...