[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mount command behaviour

Hi, I was porting in Jessie a script that worked in wheezy,

it does the following:

-mount --bind "$folderX" "$folderY"
-mount -t tmpfs "scriptname" "$folderX"
-cp -rfp "$folderY/." -T "$folderX/."

It seems that now when mount the folder X as tmpfs (the second step),
also the bindmount is mounted as tmpfs.
So the last step fails saying that both are the same folder.

if I write "mount" I get (pasting only the relevant parts):

/dev/sda2 on /var/scriptname/home/username/testfolder type ext4 (rw,relatime,errors=remount-ro,data=ordered)
scriptname on /home/username/testfolder type tmpfs (rw,relatime)
scriptname on /var/scriptname/home/username/testfolder type tmpfs (rw,relatime)

The first line is the bind mount, the other two lines are generated after I do the mount to tmpfs.

And both /home/username/testfolder and /var/scriptname/home/username/testfolder (its bind mount)

are mounted as tmpfs.

Is it a mount bug or was I using a bug that was fixed?


Reply to: