View previous topic :: View next topic |
Author |
Message |
mathfeel l33t
Joined: 03 Aug 2004 Posts: 700
|
Posted: Sat Oct 13, 2012 3:32 am Post subject: cannot setup loop device: no space left. |
|
|
I am using a squashfs and aufs for usr. So this means I have an initrd script that mount /usr (for udev).
This start happening for gentoo-3.6.0 (I can still work in my other working kenerl 3.5.3-ck). The squashfs image usr.sfs fails to mount:
Code: | mount -o loop -r -t squashfs /mnt/sqfs/usr.sfs /mnt/aufs/usr/ro |
with the error:
Code: | Cannot setup loop device: no space left |
I have the ability to drop to a rescue shell if mount fails. When I do that, and I type:
I got 772259 entries!!
It seems squashfs is broken in the new kernel or something? Any idea? _________________ -----------------------------------------------------------
"In heaven all the interesting people are missing"
-- Friedrich Nietzsche |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Oct 13, 2012 10:12 pm Post subject: |
|
|
Does it work if you run losetup and mount as separate steps? |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Sun Oct 14, 2012 5:59 pm Post subject: Re: cannot setup loop device: no space left. |
|
|
mathfeel wrote: | I am using a squashfs and aufs for usr. |
Not really an answer to your question, but aufs is not yet available for kernel-3.6. So if you use some older aufs, this might cause your problems. |
|
Back to top |
|
|
mathfeel l33t
Joined: 03 Aug 2004 Posts: 700
|
Posted: Mon Oct 15, 2012 4:17 am Post subject: Re: cannot setup loop device: no space left. |
|
|
mv wrote: | mathfeel wrote: | I am using a squashfs and aufs for usr. |
Not really an answer to your question, but aufs is not yet available for kernel-3.6. So if you use some older aufs, this might cause your problems. |
That might be a different issue by itself. The init script is stuck at the point where the aufs partition is not yet mounted. In fact, I am only mounting the RO part, in squashfs, for /usr so that udev can boot nicely.
Doing losetup separately did not help. But what might be interesting is that when I do a
Code: | ls -l ${NEWROOT}/mnt/sqfs ${NEWROOT}/mnt/aufs |
I see a list of file with zero size!
/mnt/sqfs is a mount point for a xfs partition, and /mnt/aufs is a mount point for an ext4 partition. Here is the relevant part of the init script:
Code: | prepare_newroot () {
printf "Prepareing new root: $1"
local VG=TPx201
[ -z $1 ] && printf "$$1 cannot be empty! done now.\n" && return 1
printf "mount -t xfs /dev/mapper/${VG}-SQFS $1/mnt/sqfs\n"
mount -t xfs /dev/mapper/${VG}-SQFS $1/mnt/sqfs || rescue_shell "Fail to mount $1/mnt/sqfs"
printf "mount -t ext4 /dev/mapper/${VG}-AUFS $1/mnt/aufs\n"
mount -t ext4 /dev/mapper/${VG}-AUFS $1/mnt/aufs || rescue_shell "Fail to mount $1/mnt/aufs"
printf "mount -t squashfs -o loop,ro $1/mnt/sqfs/usr.sfs $1/mnt/aufs/usr/ro\n"
losetup $1/mnt/sqfs/usr.sfs /dev/loop0 || rescue_shell "Fail to setup loop device $1/mnt/sqfs/usr.sfs /dev/loop0"
mount -t squashfs -r /dev/loop0 $1/mnt/aufs/usr/ro || rescue_shell "Fail to mount /dev/loop" <- Fails at this point and drops to rescue_shell.
mount -t squashfs -r /dev/loop0 $1/usr || rescue_shell "Fail to mount $1/usr"
} |
FYI, the same script is working for 3.5.3-ck. _________________ -----------------------------------------------------------
"In heaven all the interesting people are missing"
-- Friedrich Nietzsche |
|
Back to top |
|
|
|