From: "V.Kukushkin" <vlkukushkin@yandex.ru>
To: dm-devel@redhat.com
Subject: HOW to install software to mapped device persistently
Date: Thu, 01 Jun 2006 14:11:43 +0400 [thread overview]
Message-ID: <optago9tmrbp19rg@devel.lan.internet2.ru> (raw)
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
next reply other threads:[~2006-06-01 10:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 10:11 V.Kukushkin [this message]
2006-06-01 14:07 ` HOW to install software to mapped device persistently Alasdair G Kergon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=optago9tmrbp19rg@devel.lan.internet2.ru \
--to=vlkukushkin@yandex.ru \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.