Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to use unionfs in initrd?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Simba
n00b
n00b


Joined: 08 Nov 2002
Posts: 60

PostPosted: Fri Dec 16, 2005 12:42 am    Post subject: How to use unionfs in initrd? Reply with quote

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
View user's profile Send private message
sirtalon42
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2005
Posts: 79

PostPosted: Fri Dec 16, 2005 3:14 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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