Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot setup loop device: no space left.
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
mathfeel
l33t
l33t


Joined: 03 Aug 2004
Posts: 700

PostPosted: Sat Oct 13, 2012 3:32 am    Post subject: cannot setup loop device: no space left. Reply with quote

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:
Code:
ls /dev/loop*

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Oct 13, 2012 10:12 pm    Post subject: Reply with quote

Does it work if you run losetup and mount as separate steps?
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sun Oct 14, 2012 5:59 pm    Post subject: Re: cannot setup loop device: no space left. Reply with quote

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
View user's profile Send private message
mathfeel
l33t
l33t


Joined: 03 Aug 2004
Posts: 700

PostPosted: Mon Oct 15, 2012 4:17 am    Post subject: Re: cannot setup loop device: no space left. Reply with quote

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
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