Re: Mount return values are wrong in the new aufs mount location
On Wed December 14 2011, Vasanth Ragavendran wrote: Which looks exactly as expected from the previous condition you listed before the move. What do you want different about it? I think I have stumbled onto a similar situation that does not involve auFS nor either of the *_root calls. Just setting up a directory with files for a chroot, mount /proc and then changing to that file system namespace with a chroot /x/y/z Then you can find some very strange things (with the 3.0.4 kernel): cat /proc/self/mounts (or the older cat /proc/mounts) shows the paths properly trimmed for the second view of proc: That is, it shows: /proc not: /x/y/z/proc __BUT__ is does not edit out those mount paths no longer accessible! That is, you can find mount paths listed that are outside of the /x/y/z path. Of course, any operations on them (since /x/y/z doesn't exist inside the chroot) return errors. Another interesting note: There will be a visible (and working) /dev inside of the chroot. I am not sure if this is a feature or an error - in the 2.6.x series kernels, you had to mount it to have it inside. When I have a chance, I will see if the same happens with the 3.1.y and 3.2.x series of kernels. Mike -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev
Re: Mount return values are wrong in the new aufs mount location
-- Cloud Computing - Latest Buzzword or a Glimpse of the Future? This paper surveys cloud computing today: What are the benefits? Why are businesses embracing it? What are its payoffs and pitfalls? http://www.accelacomm.com/jaw/sdnl/114/51425149/
Re: Mount return values are wrong in the new aufs mount location
On Wed December 14 2011, Vasanth Ragavendran wrote: So I am saying Try moving jffs2 and sqfsh before switch_root, not only /tmp. You may need to change their mount-points. For example, # mkdir /jffs2 /sqfsh /tmp # mount ... /tmp # mount ... /jffs2 # mount ... /sqfsh # mount ... /aufs # mount -o move /tmp /aufs/tmp # mount -o move /jffs2 /aufs/tmp/jffs2 # mount -o move /sqfsh /aufs/tmp/sqfsh # swtich_root ... I was doing something similar only before. it was like this mount ... /tmp mount ... /tmp/jffs2 mount ... /tmp/sqfsh mount ... /aufs mount -o move /tmp /aufs/tmp switch_root and now even though it wouldn't make any difference i tried even ur suggestion mount ... /tmp mount ... /tmp/jffs2 mount ... /tmp/sqfsh mount ... /aufs mount -o move /tmp/jffs2 /aufs/tmp/jffs2 mount -o move /tmp/sqfsh /aufs/tmp/sqfsh switch_root mount -o move are successful both the time. however after doing switch_root what i see using mount(8) is rootfs on / type rootfs (rw) tmpfs on /tmp type tmpfs (rw,relatime) /dev/mtdblock2 on /tmp/jffs2 type jffs2 (rw,relatime) /dev/loop0 on /tmp/sqfsh type squashfs (ro,relatime) aufs on / type aufs (rw,relatime,si=c50d132a) /proc on /proc type proc (rw,relatime) devpts on /dev/pts type devpts (rw,relatime,mode=622) none on /tmp type ramfs (rw,relatime) Which looks exactly as expected from the previous condition you listed before the move. What do you want different about it? Yes there are two file systems mounted on / Which is expected, the kernel supplied one (type rootfs) and you over-mounted it with one (type aufs). I have to ask, what else do you want? Mike You can see the version string with release-date in the boot-time message from kernel, or include/linux/aufs_type.h. If you run git-clone after 2011-08-02, then it must the last version which is OK. Oh okay but mine says 2011-08-01 so does that mean i have the older version? and do i need to update? Ah, you are writing only text/html and the text/plain part is generated by your MUA, right? What is your MUA (mail reader)? It seems broken. But I never mean you should fix it nor report it its deverloper. Of course, I never mean stop you using it. yeah i'm gmail actually and probably that's why its creating such troubles apologies! :( Regards R.Vasanth Ragavendran. -- Cloud Computing - Latest Buzzword or a Glimpse of the Future? This paper surveys cloud computing today: What are the benefits? Why are businesses embracing it? What are its payoffs and pitfalls? http://www.accelacomm.com/jaw/sdnl/114/51425149/
Re: Mount return values are wrong in the new aufs mount location
Vasanth Ragavendran: I was doing something similar only before. it was like this mount ... /tmp mount ... /tmp/jffs2 mount ... /tmp/sqfsh mount ... /aufs mount -o move /tmp /aufs/tmp switch_root and now even though it wouldn't make any difference i tried even ur suggestion mount ... /tmp mount ... /tmp/jffs2 mount ... /tmp/sqfsh mount ... /aufs mount -o move /tmp/jffs2 /aufs/tmp/jffs2 mount -o move /tmp/sqfsh /aufs/tmp/sqfsh switch_root Sigh,,, Look at what I wrote closer and compare what your wrote with it. Ah ok, I will try explain differently again. You have three mount-points, so I am suggesting to move those three, all three. What you tried previously is moving one mount-point, and now moving two mount-points, right? Do I make myself clear? You can see the version string with release-date in the boot-time message from kernel, or include/linux/aufs_type.h. If you run git-clone after 2011-08-02, then it must the last version which is OK. Oh okay but mine says 2011-08-01 so does that mean i have the older version? and do i need to update? I don't know because it is the aufs version that I want to know. J. R. Okajima -- Cloud Computing - Latest Buzzword or a Glimpse of the Future? This paper surveys cloud computing today: What are the benefits? Why are businesses embracing it? What are its payoffs and pitfalls? http://www.accelacomm.com/jaw/sdnl/114/51425149/
Re: Mount return values are wrong in the new aufs mount location
-- Cloud Computing - Latest Buzzword or a Glimpse of the Future? This paper surveys cloud computing today: What are the benefits? Why are businesses embracing it? What are its payoffs and pitfalls? http://www.accelacomm.com/jaw/sdnl/114/51425149/
Re: Mount return values are wrong in the new aufs mount location
-- 10 Tips for Better Server Consolidation Server virtualization is being driven by many needs. But none more important than the need to reduce IT complexity while improving strategic productivity. Learn More! http://www.accelacomm.com/jaw/sdnl/114/51507609/
Re: Mount return values are wrong in the new aufs mount location
On Tue December 13 2011, sf...@users.sourceforge.net wrote: Vasanth Ragavendran: Oh then i was wrong in assuming that the old values shouldn't be displayed after doing a switch_root! :( i'm so sorry. however if i do a df -h in the I hope you would understand that your /proc/mounts never show the old values. It is always _current_ status. Used to be that way, but now use: cat /proc/self/mounts Which on older kernels may be linked back to the legacy /proc/mounts Mike after doing a switch_root! :( i'm so sorry. however if i do a df -h in the aufs filesystem to display the flash size it says FilesystemSize Used Available Use% Mounted on df: /tmp/jffs2: No such file or directory df: /tmp/sqfsh: No such file or directory What will happen if you run ls -ld /tmp /tmp/jffs2 /tmp/sqfsh? Please don't call me Sir as nobody gives me a title. J. R. Okajima -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
Vasanth Ragavendran: / # ls -ld /tmp/ /tmp/jffs2 /tmp/sqfsh ls: /tmp/jffs2: No such file or directory ls: /tmp/sqfsh: No such file or directory drwxr-xr-x3 root root0 Jan 1 00:00 /tmp/ What will happen if you mount -o move them? the version of aufs is aufs2.1 since my linux kernel is 2.6.31. Do you mean the last aufs2.1-31? Don't you have any date in the version string? J. R. Okajima -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
Vasanth Ragavendran: u mean in the aufs filesystem do a mount -o move? but the folder jffs2 and sqfsh doesn't exist. right? You already have at least one mount -o move in your script, right? I mean moving jffs2 and sqfsh too before switch_root. Do you mean the last aufs2.1-31? Don't you have any date in the version string? oh yeah sorry its aufs2.1-31 which i'm using. I know it si aufs2.1-31. And I am asking last aufs2.1-31? Don't you have any date in the version string? If you can, stop prepending '' to the head of what you write. It is really confusing. J. R. Okajima -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
Vasanth Ragavendran: I don't set the brs as I don't have the CONFIG_AUFS_SYSAUFS paramater. Where did you see CONFIG_AUFS_SYSAUFS? If I remember correctly, it was gone before aufs2.0 (ie. aufs1). If your fs/aufs/Kconfig contains such symbols, I'd strongly recommend you to check your aufs source files. J. R. Okajima -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
Vasanth Ragavendran: cross compiler. however aufs2-util packages fail to compile. it fails in compiling the makefile of the aufs2-util. the error being ./ver: ./ver: cannot execute binary file The reason being the file is not getting generated by mips-linux-uclibc-gcc -I./libau -O -Wall -I/usr/include -DMOUNT_CMD_PATH=\\ ver.c -o ver Why is this happening? but it's running fine when i specify it as just gcc ::: I see. I understand that ver.c in aufs2-util doesn't suit for cross-compiling... The purpose of ver.c is comparing and checking the version of installed aufs module (actually include/linux/aufs_type.h) and with aufs2-util's. And _run_ it before compiling other utilities. In cross-compiling, obviously it is unuseful and unavailable. Just for now and for you only, you can skip ./ver checking by replacing it by simple /bin/true. Of course, you need to make sure that their version matches. well with other software installations. My apologies for troubling you so much. Don't worry. I'm glad that you have succeeded. J. R. Okajima -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure
Re: Mount return values are wrong in the new aufs mount location
-- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
Vasanth Ragavendran: It might work, however the plink.c which contains a O_CLOEXEC defined in fcntl.h creates problem. i guess the location of this file containing O_CLOEXEC differs from architecture to architecture (i'm not too sure of this though) If you mean that your /usr/include/fcntl.h (or its sub-included files) doesn't define O_CLOEXEC, then I am afraid it is violating some standards and I cannot support such system. I thought you are using glibc since your cross-compiler is gcc, isn't it? /etc/mtab file and these values are the same when i do a cat /proc/mount. rootfs on / type rootfs (rw) /proc on /proc type proc (rw,relatime) tmpfs on /tmp type tmpfs (rw,relatime) /dev/mtdblock2 on /tmp/jffs2 type jffs2 (rw,relatime) /dev/loop0 on /tmp/sqfsh type squashfs (ro,relatime) aufs on /aufs type aufs (rw,relatime,si=c50d032a) Actually it is not same. Your previous post showed aufs on / ... br:/tmp/rw=rw:/tmp/sqfsh=rr) The difference is the branch path in the aufs entry. That is why I asked about the module parameter 'brs'. After this i do a move to tmp location inside /aufs folder. the move is successful and again mount(8) or cat /proc/mount returns these ::: tmpfs on /aufs/tmp type tmpfs (rw,relatime) /dev/mtdblock2 on /aufs/tmp/jffs2 type jffs2 (rw,relatime) /dev/loop0 on /aufs/tmp/sqfsh type squashfs (ro,relatime) ::: Ok, that is correct. before in /tmp. then i do a umount /proc. And then i do a switch root to /aufs and here comes the problem again. the mount(8) or cat /proc/mount in the aufs filesystem returns these ::: tmpfs /tmp tmpfs rw,relatime 0 0 /dev/mtdblock2 /tmp/jffs2 jffs2 rw,relatime 0 0 /dev/loop0 /tmp/sqfsh squashfs ro,relatime 0 0 ::: Ok, that is correct too. it still seems to have the old mount values and further the mount -o move which was performed during the initramfs doesn't seem to be reflected which are highlighted again above. and /tmp in the aufs filesystem doesn't contain anything. now this is working correct? i'm doubtful. Why do you think /proc/mount is incorrect. It is absolutely correct since you have run switch_root, right? J. R. Okajima -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
-- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
Vasanth Ragavendran: I don't set the brs as I don't have the CONFIG_AUFS_SYSAUFS paramater. What is your aufs version? J. R. Okajima -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
Vasanth Ragavendran: Oh then i was wrong in assuming that the old values shouldn't be displayed after doing a switch_root! :( i'm so sorry. however if i do a df -h in the I hope you would understand that your /proc/mounts never show the old values. It is always _current_ status. after doing a switch_root! :( i'm so sorry. however if i do a df -h in the aufs filesystem to display the flash size it says FilesystemSize Used Available Use% Mounted on df: /tmp/jffs2: No such file or directory df: /tmp/sqfsh: No such file or directory What will happen if you run ls -ld /tmp /tmp/jffs2 /tmp/sqfsh? Please don't call me Sir as nobody gives me a title. J. R. Okajima -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
-- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
Re: Mount return values are wrong in the new aufs mount location
Hello Vasanth, Vasanth Ragavendran: system. however doing a mount under this new aufs filesystem still contains the old mount values. rootfs on / type rootfs (rw) tmpfs on /tmp type tmpfs (rw,relatime) /dev/mtdblock2 on /tmp/jffs2 type jffs2 (rw,relatime) /dev/loop0 on /tmp/sqfsh type squashfs (ro,relatime) aufs on / type aufs (rw,relatime,si=c50e412a,br:/tmp/rw=rw:/tmp/sqfsh=rr) /proc on /proc type proc (rw,relatime) devpts on /dev/pts type devpts (rw,relatime,mode=622) none on /tmp type ramfs (rw,relatime) Do you mean the output from mount(8) command? And /proc/mounts shows what you expect? If so, - mount(8) shows the contents of a file, /etc/mtab. - every mount/umount operation should maintain /etc/mtab. - for aufs, /sbin/mount.aufs maintains /etc/mtab. I am afraid you didn't install aufs-util (or aufs2-util). the last three are those pertaining to the new aufs root filesystem. how do i get rid of the first five mount locations? coz if i do a df -h in the new aufs filesystem it says /tmp/rw and /tmp/sqfsh doesn't exist which is true as these were present during initramfs execution. Kindly help me. Awaiting for any pointers at least to rectify this. You can modify /etc/mtab manually, and mount(8) will follow it. But, generally speaking, it is better to let the commands handle /etc/mtab. It means install aufs-util (or aufs2-util) is recommended. And, before you run switch_root, it might be better to mount -o move the aufs branches. J. R. Okajima -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure
Re: Mount return values are wrong in the new aufs mount location
init Description: Binary data -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure
Re: Mount return values are wrong in the new aufs mount location
Vasanth Ragavendran: No I was talking about the /proc/mounts only. I don't have the /etc/mtab file. apparently i had installed the aufs2-util but had not copied over the file to the board since the size was huge (600kb for mount.aufs and 500kb for umount.aufs) and i'm space constrained. But even i after including the file into the board, the output is the same and it is the output of /proc/mount only. do i need to include this mount.aufs somewhere? or is it taken care of internally? Ok, as long as you don't use /etc/mtab, mount.aufs is unrelated to the path of branches. The pathname of mount.aufs is totally upto your mount(8). The mount(8) in util-linux packages expects it is placed under /sbin. Are you sure that your mount -o move succeeded? When aufs shows its entry for /proc/mounts, the path of branch is calculated (generated dynamically). And you set the aufs module parmeter 'brs' to 0, right? /sbin/mount.aufs: line 1: syntax error: unexpected ( Why is it saying this? ?? Broken binary? Something seems to be corrupted in your system. J. R. Okajima -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure