Once upon a time you could use the command 'mount' to see what filesystems were mounted but it has now got so cluttered with 'virtual' filesystems that it's pretty useless.
What's an easy way of seeing what actual, data containing, useful filesystems are mounted? I.e. the physical disks and the NFS ones.
On 16 August 2016 at 18:01, Chris Green cl@isbd.net wrote:
What's an easy way of seeing what actual, data containing, useful filesystems are mounted? I.e. the physical disks and the NFS ones.
I tend to use df -l which would be the same as "mount" in this case I guess... How about "parted -l" ?
On Tue, Aug 16, 2016 at 06:10:30PM +0100, John Cohen wrote:
On 16 August 2016 at 18:01, Chris Green cl@isbd.net wrote:
What's an easy way of seeing what actual, data containing, useful filesystems are mounted? I.e. the physical disks and the NFS ones.
I tend to use df -l which would be the same as "mount" in this case I guess... How about "parted -l" ?
Actually 'df -l' is significantly better than 'mount'. What has really made mount useless is the proliferation of 'cgroup' file systems and these don't show up with df.
However neither df nor parted show nfs filesystems.
On Tue, 2016-08-16 at 18:01 +0100, Chris Green wrote:
Once upon a time you could use the command 'mount' to see what filesystems were mounted but it has now got so cluttered with 'virtual' filesystems that it's pretty useless.
What's an easy way of seeing what actual, data containing, useful filesystems are mounted? I.e. the physical disks and the NFS ones.
alias hmount='mount | grep ^/'
Not sure of this works for NFS - haven't got any
On Tue, Aug 16, 2016 at 07:32:02PM +0100, Huge wrote:
On Tue, 2016-08-16 at 18:01 +0100, Chris Green wrote:
Once upon a time you could use the command 'mount' to see what filesystems were mounted but it has now got so cluttered with 'virtual' filesystems that it's pretty useless.
What's an easy way of seeing what actual, data containing, useful filesystems are mounted? I.e. the physical disks and the NFS ones.
alias hmount='mount | grep ^/'
Not sure of this works for NFS - haven't got any
Actually a good idea, I could reverse it so that all the junk I don't want to see is thrown away (using grep -v).
On 16 August 2016 at 18:01, Chris Green cl@isbd.net wrote:
Once upon a time you could use the command 'mount' to see what filesystems were mounted but it has now got so cluttered with 'virtual' filesystems that it's pretty useless.
What's an easy way of seeing what actual, data containing, useful filesystems are mounted? I.e. the physical disks and the NFS ones.
Don't know about NFS but I found a stackexchange post about this http://unix.stackexchange.com/questions/49786/finding-all-storage-devices-at...
A suggestion from there is to use lsblk, and then maybe only use the ones that have something valid in the MOUNTPOINT column?
Regards, Srdjan
On 16 Aug 18:01, Chris Green wrote:
Once upon a time you could use the command 'mount' to see what filesystems were mounted but it has now got so cluttered with 'virtual' filesystems that it's pretty useless.
What's an easy way of seeing what actual, data containing, useful filesystems are mounted? I.e. the physical disks and the NFS ones.
Wellllll, for physical only, lsblk -f may be much nicer output for you...
For nfs too, then...
mount -t ext2,ext3,ext4,xfs,btrfs,vfat,nfs,smbfs
Should fairly much get you everything.
Cheers,
On Mon, Aug 22, 2016 at 09:53:26AM +0100, Brett Parker wrote:
On 16 Aug 18:01, Chris Green wrote:
Once upon a time you could use the command 'mount' to see what filesystems were mounted but it has now got so cluttered with 'virtual' filesystems that it's pretty useless.
What's an easy way of seeing what actual, data containing, useful filesystems are mounted? I.e. the physical disks and the NFS ones.
Wellllll, for physical only, lsblk -f may be much nicer output for you...
For nfs too, then...
mount -t ext2,ext3,ext4,xfs,btrfs,vfat,nfs,smbfs
Should fairly much get you everything.
Yes, that's the sort of filtering I want, I think that's going to become a script or an alias. It's a pity that you can't set a default configuration for mount so that the above is the default when you say 'mount' but allows one to use mount normally otherwise.
In the mount man page it says:-
The listing mode is maintained for backward compatibility only.
For more robust and customizable output use findmnt(8), especially in your scripts.
However findmnt has the same problem as mount, it lists *everything*, I get:-
TARGET SOURCE FSTYPE OPTIONS / /dev/sdb1 ext4 rw,relatime,errors=remount-ro,data=ordered ├─/sys sysfs sysfs rw,nosuid,nodev,noexec,relatime │ ├─/sys/kernel/security securityfs securityfs rw,nosuid,nodev,noexec,relatime │ ├─/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec,mode=755 │ │ ├─/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd │ │ ├─/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices │ │ ├─/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,relatime,perf_event │ │ ├─/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer │ │ ├─/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio │ │ ├─/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,relatime,pids │ │ ├─/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset │ │ ├─/sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct │ │ ├─/sys/fs/cgroup/net_cls,net_prio cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio │ │ ├─/sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec,relatime,hugetlb │ │ └─/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory │ ├─/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatime │ ├─/sys/fs/fuse/connections fusectl fusectl rw,relatime │ └─/sys/kernel/debug debugfs debugfs rw,relatime │ └─/sys/kernel/debug/tracing tracefs tracefs rw,relatime ├─/proc proc proc rw,nosuid,nodev,noexec,relatime │ ├─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=24,pgrp=1,timeout=0,minproto=5,maxproto=5,direct │ └─/proc/fs/nfsd nfsd nfsd rw,relatime ├─/dev udev devtmpfs rw,nosuid,relatime,size=3992916k,nr_inodes=998229,mode=755 │ ├─/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 │ ├─/dev/shm tmpfs tmpfs rw,nosuid,nodev │ ├─/dev/hugepages hugetlbfs hugetlbfs rw,relatime │ └─/dev/mqueue mqueue mqueue rw,relatime ├─/run tmpfs tmpfs rw,nosuid,noexec,relatime,size=802488k,mode=755 │ ├─/run/lock tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k │ ├─/run/rpc_pipefs sunrpc rpc_pipefs rw,relatime │ └─/run/user/1000 tmpfs tmpfs rw,nosuid,nodev,relatime,size=802488k,mode=700,uid=1000,gid=1000 │ └─/run/user/1000/gvfs gvfsd-fuse fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 ├─/bak /dev/sdd1 ext3 rw,relatime,data=ordered ├─/home /dev/sdc1 ext3 rw,relatime,data=ordered ├─/win7 /dev/sda2 fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096 ├─/media/chris/COMFAST_Driver /dev/sr0 iso9660 ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500 ├─/net -hosts autofs rw,relatime,fd=6,pgrp=3781,timeout=300,minproto=5,maxproto=5,indirect ├─/nfs /etc/auto.nfs autofs rw,relatime,fd=12,pgrp=3781,timeout=300,minproto=5,maxproto=5,indirect └─/tmp/music.mp3 mp3fs fuse.mp3fs ro,nosuid,nodev,relatime,user_id=1000,group_id=1000,allow_other
I quite like the layout but I could do without all those cgroup entries in particular. However like mount findmnt doesn't have any way to filter the output with environment or configuration.
On 22 August 2016 at 10:31, Chris Green cl@isbd.net wrote:
I quite like the layout but I could do without all those cgroup entries in particular. However like mount findmnt doesn't have any way to filter the output with environment or configuration.
findmnt -t nocgroup,nodebugfs,notracefs
??
You can decide which types to exclude and alias the result to something useful. Or just select the types you care about by dropping the "no" prefix - this is basically the same as mount and man findmnt actually directs you to man mount for reference.
Mark