Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #219936 > unrolled thread
| Started by | Albretch Mueller <lbrtchx@gmail.com> |
|---|---|
| First post | 2020-03-07 12:50 +0100 |
| Last post | 2020-03-07 13:10 +0100 |
| Articles | 12 — 7 participants |
Back to article view | Back to linux.debian.user
why is my local user (/dev/sda5) drive not being displayed by df? Albretch Mueller <lbrtchx@gmail.com> - 2020-03-07 12:50 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? Reco <recoverym4n@enotuniq.net> - 2020-03-07 13:00 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? Albretch Mueller <lbrtchx@gmail.com> - 2020-03-11 13:10 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? <tomas@tuxteam.de> - 2020-03-11 13:30 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? Greg Wooledge <wooledg@eeg.ccf.org> - 2020-03-11 13:50 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? <tomas@tuxteam.de> - 2020-03-11 14:00 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? Greg Wooledge <wooledg@eeg.ccf.org> - 2020-03-11 15:50 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? David Wright <deblis@lionunicorn.co.uk> - 2020-03-11 16:20 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? David Wright <deblis@lionunicorn.co.uk> - 2020-03-11 15:50 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? rhkramer@gmail.com - 2020-03-11 16:20 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? David Wright <deblis@lionunicorn.co.uk> - 2020-03-11 16:50 +0100
Re: why is my local user (/dev/sda5) drive not being displayed by df? Eduardo M KALINOWSKI <eduardo@kalinowski.com.br> - 2020-03-07 13:10 +0100
| From | Albretch Mueller <lbrtchx@gmail.com> |
|---|---|
| Date | 2020-03-07 12:50 +0100 |
| Subject | why is my local user (/dev/sda5) drive not being displayed by df? |
| Message-ID | <zHG7T-4i8-1@gated-at.bofh.it> |
$ sudo blkid /dev/mapper/sda5_crypt: UUID="HA3h3P-GUUe-brth-12Jb-VYcF-sE7h-l7Ep7Q" TYPE="LVM2_member" /dev/mapper/lbrtchx--vg-root: UUID="d2f3c65d-063b-441e-878e-e283e9ab39a2" TYPE="ext4" /dev/sda1: UUID="22e7b834-11f9-4f29-84d2-8757aa9f721d" TYPE="ext2" PARTUUID="c67530bc-01" /dev/sda5: UUID="27928fd6-a5a9-47a7-8e84-c65c2e2ed1df" TYPE="crypto_LUKS" PARTUUID="c67530bc-05" /dev/mapper/lbrtchx--vg-swap_1: UUID="0e990461-59f0-470c-9e07-c2942e683d2a" TYPE="swap" $ sudo df --human-readable --all Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf sysfs 0 0 0 - /sys proc 0 0 0 - /proc udev 1,8G 0 1,8G 0% /dev devpts 0 0 0 - /dev/pts tmpfs 356M 11M 346M 3% /run /dev/mapper/lbrtchx--vg-root 289G 131G 144G 48% / securityfs 0 0 0 - /sys/kernel/security tmpfs 1,8G 105M 1,7G 6% /dev/shm tmpfs 5,0M 4,0K 5,0M 1% /run/lock tmpfs 1,8G 0 1,8G 0% /sys/fs/cgroup cgroup 0 0 0 - /sys/fs/cgroup/systemd pstore 0 0 0 - /sys/fs/pstore cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct cgroup 0 0 0 - /sys/fs/cgroup/freezer cgroup 0 0 0 - /sys/fs/cgroup/net_cls,net_prio cgroup 0 0 0 - /sys/fs/cgroup/cpuset cgroup 0 0 0 - /sys/fs/cgroup/memory cgroup 0 0 0 - /sys/fs/cgroup/pids cgroup 0 0 0 - /sys/fs/cgroup/devices cgroup 0 0 0 - /sys/fs/cgroup/perf_event cgroup 0 0 0 - /sys/fs/cgroup/blkio systemd-1 - - - - /proc/sys/fs/binfmt_misc hugetlbfs 0 0 0 - /dev/hugepages debugfs 0 0 0 - /sys/kernel/debug mqueue 0 0 0 - /dev/mqueue /dev/sda1 236M 66M 159M 30% /boot tmpfs 356M 20K 356M 1% /run/user/1000 binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc $ ~ lbrtchx
[toc] | [next] | [standalone]
| From | Reco <recoverym4n@enotuniq.net> |
|---|---|
| Date | 2020-03-07 13:00 +0100 |
| Message-ID | <zHGhz-4lF-1@gated-at.bofh.it> |
| In reply to | #219936 |
Hi. On Sat, Mar 07, 2020 at 12:44:35PM +0100, Albretch Mueller wrote: > $ sudo blkid > /dev/mapper/sda5_crypt: UUID="HA3h3P-GUUe-brth-12Jb-VYcF-sE7h-l7Ep7Q" TYPE="LVM2_member" > /dev/mapper/lbrtchx--vg-root: UUID="d2f3c65d-063b-441e-878e-e283e9ab39a2" TYPE="ext4" > /dev/sda1: UUID="22e7b834-11f9-4f29-84d2-8757aa9f721d" TYPE="ext2" PARTUUID="c67530bc-01" > /dev/sda5: UUID="27928fd6-a5a9-47a7-8e84-c65c2e2ed1df" TYPE="crypto_LUKS" PARTUUID="c67530bc-05" df should display mounted filesystems. Both /dev/sda5 and /dev/mapper/sda5_crypt are not filesystems, hence they aren't displayed. Reco
[toc] | [prev] | [next] | [standalone]
| From | Albretch Mueller <lbrtchx@gmail.com> |
|---|---|
| Date | 2020-03-11 13:10 +0100 |
| Message-ID | <zJ8ls-2FR-17@gated-at.bofh.it> |
| In reply to | #219937 |
with your help I found a way around it (here is my silly scripting):
$ sudo _DF=$(df -h)
date
echo "${_DF}" | head -n 1
echo "${_DF}" | grep $(whoami)
$
lbrtchx
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2020-03-11 13:30 +0100 |
| Message-ID | <zJ8EO-2MT-3@gated-at.bofh.it> |
| In reply to | #220059 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Mar 11, 2020 at 01:02:59PM +0100, Albretch Mueller wrote: > with your help I found a way around it (here is my silly scripting): > > $ sudo _DF=$(df -h) I don't think you need "sudo" for "df"? Cheers -- tomás
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2020-03-11 13:50 +0100 |
| Message-ID | <zJ8Ya-2TY-1@gated-at.bofh.it> |
| In reply to | #220060 |
On Wed, Mar 11, 2020 at 01:21:17PM +0100, tomas@tuxteam.de wrote:
> On Wed, Mar 11, 2020 at 01:02:59PM +0100, Albretch Mueller wrote:
> > with your help I found a way around it (here is my silly scripting):
> >
> > $ sudo _DF=$(df -h)
>
> I don't think you need "sudo" for "df"?
And a good thing, too, because that syntax is completely wrong.
wooledg:~$ sudo x=$(id)
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-T timeout] [-u user] file ...
wooledg:~$ sudo x=$(df -h)
[sudo] password for wooledg:
sudo: Size: command not found
I think what Albretch was *trying* to do was this:
_DF=$(sudo df -h)
which would work, but as Tomas said, the sudo is just not needed.
P.S. see <https://mywiki.wooledge.org/BashFAQ/094> for more information
on parsing df output, in general.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2020-03-11 14:00 +0100 |
| Message-ID | <zJ97Q-2Xr-1@gated-at.bofh.it> |
| In reply to | #220061 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Mar 11, 2020 at 08:41:08AM -0400, Greg Wooledge wrote: > On Wed, Mar 11, 2020 at 01:21:17PM +0100, tomas@tuxteam.de wrote: > > On Wed, Mar 11, 2020 at 01:02:59PM +0100, Albretch Mueller wrote: > > > with your help I found a way around it (here is my silly scripting): > > > > > > $ sudo _DF=$(df -h) > > > > I don't think you need "sudo" for "df"? > > And a good thing, too, because that syntax is completely wrong. > > wooledg:~$ sudo x=$(id) > usage: sudo -h | -K | -k | -V [...] > I think what Albretch was *trying* to do was this: > > _DF=$(sudo df -h) d'oh. Didn't catch that one. Of course it's "df" who gets to see the "=", not the surrounding shell. Thank you for your (as usual) sharp eye, especially in shell things. Cheers -- t
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2020-03-11 15:50 +0100 |
| Message-ID | <zJaQh-43w-1@gated-at.bofh.it> |
| In reply to | #220062 |
On Wed, Mar 11, 2020 at 09:41:19AM -0500, David Wright wrote: > $ whoami > david > $ df -h --all | grep -e 'Filesystem ' -e $(whoami) > Filesystem Size Used Avail Use% Mounted on > $ What did you *expect*? There are no lines containing "david" in df's output.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2020-03-11 16:20 +0100 |
| Message-ID | <zJbjk-4tr-3@gated-at.bofh.it> |
| In reply to | #220063 |
On Wed 11 Mar 2020 at 10:43:46 (-0400), Greg Wooledge wrote: > On Wed, Mar 11, 2020 at 09:41:19AM -0500, David Wright wrote: > > $ whoami > > david > > > $ df -h --all | grep -e 'Filesystem ' -e $(whoami) > > Filesystem Size Used Avail Use% Mounted on > > $ > > What did you *expect*? There are no lines containing "david" in > df's output. I wondered what this script is for: grep can't make df display anything that it didn't already, and it doesn't appear to grep anything that might be useful, as you've pointed out. But sorry I asked. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2020-03-11 15:50 +0100 |
| Message-ID | <zJaQh-43w-3@gated-at.bofh.it> |
| In reply to | #220062 |
On Wed 11 Mar 2020 at 13:57:37 (+0100), tomas@tuxteam.de wrote: > On Wed, Mar 11, 2020 at 08:41:08AM -0400, Greg Wooledge wrote: > > On Wed, Mar 11, 2020 at 01:21:17PM +0100, tomas@tuxteam.de wrote: > > > On Wed, Mar 11, 2020 at 01:02:59PM +0100, Albretch Mueller wrote: > > > > with your help I found a way around it (here is my silly scripting): > > > > > > > > $ sudo _DF=$(df -h) > > > > > > I don't think you need "sudo" for "df"? > > > > And a good thing, too, because that syntax is completely wrong. > > > > wooledg:~$ sudo x=$(id) > > usage: sudo -h | -K | -k | -V > > [...] > > > I think what Albretch was *trying* to do was this: > > > > _DF=$(sudo df -h) > > d'oh. Didn't catch that one. Of course it's "df" who gets to see > the "=", not the surrounding shell. Thank you for your (as usual) > sharp eye, especially in shell things. Well, I'm glad that's all sorted. Now all I've got to figure out is the connection between df and whoami. $ whoami david $ df -h --all Filesystem Size Used Avail Use% Mounted on sysfs 0 0 0 - /sys proc 0 0 0 - /proc udev 203M 0 203M 0% /dev devpts 0 0 0 - /dev/pts tmpfs 44M 2.8M 41M 7% /run /dev/sda1 28G 9.2G 17G 36% / securityfs 0 0 0 - /sys/kernel/security tmpfs 216M 0 216M 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 216M 0 216M 0% /sys/fs/cgroup cgroup2 0 0 0 - /sys/fs/cgroup/unified cgroup 0 0 0 - /sys/fs/cgroup/systemd pstore 0 0 0 - /sys/fs/pstore bpf 0 0 0 - /sys/fs/bpf cgroup 0 0 0 - /sys/fs/cgroup/cpuset cgroup 0 0 0 - /sys/fs/cgroup/memory cgroup 0 0 0 - /sys/fs/cgroup/net_cls,net_prio cgroup 0 0 0 - /sys/fs/cgroup/rdma cgroup 0 0 0 - /sys/fs/cgroup/devices cgroup 0 0 0 - /sys/fs/cgroup/blkio cgroup 0 0 0 - /sys/fs/cgroup/perf_event cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct cgroup 0 0 0 - /sys/fs/cgroup/freezer cgroup 0 0 0 - /sys/fs/cgroup/pids systemd-1 - - - - /proc/sys/fs/binfmt_misc hugetlbfs 0 0 0 - /dev/hugepages debugfs 0 0 0 - /sys/kernel/debug mqueue 0 0 0 - /dev/mqueue /dev/sdb4 29G 45M 28G 1% /ya /dev/sda2 28G 7.5G 19G 29% /wasps /dev/sdb5 29G 45M 28G 1% /yb /dev/dm-0 399G 25G 354G 7% /home /dev/dm-1 399G 356G 24G 94% /agoghome tmpfs 44M 0 44M 0% /run/user/1000 binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 28G 0 part / ├─sda2 8:2 0 27.8G 0 part /wasps ├─sda3 8:3 0 406.1G 0 part │ └─luks-cf12acf3-e36b-4b12-9973-8df97bcc0f2f 253:0 0 406G 0 crypt /home └─sda4 8:4 0 4G 0 part [SWAP] sdb 8:16 0 465.8G 0 disk ├─sdb1 8:17 0 3M 0 part ├─sdb2 8:18 0 496M 0 part ├─sdb3 8:19 0 500M 0 part ├─sdb4 8:20 0 29.3G 0 part /ya ├─sdb5 8:21 0 29.3G 0 part /yb └─sdb6 8:22 0 406.2G 0 part └─luks-98f15f4c-e3fc-45f3-aa15-3774e012e996 253:1 0 406.2G 0 crypt /agoghome sr0 11:0 1 1024M 0 rom $ df -h --all | grep -e 'Filesystem ' -e $(whoami) Filesystem Size Used Avail Use% Mounted on $ Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | rhkramer@gmail.com |
|---|---|
| Date | 2020-03-11 16:20 +0100 |
| Message-ID | <zJbjk-4tr-1@gated-at.bofh.it> |
| In reply to | #220064 |
On Wednesday, March 11, 2020 10:41:19 AM David Wright wrote: > Well, I'm glad that's all sorted. Now all I've got to figure out is > the connection between df and whoami. Pretty much, there is no relation. Maybe you're wondering about why some directories or files (on partitions that can be shown by df) might allow certain things (reading, writing, ...) by some users and not others? If so, you have to learn about the permissions -- try an ls -al on some file or directory that you have questions about -- if that helps pinpoint your question but you need some help in understanding, ask a question about that.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2020-03-11 16:50 +0100 |
| Message-ID | <zJbMl-4Dk-1@gated-at.bofh.it> |
| In reply to | #220066 |
On Wed 11 Mar 2020 at 11:13:30 (-0400), rhkramer@gmail.com wrote:
> On Wednesday, March 11, 2020 10:41:19 AM David Wright wrote:
> > Well, I'm glad that's all sorted. Now all I've got to figure out is
> > the connection between df and whoami.
>
> Pretty much, there is no relation.
>
> Maybe you're wondering about why some directories or files (on partitions that
> can be shown by df) might allow certain things (reading, writing, ...) by some
> users and not others?
>
> If so, you have to learn about the permissions -- try an ls -al on some file or
> directory that you have questions about -- if that helps pinpoint your
> question but you need some help in understanding, ask a question about that.
I'm not aware of permissions being important for df, excepting the
reserved blocks that root keeps in its back pocket. But the use of
grep suggests that the script is looking for clarity.
I never normally type "df", but run my script, dfree, instead.
$ dfree
Filesystem IUse% Type 1MB-blocks Used Avail Use% Mounted on
/dev/sda1 18% ext4 29393 9833 18044 36% /
/dev/sdb4 1% ext4 30830 47 29194 1% /ya
/dev/sda2 16% ext4 29199 7998 19694 29% /wasps
/dev/sdb5 1% ext4 30830 47 29194 1% /yb
/dev/dm-0 1% ext4 428072 26182 380073 7% /home
/dev/dm-1 1% ext4 428223 381266 25134 94% /agoghome
$
That's what most people want to keep an eye on as they go about
their ordinary business. 1MB-blocks are more suited to modern
disk sizes, but give a physical expression of size, unlike -h.
dfree is a function
dfree ()
{
local Outfile=/dev/null;
[ -n "$1" ] && Outfile=/tmp/df-"$HOSTNAME"-"$(date +%Y-%m-%d-%H-%M-%S)";
df --output=source,ipcent,fstype,size,used,avail,pcent,target -B 1000000 -x tmpfs -x devtmpfs | sed -e 's/\([^ ] \)/\1 /g' | tee -a "$Outfile"
}
Cheers,
David.
[toc] | [prev] | [next] | [standalone]
| From | Eduardo M KALINOWSKI <eduardo@kalinowski.com.br> |
|---|---|
| Date | 2020-03-07 13:10 +0100 |
| Message-ID | <zHGrg-4EP-9@gated-at.bofh.it> |
| In reply to | #219936 |
On 07/03/2020 08:44, Albretch Mueller wrote: > $ sudo blkid > /dev/mapper/sda5_crypt: UUID="HA3h3P-GUUe-brth-12Jb-VYcF-sE7h-l7Ep7Q" > TYPE="LVM2_member" > /dev/mapper/lbrtchx--vg-root: > UUID="d2f3c65d-063b-441e-878e-e283e9ab39a2" TYPE="ext4" > /dev/sda1: UUID="22e7b834-11f9-4f29-84d2-8757aa9f721d" TYPE="ext2" > PARTUUID="c67530bc-01" > /dev/sda5: UUID="27928fd6-a5a9-47a7-8e84-c65c2e2ed1df" > TYPE="crypto_LUKS" PARTUUID="c67530bc-05" > /dev/mapper/lbrtchx--vg-swap_1: > UUID="0e990461-59f0-470c-9e07-c2942e683d2a" TYPE="swap" > > $ sudo df --human-readable --all > Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf > sysfs 0 0 0 - /sys > proc 0 0 0 - /proc > udev 1,8G 0 1,8G 0% /dev > devpts 0 0 0 - /dev/pts > tmpfs 356M 11M 346M 3% /run > /dev/mapper/lbrtchx--vg-root 289G 131G 144G 48% / > securityfs 0 0 0 - /sys/kernel/security > tmpfs 1,8G 105M 1,7G 6% /dev/shm > tmpfs 5,0M 4,0K 5,0M 1% /run/lock > tmpfs 1,8G 0 1,8G 0% /sys/fs/cgroup > cgroup 0 0 0 - /sys/fs/cgroup/systemd > pstore 0 0 0 - /sys/fs/pstore > cgroup 0 0 0 - > /sys/fs/cgroup/cpu,cpuacct > cgroup 0 0 0 - /sys/fs/cgroup/freezer > cgroup 0 0 0 - > /sys/fs/cgroup/net_cls,net_prio > cgroup 0 0 0 - /sys/fs/cgroup/cpuset > cgroup 0 0 0 - /sys/fs/cgroup/memory > cgroup 0 0 0 - /sys/fs/cgroup/pids > cgroup 0 0 0 - /sys/fs/cgroup/devices > cgroup 0 0 0 - /sys/fs/cgroup/perf_event > cgroup 0 0 0 - /sys/fs/cgroup/blkio > systemd-1 - - - - /proc/sys/fs/binfmt_misc > hugetlbfs 0 0 0 - /dev/hugepages > debugfs 0 0 0 - /sys/kernel/debug > mqueue 0 0 0 - /dev/mqueue > /dev/sda1 236M 66M 159M 30% /boot > tmpfs 356M 20K 356M 1% /run/user/1000 > binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc > $ > ~ > lbrtchx > Please include your question in the body as well. The subject should be a summary of the email, not part of it. df shows mounted filesystems. So your sda5 is not mounted. Since it seems to be a LUKS encrypted volume, it cannot be mounted, but rather it's contents can be decrypted and mounted (sda5_crypt). ... Except that sda5_crypt seems to be a LVM physical volume, so you don't mount that directly either, you mount the logical volumes. /dev/mapper/lbrtchx--vg-root seems to be one of those volumes. Try running lsblk, it should show the device tree. -- We don't know who it was that discovered water, but we're pretty sure that it wasn't a fish. -- Marshall McLuhan Eduardo M KALINOWSKI eduardo@kalinowski.com.br
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web