You are not logged in.

#1 2021-10-11 19:34:01

ad4ms3
Member
From: Bradford, UK
Registered: 2018-01-19
Posts: 91

/dev/sda3 mounted wrongly, takes 2x space

Something incredibly silly, but I'm struggling to find a solution..
As above, I was wondering why my arch sda3 takes 25. 6GB, whereas it should have taken only 12.8GB. I have freshly installed arch, after previous SSD died with arch on it
In Baobab, it shows "/ arch linux - 71.2GB available and 84GB in total". The same info is below, but with "mnt /mnt". So, in total, sda3 is loaded with double data - 25.6GB.
I even deleted fstab in arch-chroot, and generated a new one, but still the same issue.
Whilst installing arch (followed wiki as usual), before chrooting, I typed commands required for mounting partitions

mount /dev/sda3 /mnt
mount /dev/sda4 /home

Here is my fstab

# /dev/sda3 LABEL=/
UUID=5624a6c2-611a-4a5b-b3df-503c31edc8c7       /mnt            ext4            rw,relatime     0 1

# /dev/sda2
UUID=7F5AE7FC66510C9E   /windows10      ntfs            rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096   0 0

# /dev/sda4 LABEL=/home
UUID=be71ca53-0407-47c5-9251-a59b7c6965a5   /mnt/home         ext4            rw,relatime 0 1
lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 465.8G  0 disk 
|-sda1   8:1    0   500M  0 part 
|-sda2   8:2    0   200G  0 part /windows10
|-sda3   8:3    0    80G  0 part /mnt
|                                /
`-sda4   8:4    0 185.3G  0 part /mnt/home
dev/sda4: LABEL="/home" UUID="be71ca53-0407-47c5-9251-a59b7c6965a5" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="4ae7bf6b-68b6-4357-9672-98a9f6f9c157"
/dev/sda2: BLOCK_SIZE="512" UUID="7F5AE7FC66510C9E" TYPE="ntfs" PARTUUID="b076afdf-7656-40fd-a8e3-3239173e40f9"
/dev/sda3: LABEL="/" UUID="5624a6c2-611a-4a5b-b3df-503c31edc8c7" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="45727a13-97bf-4f50-8a02-c09e96e59e18"
/dev/sda1: UUID="3B49-3F49" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="8cd27214-1685-4f7d-a825-574f6bad5998"
fdisk -l
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC  WDS500G2B0B
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: gpt

Device         Start       End   Sectors   Size Type
/dev/sda1       2048   1026047   1024000   500M EFI System
/dev/sda2    1026048 420456447 419430400   200G Microsoft basic data
/dev/sda3  420456448 588228607 167772160    80G Linux filesystem
/dev/sda4  588228608 976773119 388544512 185.3G Linux filesystem

If I remove "mnt" in fstab, and leave only /, plasma won't load.
Any tips highly appreciated:) Thank you

Last edited by ad4ms3 (2021-10-11 19:58:30)

Offline

#2 2021-10-11 20:17:20

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: /dev/sda3 mounted wrongly, takes 2x space

sda3 is simply mounted twice, to the root filesystem as well as to /mnt - there's nothing spectacular about the display, but the double mount shouldn't be there or necessary.

If I remove "mnt" in fstab, and leave only /, plasma won't load.

Can you boot the multi-user.target? (2nd link below)
Also post a complete system journal of a failing boot ("sudo journalctl -b -1" for the previous one, you can use the tip in the 1st link below to paste it from a text shell)

Offline

#3 2021-10-11 20:54:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: /dev/sda3 mounted wrongly, takes 2x space

ad4ms3 wrote:

If I remove "mnt" in fstab, and leave only /, plasma won't load.

This is ambiguous.  You wrongly have /mnt included in the lines for two partitions.  If you removed /mnt from both of them, that would explain this symptom as your users home directory is actually on sda3 while sda4 is likely empty.  So if you mount sda4 where it always should have been on /home then you'll mask your entire user directory (and all plasma configs / startup files).

If this is indeed what is happening, you need to copy / move everything from [sda3]/home to [sda4]/ and then properly mount the partitions where they should be.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2021-10-11 21:20:15

ad4ms3
Member
From: Bradford, UK
Registered: 2018-01-19
Posts: 91

Re: /dev/sda3 mounted wrongly, takes 2x space

Trilby wrote:
ad4ms3 wrote:

If I remove "mnt" in fstab, and leave only /, plasma won't load.

This is ambiguous.  You wrongly have /mnt included in the lines for two partitions.  If you removed /mnt from both of them, that would explain this symptom as your users home directory is actually on sda3 while sda4 is likely empty.

It was like that indeed. The problem occurred when I moved home directory on sda3 to sda4.
I still don't understand how this happened, as I have always mounted mnt with mount /dev/sdxX /mnt and it worked without doubling the used space.

If this is indeed what is happening, you need to copy / move everything from [sda3]/home to [sda4]/ and then properly mount the partitions where they should be.

Sda4 is now /home and contains /home folders and files.
I'm struggling to understand how to mount them properly. I can't imagine doing it differently than wiki advices.
I have already deleted fstab and regenerated it after mounting sda2, 3 and 4, as indicated in the first post.

Offline

#5 2021-10-11 21:24:51

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: /dev/sda3 mounted wrongly, takes 2x space

It appears that you forgot to pass genfstab the root dir (/mnt) when you ran it.

That, or you mounted things at /mnt inside the chroot (ie, /mnt/mnt)

You still mentioned doubling the space. THAT DID NOT HAPPEN. You can mount something 10 times, it doesn't take up any more space, it's just accessible in different paths.

Last edited by Scimmia (2021-10-11 21:26:34)

Offline

#6 2021-10-12 05:17:21

ad4ms3
Member
From: Bradford, UK
Registered: 2018-01-19
Posts: 91

Re: /dev/sda3 mounted wrongly, takes 2x space

Whilst installing, I did run genfstab -U /mnt >> /mnt/etc/fstab. But I only mounted /mnt, forgetting about /home and /win10. Then, when Arch was fully up and running, sorted other mouting point and now problem roll When I come home I will re-do genfstab again. smile

I know that system does not take twice the space. It would be illogical, but it appears so. Dolphin shows 25.6GB taken, whereas each mouting point 12.8 smile

Last edited by ad4ms3 (2021-10-12 05:19:21)

Offline

#7 2021-10-12 12:52:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: /dev/sda3 mounted wrongly, takes 2x space

You don't need to use genfstab, just edit the fstab manually and fix it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2021-10-12 20:34:28

ad4ms3
Member
From: Bradford, UK
Registered: 2018-01-19
Posts: 91

Re: /dev/sda3 mounted wrongly, takes 2x space

So, I can clearly see the issue, but I am slowly giving up. If I replace /mnt with / in fstab, DE won't load and enters into a circle of asking for password. lsblk confirms two mount points for /dev/sda3. Even in Dolphin, I can see it: / and /mnt are copy of one another.
Editing fstab does nothing, I just don't know what to edit in there.

[ad4ms3@archlinux ~]$ cat /etc/fstab
# /dev/sda2
UUID=7F5AE7FC66510C9E   /windows10      ntfs            rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096   0 0

# /dev/sda4 LABEL=/home
UUID=be71ca53-0407-47c5-9251-a59b7c6965a5   /home         ext4            rw,relatime 0 1

# /dev/sda3 LABEL=/
UUID=5624a6c2-611a-4a5b-b3df-503c31edc8c7       /               ext4            rw,relatime     0 1

Above fstab will not permit system to load. must be /mnt.
UUID is correct as per blkid. lsblk still confirms two mount points for sda3.  Can the issue be somewhere else?

Offline

#9 2021-10-12 20:40:17

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: /dev/sda3 mounted wrongly, takes 2x space

Use the new fstab, boot oly the multi-user.target (2nd link below) log in (in doubt as root) and inspect "ls /home" - is your $HOME (/home/ad4ms3 or something) there what what permissions does it have?

Edit:

It was like that indeed. The problem occurred when I moved home directory on sda3 to sda4.

Sda4 is now /home and contains /home folders and files.

Yeah, probably not, right? Mount sda3 somewhere (/mnt/home is fine unless /mnt duplicates /) and copy/move the $HOME from sda3 to sda4 so that it'll be available when sda4 is mounted at /home

Last edited by seth (2021-10-12 20:42:37)

Offline

#10 2021-10-12 21:50:37

ad4ms3
Member
From: Bradford, UK
Registered: 2018-01-19
Posts: 91

Re: /dev/sda3 mounted wrongly, takes 2x space

So, I think, I managed to solve the problem, and can load to plasma:

[ad4ms3@archlinux ~]$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 465.8G  0 disk 
|-sda1   8:1    0   500M  0 part 
|-sda2   8:2    0   200G  0 part /windows10
|-sda3   8:3    0    80G  0 part /
`-sda4   8:4    0 185.3G  0 part /home
sr0     11:0    1  1024M  0 rom  
[ad4ms3@archlinux ~]$ cat /etc/fstab
# /dev/sda2
UUID=7F5AE7FC66510C9E   /windows10      ntfs            rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096 0 0

# /dev/sda4 LABEL=/home
UUID=be71ca53-0407-47c5-9251-a59b7c6965a5   /home         ext4            rw,relatime 0 1

# /dev/sda3 LABEL=/
UUID=5624a6c2-611a-4a5b-b3df-503c31edc8c7       /               ext4            rw,relatime     0 1

[ad4ms3@archlinux ~]$ 

However, it is still bothering me, why baobab shows two '/' mount points (one "archlinux", and second "Filesystem root") with 71GB available on each of them, whereas Dolphin states 62.1GB available, 9GB discrepancy.

PS. Not only fstab was incorrect, the issue was also with /etc/passwd and /etc/default/useradd... headache big_smile

Last edited by ad4ms3 (2021-10-12 21:55:10)

Offline

#11 2021-10-12 21:58:31

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: /dev/sda3 mounted wrongly, takes 2x space

I know nothing about baobab, but is "archlinux" the partition label?

lsblk -f

Discrepancy:
1. make sure it's GB (1000^3) or GiB (1024^3) in either case
2. ext4 reserves 5% for the root only
3. Is there still data in the *unmounted* /home (or /windows10) path?

Offline

#12 2021-10-12 22:36:29

ad4ms3
Member
From: Bradford, UK
Registered: 2018-01-19
Posts: 91

Re: /dev/sda3 mounted wrongly, takes 2x space

lsblk -f
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                           
|-sda1 vfat   FAT32       3B49-3F49                                           
|-sda2 ntfs               7F5AE7FC66510C9E                        179G    10% /windows10
|-sda3 ext4   1.0   /     5624a6c2-611a-4a5b-b3df-503c31edc8c7   62.1G    15% /
`-sda4 ext4   1.0   /home be71ca53-0407-47c5-9251-a59b7c6965a5  169.1G     2% /home

Folders home and Windows10 are linked to their mount points (sda4 and sda2), folder mnt is now empty.
15% for the fresh installation with only basic programs seems still too much (pkg is empty, journals are set to 50M, etc). Either there is still something hidden, or it is what it is.

Thank you everyone smile

Last edited by ad4ms3 (2021-10-12 22:37:19)

Offline

Board footer

Powered by FluxBB