findmnt (was Re: Migration from filestore to blustore)

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

 



Hi,

On 20/11/17 15:00, Gerhard W. Recher wrote:

Just interjecting here because I keep seeing things like this, and
they're often buggy, and there's an easy answer:

> DEVICE=`mount | grep /var/lib/ceph/osd/ceph-$ID| cut -f1 -d"p"`

findmnt(8) is your friend, any time you want to find out about mounted
filesystems, and much more reliable than grepping the output of mount or
/proc/mtab/ or whatever (consider if ID is 1 and you have ceph-1 and
ceph-10 mounted on the host, for example).

findmnt -T "/var/lib/ceph/osd/ceph-$id" -n -o SOURCE

is probably what you wanted here. Findmnt is in util-linux, and should
be in all non-ancient distributions.

Here ends the message from the findmnt(8) appreciation society :)

Regards,

Matthew


-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux