* HOW to install software to mapped device persistently
@ 2006-06-01 10:11 V.Kukushkin
2006-06-01 14:07 ` Alasdair G Kergon
0 siblings, 1 reply; 2+ messages in thread
From: V.Kukushkin @ 2006-06-01 10:11 UTC (permalink / raw)
To: dm-devel
Hi
All we know the good way to make read-only ROOT device be read-write
looking.
It is the use of dmsetup in initrd. It works perfect. But ..
Question1: HOW to install software to this mapped device persistently ?
For example, if you need to upgrade something and ROOT device is read-write
in fact (e.g. flash) but used as read-only for safety.
I tried to do this by sequence of commands:
(/dev/hdc1 "snapshotted" to / by devmapper)
# mount /dev/hdc1 /mnt/disk
# chroot /mnt/disk
# rpm -Uv <pkg> or whateveer else
# exit
# umount /mnt/disk
Of course, my changes were not seen from "/" because mapper know nothing
about that changes. So, I need to reboot the system to make changes
visible.
Another and more clear way is to reboot to standard
configuration (without device mapper)and install/update software,
then reboot again to devmapper configuration. Both these ways are
inacceptible
in production system.
Question2: How to make devmapper to know that base (snapshot'ed) device
have
been changed ?
1( My thoughs was to remap root from snapshot to disk, upgrade software
and remap
root back to snapshot. It doesn't work.
2( We may delete snapshot and snapshot-orig and disk mappings, then
upgrade soft, then restore
snapshotting back. It doen't work also.
The case, I think, in initrd nature of mapping. I.e. mapping devices are
in /inird/dev/mapper instead of /dev/mapper.
My device-mapper configuration as following (by initrd)
--
root-orig: 0 430048 snapshot-origin 254:000
ram: 0 430048 linear 007:000 0
root: 0 430048 snapshot 254:000 254:001 P 8
hd: 0 430048 linear 022:001 0
--
"hd" - base device (compact flash in my case, /dev/hdc1)
"ram" - temporary loop device on file in ramfs.
"root" - snapshot of "hd" to "ram"
"root-orig" - snapshot-orig to "hd"
Rootfs mounted on /dev/mapper/root.
Question3stupid: Where rootfs must be mounted - on /dev/mapper/root or
/dev/mapper/root-orig ?
--
regards,
Vladimir
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: HOW to install software to mapped device persistently
2006-06-01 10:11 HOW to install software to mapped device persistently V.Kukushkin
@ 2006-06-01 14:07 ` Alasdair G Kergon
0 siblings, 0 replies; 2+ messages in thread
From: Alasdair G Kergon @ 2006-06-01 14:07 UTC (permalink / raw)
To: vlkukushkin; +Cc: device-mapper development
On Thu, Jun 01, 2006 at 02:11:43PM +0400, V.Kukushkin wrote:
> All we know the good way to make read-only ROOT device be read-write
> looking.
> It is the use of dmsetup in initrd. It works perfect. But ..
Depends where the 'read-only' setting is coming from.
LVM? Use lvchange -pr
dm itself? (using device vg0-lvol0 as the example)
'dmsetup info vg0-lvol0 | grep State' shows ACTIVE (READ-ONLY)
Then:
dmsetup table vg0-lvol0 | dmsetup reload vg0-lvol0; dmsetup resume vg0-lvol0
And to put it back read-only afterwards
dmsetup table vg0-lvol0 | dmsetup reload -r vg0-lvol0; dmsetup resume vg0-lvol0
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-01 14:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-01 10:11 HOW to install software to mapped device persistently V.Kukushkin
2006-06-01 14:07 ` Alasdair G Kergon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.