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.
Thanks
Minfei
>
> > BTW btrfs subvolumes also use [] in findmnt output, how to differenciate them?
> >
>
> For now, I don't test the btrfs.
btrfs is supported so we it need be taken care
Thanks
Dave