You are not logged in.

#1 2014-12-22 11:17:01

domentoi
Member
Registered: 2014-10-26
Posts: 5

[SOLVED] df -h does not reflect true root filesystem size

Why does df -h show root filesystem as being only 20G?

df -h
Filesystem              Size  Used Avail Use% Mounted on
/dev/mapper/cryptroot    20G   15G  4.6G  76% /
dev                     7.7G     0  7.7G   0% /dev
run                     7.7G  668K  7.7G   1% /run
tmpfs                   7.7G   70M  7.7G   1% /dev/shm
tmpfs                   7.7G     0  7.7G   0% /sys/fs/cgroup
tmpfs                   7.7G  224K  7.7G   1% /tmp
/dev/sda1               239M   40M  183M  18% /boot
tmpfs                   1.6G  8.0K  1.6G   1% /run/user/1000

That is what my df -h output looks like. My setup is full disk encryption using dm-crypt with LUKS, per the guide on arch wiki. I basically created one /boot partition and left the rest of the disk to be an encrypted partition for the root filesystem. So why is my system complaining about (and acting as if it's running out of space)? Have I forgotten something?

Thank you for reading this. Let me know if you need any more logs or info on my setup - I realise I haven't provided very much info here, but I can't think of what to provide. smile

Last edited by domentoi (2014-12-24 19:02:32)

Offline

#2 2014-12-22 11:44:37

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [SOLVED] df -h does not reflect true root filesystem size

Hi, a little more info would be okay, check 'lsblk', and share.

Offline

#3 2014-12-22 11:59:28

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,949

Re: [SOLVED] df -h does not reflect true root filesystem size

the output of lsblk & fdisk -l should help to clarify what partitions your system sees.

Your /etc/fstab contents might als be useful.

Last edited by Lone_Wolf (2014-12-22 11:59:41)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2014-12-22 11:59:40

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [SOLVED] df -h does not reflect true root filesystem size

How big is the partition you created?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2014-12-22 12:20:14

domentoi
Member
Registered: 2014-10-26
Posts: 5

Re: [SOLVED] df -h does not reflect true root filesystem size

This is lsblk:

NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda             8:0    0 465.8G  0 disk  
├─sda1          8:1    0   250M  0 part  /boot
└─sda2          8:2    0 465.5G  0 part  
  └─cryptroot 254:0    0 465.5G  0 crypt /
sdb             8:16   0  14.9G  0 disk  
└─sdb1          8:17   0  14.9G  0 part 

and fdisk -l

Disk /dev/sdb: 14.9 GiB, 16013942784 bytes, 31277232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5da5572f

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        2048 31275007 31272960 14.9G 73 unknown

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa5018820

Device     Boot  Start       End   Sectors   Size Id Type
/dev/sda1  *      2048    514047    512000   250M 83 Linux
/dev/sda2       514048 976773167 976259120 465.5G 83 Linux

Disk /dev/mapper/cryptroot: 465.5 GiB, 499842572288 bytes, 976255024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdc: 1.4 TiB, 1500301908480 bytes, 2930277165 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x445e51a8

And graysky: I thought I made the partition for /boot 250 MB and the encrypted partition 465.5 GB but I'm now quite sure I did something wrong...

Thank you all

Offline

#6 2014-12-22 16:08:13

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] df -h does not reflect true root filesystem size

Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2014-12-23 03:55:17

domentoi
Member
Registered: 2014-10-26
Posts: 5

Re: [SOLVED] df -h does not reflect true root filesystem size

Anyone?

Offline

#8 2014-12-23 07:24:34

MSC
Member
Registered: 2014-07-13
Posts: 33

Re: [SOLVED] df -h does not reflect true root filesystem size

Your partition layout looks fine. Most likely the filesystem is not the correct size.

If it's an ext4 partition, you should be able to fix it by running "sudo resize2fs /dev/mapper/cryptroot". Since resize2fs defaults to the full size of the partition, that will grow it appropriately. If you're using a different FS you may need a different command.

Offline

#9 2014-12-23 16:31:03

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] df -h does not reflect true root filesystem size

What filesystem?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2014-12-24 07:53:59

domentoi
Member
Registered: 2014-10-26
Posts: 5

Re: [SOLVED] df -h does not reflect true root filesystem size

Wow! Thank you so much MSC! I didn't know that the filesystem could be a different size from the partition it was located in...Your command worked for me. Thanks so much - I've learned something new today...huh... yikes

Offline

#11 2014-12-24 08:16:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] df -h does not reflect true root filesystem size

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB