[Bug 1007677] Re: overlayfs: on-boot, mount device issue.
Mike Mestnik
1007677 at bugs.launchpad.net
Tue Jun 12 17:46:05 UTC 2012
This was a complete train wreak. I added the 'folder' checks in to
avoid booting with an empty /usr. Thus I believe that overlayfs grabs
the folder as-is and doesn't detect future mounted filesystems, always
using the device and inode detected at mount time... That's an(two in
this case) empty folder.
Doing the mount this way prevents the system from booting into an
unrecoverable state. Booting into rescue/single-user mode I was able to
correct the system.
I believe this is an issue with the boot scripts, as "mount -a" always
seams to do the correct thing.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1007677
Title:
overlayfs: on-boot, mount device issue.
Status in “util-linux” package in Ubuntu:
New
Bug description:
Hello example fstab entries I've tested,
overlayfs /usr overlayfs defaults,lowerdir=/.usr-ro/local/..,upperdir=/.usr-rw/lost+found/.. 0 2
none /usr overlayfs defaults,lowerdir=/.usr-ro/local/..,upperdir=/.usr-rw/lost+found/.. 0 2
On boot I get an error about the device overlayfs/none, so I'm
prompted to enter maintenance mode. I issue a "mount -a; exit;" and
all is well the boot success.
I'm sick of doing this.
Here is a small script I wrote to resquash /usr, it's incomplete as
I'm not sure how to size the lv.
#!/bin/sh
mksquashfs /usr /root/usr.sqfs -comp lzo -no-exports -always-use-fragments -wildcards -e local/*&
kpid=$!
(
#unsquashfs -s usr.sqfs
#lvcreate -L 5G Arcadia -n nuusr$$.ro
cryptsetup -q luksFormat /dev/Arcadia/nuusr$$.ro /etc/keys/key.txt
newo=$(cryptsetup luksUUID /dev/Arcadia/nuusr$$.ro)
cryptsetup luksOpen /dev/Arcadia/nuusr$$.ro $newo --key-file /etc/keys/key.txt
wait $kpid
{ dd if=/root/usr.sqfs bs=4k; cat /dev/urandom; } | dd bs=4M of=/dev/mapper/$newo
cryptsetup luksClose $newo
) &
opid=$!
lvcreate -L 8G Arcadia -n nuusr$$.rw
cryptsetup -q luksFormat /dev/Arcadia/nuusr$$.rw /etc/keys/key.txt
neww=$(cryptsetup luksUUID /dev/Arcadia/nuusr$$.rw)
cryptsetup luksOpen /dev/Arcadia/nuusr$$.rw $neww --key-file /etc/keys/key.txt
mkfs.ext4 /dev/mapper/$neww
tune2fs -e remount-ro -o journal_data_writeback,discard /dev/mapper/$neww
cryptsetup luksClose $neww
wait $opid
newo=$(cryptsetup luksUUID /dev/Arcadia/nuusr$$.ro)
oldo=$(grep fsUsr.ro /etc/crypttab | grep -o ........-....-....-....-............)
oldw=$(grep fsUsr.rw /etc/crypttab | grep -o ........-....-....-....-............)
sed -i -e "s/$oldo/$newo/" -e "s/$oldw/$neww/" /etc/crypttab
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: mount 2.20.1-1ubuntu3 [modified: bin/findmnt bin/mount bin/umount sbin/losetup sbin/swapon]
ProcVersionSignature: Ubuntu 3.2.0-23.31-lowlatency-pae 3.2.14
Uname: Linux 3.2.0-23-lowlatency-pae i686
ApportVersion: 2.0.1-0ubuntu5
Architecture: i386
Date: Fri Jun 1 19:28:18 2012
SourcePackage: util-linux
UpgradeStatus: Upgraded to precise on 2012-01-03 (150 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1007677/+subscriptions
More information about the foundations-bugs
mailing list