On 02/26/15 at 01:02pm, Minfei Huang wrote:
On 02/26/15 at 11:23am, Dave Young wrote:
> On 02/26/15 at 11:02am, Minfei Huang wrote:
> > On 02/26/15 at 10:49am, Dave Young wrote:
> > > Hi, Minfei
> > >
> > > > > > -bash-4.2# findmnt -v /var | tail -n 1 | awk
'{print $2}'
> > > > > > /dev/mapper/atomicos-root
> > > > >
> > > > > There's no real dumping path for bind mount as we discussed
in previous
> > > > > thread, right?
> > > > >
> > > >
> > > > We can construct the real dump path for the bind mounted, using
findmnt.
> > > > As the above comment, we can identify the bind mount directory by
using
> > > > findmnt command.
> > >
> > > No, it did not answer my question, As Karel said for bind mount is same
as
> > > non-bind mount, see below the original source can be unmounted while the
> > > later bind mount still exist:
> > >
> > > [dyoung@dhcp-xx-xx dyoung]# mount /dev/sda7 /mnt/sda7
> > > [dyoung@dhcp-xx-xx dyoung]# ls /mnt/sda7
> > > bin dev home lib64 media opt dyoung sbin sys usr
> > > boot etc lib lost+found mnt proc run srv tmp var
> > > [dyoung@dhcp-xx-xx dyoung]# ls /mnt/sda7/var
> > > adm db games lock mail named rwho state www
> > > cache empty lib log man run spool tmp yp
> > > [dyoung@dhcp-xx-xx dyoung]# mount -o bind /mnt/sda7/var tmp
> > > [dyoung@dhcp-xx-xx dyoung]# ls tmp
> > > adm db games lock mail named rwho state www
> > > cache empty lib log man run spool tmp yp
> > > [dyoung@dhcp-xx-xx dyoung]# umount /mnt/sda7
> > > [dyoung@dhcp-xx-xx dyoung]# ls tmp
> > > adm db games lock mail named rwho state www
> > > cache empty lib log man run spool tmp yp
> > >
> > Hi, Dave!
> >
> > Yes, but we can use the findmnt to recognize the directory is bind
> > mounted or not, if the filesystem is not the btrfs.
> >
> > In your case, we can find the fact that real path of tmp directory is
> > /dev/sda7[/var]. So we can dump core to the /dev/sda7[/var], if the
> > target is tmp.
> >
> > The kdump's manner will be always correct, although the directory is
> > bind mounted.
>
> How did findmnt know this is a bindmnt, is it stable?
> OTOH, we need consider more cases, such as non-root case I believe you tested
> on atomic host. Have you tested normal bind mount test case, dump to root,
> dump to non root, nfs, etc.?
>
Yes. I will test more cases to cover the generic testcase.
Also need consider nfs test case, especially it envolved [], you know ipv6 also use
[] in addresses..
Thanks
Dave