I am embarking on trying to fix my system which went into emergency mode when I last booted.
What I wish to do is run some sinple checks using btrfs before trying to repair.
This is what I tried and received:-
linux@localhost:~> sudo btrfs check /dev/sda3
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
ERROR: cannot open device '/dev/sda3': Device or resource busy
ERROR: cannot open file system
linux@localhost:~>
Not much luck here so I tried without device being specified and this gave me:-
linux@localhost:~> sudo btrfs check
btrfs check: too few arguments
usage: btrfs check [options] <device>
Check structural integrity of a filesystem (unmounted).
Check structural integrity of an unmounted filesystem. Verify internal
trees' consistency and item connectivity. In the repair mode try to
fix the problems found.
WARNING: the repair mode is considered dangerous
-s|--super <superblock> use this superblock copy
-b|--backup use the first valid backup root copy
--force skip mount checks, repair is not possible
--repair try to repair the filesystem
--readonly run in read-only mode (default)
--init-csum-tree create a new CRC tree
--init-extent-tree create a new extent tree
--mode <MODE> allows choice of memory/IO trade-offs
where MODE is one of:
original - read inodes and extents to memory (requires
more memory, does less IO)
lowmem - try to use less memory but read blocks again
when needed
--check-data-csum verify checksums of data blocks
-Q|--qgroup-report print a report on qgroup consistency
-E|--subvol-extents <subvolid>
print subvolume extents and sharing state
-r|--tree-root <bytenr> use the given bytenr for the tree root
--chunk-root <bytenr> use the given bytenr for the chunk tree root
-p|--progress indicate progress
--clear-space-cache v1|v2 clear space cache for v1 or v2
linux@localhost:~>
As far as I know --readonly is default option so what am I doing wrong please?
I am not used to receiving updates on live system but these were prompted as soon as the live system opened. I had to download the updates and restart, still in live system not a reboot and then log in again as “linux.” Surely even so the live system should not have mounted the real partitions on my drives. I must have something wrong but need help please.
Further to the above my edit seems to have been lost, possibly timed out. While I could net get a result from btrfs check, I have been able to have a look at the file system:-
linux@localhost:~> sudo btrfs filesystem show /dev/sda3
Label: none uuid: a5a2612d-d0cb-4b05-a3cf-cc95ecd0235b
Total devices 1 FS bytes used 35.89GiB
devid 1 size 40.00GiB used 40.00GiB path /dev/mapper/3600605b0057337c01df4874d2e7f5d6e-part3
linux@localhost:~>
This tell me the system is full so that may account for my problems. I shall ahve to remove some of the snapshots and see if that helps.
On this topic, I have already built system with 40GB as advised but the system is nearly full even without the snapshots so why is the system not managing this issue?
Of course I may have it all wrong.
I just checked a system (running in a virtual machine). It shows 7.4G in use. This was, admittedly, a small install (using Generic Desktop). But even KDE should only add 5G to that. Or is “/home” part of the “btrfs” partition?
I am not saying I have the perfect solution for snapshots and some would even say that it is not a good solution, but I tuned snapper to keep fewer snapshots. It has reduced the amount of root file system used.
This is what I wrote up and it is working well for me.
Hi and thanks for the question. Installed back in version 42.? whenever I was first able to do a new install with btrfs and 40GB and upgraded so system has been in use a while. partition only has /root not home or multimedia which are on different partitions 500GB and 3TB ot there abouts.
My probing does suggest that the disk has been filled with metadata which could be what has broken my system. I shall do a new installation if I do not get help soon as I am finding I cannot even mount the problem partition on my live system
Talking to myself here!
The attmpts to mount from live cd were not successful:-
linux@localhost:/> sudo mount /dev/sda3 /mnt
mount: /mnt: /dev/sda3 already mounted or mount point busy.
linux@localhost:/>
This is strange to me as I am on a live system so nothing should presently be mounted. Just to see what my system thinks it is doing I checked thus:-
linux@localhost:/> sudo blkid -o list
device fs_type label mount point UUID
---------------------------------------------------------------------------------------
/dev/loop0 iso9660 openSUSE_Leap_15.0_KDE_Live /run/initramfs/live 2018-05-25-17-36-17-00
/dev/loop1 squashfs /run/initramfs/squashfs_container
/dev/loop2 ext4 /run/rootfsbase 294482d7-50a9-48a7-8cf6-f55221e98a78
/dev/sda1 vfat (in use) B738-D576
/dev/sda2 swap (in use) 46f191b6-7472-49c0-bd98-75824020d947
/dev/sda3 btrfs (in use) a5a2612d-d0cb-4b05-a3cf-cc95ecd0235b
/dev/sda4 xfs (in use) 4ceac2e7-6bdc-40d2-9dff-da7a2099bf45
/dev/sda5 xfs (in use) 4272b75a-ea72-4068-8826-e2dfc5611fd5
/dev/sr0 iso9660 LXFDVD239 /run/initramfs/isoscan 2018-06-04-22-05-53-00
/dev/mapper/3600605b0057337c01df4874d2e7f5d6e-part1
vfat (not mounted) B738-D576
/dev/mapper/3600605b0057337c01df4874d2e7f5d6e-part2
swap (not mounted) 46f191b6-7472-49c0-bd98-75824020d947
/dev/mapper/3600605b0057337c01df4874d2e7f5d6e-part3
btrfs (not mounted) a5a2612d-d0cb-4b05-a3cf-cc95ecd0235b
/dev/mapper/3600605b0057337c01df4874d2e7f5d6e-part4
xfs (not mounted) 4ceac2e7-6bdc-40d2-9dff-da7a2099bf45
/dev/mapper/3600605b0057337c01df4874d2e7f5d6e-part5
xfs (not mounted) 4272b75a-ea72-4068-8826-e2dfc5611fd5
/dev/mapper/3600605b0057337c01df4874d2e7f5d6e
(in use)
linux@localhost:/>
Which says /dev/sda3 is in use but not mounted. I do not know what this means but I had hoped somebody would shine a light. The only thing left for me to try is to try and mount using the UUID:-
linux@localhost:/> sudo mount a5a2612d-d0cb-4b05-a3cf-cc95ecd0235b /mnt
mount: /mnt: special device a5a2612d-d0cb-4b05-a3cf-cc95ecd0235b does not exist.
linux@localhost:/>
Hi and what an excellent article for which many thanks. Unfortunately I didn’t see it before but I already have 40Gb partition for /root so I thought I would be OK. It seems however my drive is full so I suspect some logs have been mounting up otherwise how else could I fill up 40GB. I am less sanguine about Tumbleweed although I am willing to give it another try but…
In despair and with a live distro of openSUSE Leap 15.0 in my DVD drive already as I am using it as live distro to try and resolve my problems (see above) I selected the install option. This failed at several levels with errors I can report if I try again but are lost while I return here. In short the existing messed up installation prevents me from accepting the install. Problems even with Yast.
So since you report problems with drive filling up, please could you point me to somewhere where I can clean things up at least to enable me to do a new installation?
Many thanks,
Budge
I ran into that problem with Leap 15.0 and with Tumbleweed at around that time. It seems like a bug to me. I don’t know whether it is still a problem.
I experimented at the time.
I could successfully mount using the rescue system (on the install DVD). But I could not mount from the installer (after using CTRL-ALT-F2).
I could successfully mount using the live rescue iso, but I could not mount using the live KDE iso. I don’t think I tested the Gnome live iso at that time.
I have had my partition fill up but I haven’t had it fill up to take the system down. I was able to drop down into a terminal and remove the snapshots.
snapper delete <snapshot number>
I am guessing you know that much but it sounds like you are having issues even booting the system? I am afraid that the solution to this is a bit outside the range of my knowledge.
Many thanks for info on your experiences. Seems like you were in the same place as me but how did you get out of it. I have now booted into a live Ubuntu 19.04 DVD and will play around with this as it will not be cluttered with all the Yast data which is giving openSUSE installer indigestion. If all else fails I shall just format the btrfs partition and start over and hope it doesn’t influence my xfs partitions. What do you think?
You should probably check that the live system is seeing the drive as sda
I use su -
Can’t say I’ve ever used sudo in Suse
Not sure if that matters
I don’t use snapshots and actually still use ext4
I can’t say I’d ever really need a snapshot in my case
In some situation with customers machines I have had success with live editions of Ubuntu to access and manipulate files/partitions etc…
But it should be entirely possible to do it with a live Leap CD/USB/DVD
I say DVD because you can use Rescue feature from the DVD boot menu
At login : root
Check your partitions with parted or fdisk
Mount the partions you need
Drill to the location you need and delete as required
I think
Hi and thanks for the info.
I explain my experience not now to kaccessible application but to behaviour brought about by a full root partition.
I was not able to mount the corrupted drive in any way that I tried using all the btrfs advice I could gather and both opensuse and ubuntu live systems.
I tried to re-install over existing system but the installer refused because the system on the partition was recognised as faulty.
Time was being lost so in the end I just deleted the partition and did a new installation.
I used Leap 15.1 since it was a new install and of course my /home directory was untouched through all this so I am now back up and running with all my profiles etc intact.
Still big question marks over KDE but this thread should now be closed.
Thanks to all,
Budgie2