View previous topic :: View next topic |
Author |
Message |
Simba n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/d52f16833dcc31f25bb2f.jpg)
Joined: 08 Nov 2002 Posts: 60
|
Posted: Fri Dec 16, 2005 12:42 am Post subject: How to use unionfs in initrd? |
|
|
Hi,
Actually I want to use xen with unionfs so I can have a read only base file system and
read write delta filesystem. for this pupose I have to use initrd/initramfs so it can mount
this 2 filesystems with unionfs.
This is my simple linuxrc/init script:
Code: |
#!/bin/sh
mount -t proc proc /proc
mount -t sysfs /sys /sys
/bin/busybox --install -s
/sbin/udevstart
modprobe unionfs
mount /dev/hda1 /mnt/basefs
mount /dev/hda2 /mnt/deltafs
mount -t unionfs -o dirs=/mnt/deltafs=rw:/mnt/basefs=ro none /mnt/unionfs
cd /mnt/unionfs
pivot_root . tmp/.initrd
exec /usr/sbin/chroot . /sbin/init
|
It works fine after start, I have root union filesystem,
but I still have a problem with this script, I can't shutdown the system because
during the shutdown it tries to unmount /tmp/.initrd/mnt/basefs and /tmp/.initrd/mnt/deltafs
but this is not possible because the root filesystem is still using it.
Anyone can help me to solve this problem? or is there a working linuxrc script to use unionfs?
many thanks,
Simba |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sirtalon42 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 09 Aug 2005 Posts: 79
|
Posted: Fri Dec 16, 2005 3:14 am Post subject: |
|
|
If this is for a DomU then it would be easier to use LVM & Copy-On-Write (create the device in Dom0, and pass it to the DomU as a disk).
On the UnionFS mailing list they discussed the problem you're having (except the person was using a Debian based system). I never saw the mail with the solution), its something to do with the OS forgetting that the union is mounted.
I think in your setup using cow may be easier (since you are using 2 differen't partitions) even for Dom0. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|