B
B
bozuriciyu2019-11-13 22:38:57
linux
bozuriciyu, 2019-11-13 22:38:57

Why is a read-only disk not mounted?

The tutorial only works with a read-write disk https://cloud.google.com/compute/docs/disks/add-pe...
If I connected the disk as read-only, this is what I get

sudo mount -o discard,defaults /dev/sdb /folder/directory
mount: /dev/sdb is write-protected, mounting read-only
mount: cannot mount /dev/sdb read-only

How to connect a read-only drive to Google Cloud? And probably in Linux in general. It has Debian 9.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitaly Karasik, 2019-11-14
@bozuriciyu

The tutorial only works with a read-write disk

The tutorial is normal, but you need a minimal understanding of what disk, partition, mount, mountpoint, ...
UPDATE: the question turned out to be not so simple, on the way I learned a new thing - if the ext3 filesystem is not mounted correctly, then you need to turn off the journal during read-only mount , otherwise we get an error.
Solution:
mount -o ro, noload /dev/sdc /folder/directory

R
Radjah, 2019-11-14
@Radjah

> /dev/sdb
There are no partitions at all?

S
SagePtr, 2019-11-13
@SagePtr

Is there a file system on the disk?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question