Skip to content

Error during copy: Read-only file system (os error 30) #1237

@Zocker1999NET

Description

@Zocker1999NET

I can certainly reproduce the following error now on one of my systems on "bare metal", which seems weird because it should not happen.

I run following command: disko-install --flake 'github:Zocker1999NET/server/gaming-setup-steamos#steamos.pc.6nw.de' --disk main /dev/sda --mode format (IMO the config should be irrelevant for this issue, but just in case)

Every time I executed this for the last 4 times, disko-install succeeds to build the config, then starts to partition the device, then starts the manual transfer of the /nix/store, and then fails to complete because (last log lines):

+ device=/dev/sda
+ efiGptPartitionFirst=1
+ type=gpt
+ device=/dev/disk/by-partlabel/disk-main-root
+ extraArgs=()
+ declare -a extraArgs
+ format=ext4
+ mountOptions=('defaults')
+ declare -a mountOptions
+ mountpoint=/
+ type=filesystem
+ findmnt /dev/disk/by-partlabel/disk-main-root /mnt/disko-install-root/
+ mount /dev/disk/by-partlabel/disk-main-root /mnt/disko-install-root/ -t ext4 -o defaults -o X-mount.mkdir
+ destroy=1
+ device=/dev/sda
+ imageName=main
+ imageSize=2G
+ name=main
+ type=disk
+ device=/dev/sda
+ efiGptPartitionFirst=1
+ type=gpt
+ device=/dev/disk/by-partlabel/disk-main-ESP
+ extraArgs=()
+ declare -a extraArgs
+ format=vfat
+ mountOptions=('defaults')
+ declare -a mountOptions
+ mountpoint=/boot
+ type=filesystem
+ findmnt /dev/disk/by-partlabel/disk-main-ESP /mnt/disko-install-root/boot
+ mount /dev/disk/by-partlabel/disk-main-ESP /mnt/disko-install-root/boot -t vfat -o defaults -o X-mount.mkdir
+ rm -rf /tmp/tmp.5HpXTbdhe2
Copying store paths
[################################################################################################################>---------------------------------------------------]    2.66 GiB / 3.87 GiB    |  69% |  35.01 MiB/s  | 00:00:35 remaining00:37:52 [ERROR] Received error: Error during copy: Read-only file system (os error 30)
00:37:52 [ERROR] Error copying: "/nix/store/hscvhz3bg5yzagpj2hgxi8y4f4zqz4ny-nix-2.31.2-man/share/man/man1/nix-env-uninstall.1.gz" -> "/mnt/disko-install-root/nix/store/hscvhz3bg5yzagpj2hgxi8y4f4zqz4ny-nix-2.31.2-man/share/man/man1/nix-env-uninstall.1.gz"; aborting.
00:37:52 [ERROR] Error copying: "/nix/store/hscvhz3bg5yzagpj2hgxi8y4f4zqz4ny-nix-2.31.2-man/share/man/man1/nix3-store-repair.1.gz" -> "/mnt/disko-install-root/nix/store/hscvhz3bg5yzagpj2hgxi8y4f4zqz4ny-nix-2.31.2-man/share/man/man1/nix3-store-repair.1.gz"; aborting.
00:37:52 [ERROR] Error copying: "/nix/store/hscvhz3bg5yzagpj2hgxi8y4f4zqz4ny-nix-2.31.2-man/share/man/man1/nix3-derivation-show.1.gz" -> "/mnt/disko-install-root/nix/store/hscvhz3bg5yzagpj2hgxi8y4f4zqz4ny-nix-2.31.2-man/share/man/man1/nix3-derivation-show.1.gz"; aborting.
Error: Error during copy: Read-only file system (os error 30)
00:37:52 [ERROR] Error copying: "/nix/store/hscvhz3bg5yzagpj2hgxi8y4f4zqz4ny-nix-2.31.2-man/share/man/man1/nix3-flake-init.1.gz" -> "/mnt/disko-install-root/nix/store/hscvhz3bg5yzagpj2hgxi8y4f4zqz4ny-nix-2.31.2-man/share/man/man1/nix3-flake-init.1.gz"; aborting.
Loading nix database
installing the boot loader...
chroot: failed to run command ‘/nix/var/nix/profiles/system/activate’: No such file or directory
chroot: failed to run command ‘/nix/var/nix/profiles/system/sw/bin/bash’: No such file or directory
disko-install failed

I am very certain that the drive I’m using is good for two reasons: a) I do not run into problems when running e.g. pv /dev/zero > /dev/sda. b) The kernel (dmesg) does log no error whatsover while disko-install fails.

And, to add, I can also reproduce this issue in a NixOS test of my subproject disko-install-menu, more certain in the installDefault test. While there the issue only occurs roughly every 2nd or 3rd run, the issue occurs on 3 completely different systems I am able to run this test on.
For a long time, I thought this issue is limited to a quirky misbehavior of qemu/KVM/…, but now that I see this issue with "real" hardware, I do no longer think that this is the case here.

And also, as well as on "real" hardware & when running as a NixOS test, the installation does not always fail at the same files, but always in a similar ballpark of gibibytes transferred.

I have no idea how to further debug this, therefore I decided to report this here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions