NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTloop0 7:0 0 91.1M 1 loop /snap/core/6531loop1 7:1 0 57M 1 loop /snap/google-cloud-sdk/76loop2 7:2 0 56.7M 1 loop /snap/google-cloud-sdk/75loop3 7:3 0 89.3M 1 loop /snap/core/6673sda 8:0 0 10G 0 disk├─sda1 8:1 0 9.9G 0 part /├─sda14 8:14 0 4M 0 part└─sda15 8:15 0 106M 0 part /boot/efi
sdb 8:32 0 1G 1 disksdc 8:32 0 2G 1 disk
$ lsblk -f /dev/sdcNAME FSTYPE LABEL UUID MOUNTPOINTsdb ext4 142b28fd-c886-4182-892d-67fdc34b522a
$ sudo mkdir /mnt/data$ sudo mount /dev/sdc /mnt/datamount: /mnt/data: cannot mount /dev/sdb read-only.
$ mount | grep dev\/sd/dev/sda1 on / type ext4 (rw,relatime,data=ordered)/dev/sda15 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)/dev/sdb on /mnt/infra type ext4 (ro,relatime,discard,data=ordered)
$ sudo fdisk -lDisk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisklabel type: gptDisk identifier: 1D8CAF38-A6DB-4E55-B417-D9B0E481A3A5Device Start End Sectors Size Type/dev/sda1 227328 20971486 20744159 9.9G Linux filesystem/dev/sda14 2048 10239 8192 4M BIOS boot/dev/sda15 10240 227327 217088 106M EFI SystemPartition table entries are not in disk order.Disk /dev/sdb: 1 GiB, 1073741824 bytes, 2097152 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisk /dev/sdc: 2 GiB, 2147483648 bytes, 4194304 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytes
--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/9f1c64e8-e5c8-4f0f-b4bc-97a67f8c5ebc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ext4 file system and no partition table. If you resize the zonal persistent disk later, you can resize the file system without having to modify disk partitions.sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/[DEVICE_ID]
I just followed the instructions on here: https://cloud.google.com/compute/docs/disks/add-persistent-diskFormat the disk. You can use any file format that you need, but the most simple method is to format the entire disk with a singleext4file system and no partition table. If you resize the zonal persistent disk later, you can resize the file system without having to modify disk partitions.sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/[DEVICE_ID]
To unsubscribe from this group and stop receiving emails from it, send an email to gce-dis...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/9f1c64e8-e5c8-4f0f-b4bc-97a67f8c5ebc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Justin Reiners
Hi DanAh - thank you - it's the `noload` option which I was missing!My intention is to mount it read-only.Whilst it would be more correct to specify `-o ro` as an option to mount, if I omit that, the drive will typically still mount, just in read-only mode (and mount will emit a warning to that effect)...However, and I think this is what bit me in the a**, I see in the manpage for mount the following for `noload`Note that, depending on the filesystem type, state and kernel behavior, the system may still write to the device. For example, ext3 and ext4 will replay the journal if the filesystem is dirty.Presumably the filesystem was dirty, and the system tried to write to the disk during mounting, which is why it failed?This theory would support other observed behaviour, which was I reattached the disk in read/write mode, then detached it and reattached it again in read-only mode... and now I can mount the disk.Would you agree that this is likely what happened?Thanks for the help!Kind regardsSteve
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/6a535cd1-691f-4117-9961-e74a8236312e%40googlegroups.com.
Note that, depending on the filesystem type, state and kernel behavior, the system may still write to the device. For example, ext3 and ext4 will replay the journal if the filesystem is dirty.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/6a535cd1-691f-4117-9961-e74a8236312e%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/f4d09e86-b2c8-4dc7-a85f-ccae994093d2%40googlegroups.com.