Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: can't attach the amd64-install.img file with read-only access



woods%planix.ca@localhost ("Greg A. Woods") writes:

>[   2.0260598] boot device: dk1
>[   2.0260598] opendisk: can't open dev dk1 (30)
>[   2.0260598] root on dk1opendisk: can't open dev dk0 (30)

The wedge always opens the parent device read-write. Reason is
that the parent is opened only once for all wedges, so the mode
needs to allow arbitrary access.

Handling read-only parent devices needs some extra complexity.
If you open a wedge read-only and it's the first open and
opening the parent device read-write fails with EROFS you could
retry to open read-only. If the parent device is already open,
you need to validate the wedge open mode against what the parent
device allowed when it was opened. Shouldn't be that difficult to
implement.


># df
>Filesystem   1K-blocks      Used     Avail %Cap MountedOn
>/dev/dk1       3648078   2641724    823952  76% /
>tmpfs          3907632         8   3907624   0% /tmp
># mount
>/dev/dk1 on / type ffs (local)
>tmpfs on /tmp type tmpfs (local)


The root is mounted read-only when you enter single-user, you also do
not see the device node, e.g. mount shows:

root_device on / type ffs (read-only, local)

The mount gets promoted later to read-write according to the fstab entry.
If the disk is read-only I would guess that mounting read-write fails.
You need a read-only entry in /etc/fstab to stay read-only.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index