Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: btrfs error read only

  1. #1
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default btrfs error read only

    opensuse 13.2 gnome

    Appeared to be working fine till ran updates then restarted.
    Below notes using mobile :-0

    df -h shows OS sda3 Size = 41G with Used=17G Available=24G and /home Size=424G Used=91G Available=333G.

    Previous failures believed were lack of free space, IF df accurate then suggests this appears not for lack space ??

    gdisk /dev/sda3
    Shows partition table scan=
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present

    with partition3 attribute flags =4 and partition name='' (no name)



    Some messages un/relateds found :
    dir -altr shows last updated log =rkhunter log at Jun 27 08:03 which appears normal

    Error in boot.log ( to Jun 27 07:32)
    The stars in colors Red/Pink

    [ OK ] Started Console System Startup Logging
    [ ***] <=red pink red
    [ *** ] (1 of <=red pink red
    [** ] (1 of 3) A start job is run <=pink red
    Starting Locale Service...
    [ OK ] Started SuSEfirewall2 phase 1.

    Otherwise all OK


    /var/log/snapper.log (to Jun 27 04:28)
    Showing a number of times
    ERR libsnapper ... loading grub-snapshot.cfg failed

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,306
    Blog Entries
    2

    Default Re: btrfs error read only

    First, welcome to the openSUSE Technical Help Forums.
    If you skim other existing Forum threads, you'll notice that whenever you post any command and its results, and any data (eg a log file snippet), you should enclose that within CODE tags, which are created easily by clicking on the hash (#) button of the Forum post editor.

    So, in your situation you should know that you can roll back your system to previous BTRFS snapshots using snapper. Snapshots are created by default every time you boot your system and again when your system is shutdown. Snapshots are also created by default every time you run zypper if you used it to update your system (I don't know today whether a snapshot is also created before and after updates installed by apper).

    The following assumes you can boot either normally or to emergency mode using the Grub menu option.

    Your first step should be to list your stored snapshots with the following command in a root console
    Code:
    snapper list
    You can then rollback your system to a previous snapshot by specifying the snapshot number. The command rolls back by creating another new snapshot entry, so your action can be undone if you wish (You can verify by running the above command to list your snapshot again afterwards)
    Code:
    snapper roolback number 
    I expect after you roll back your system you can try updating again, maybe using zypper if you didn't before with the following command
    Code:
    zypper up
    You can read more about this by viewing the snapshot help with the following command
    Code:
    snapper --help
    Or, you can read about this and plenty more in detail by reading the MAN pages
    Code:
    man snapper
    HTH,
    TSU

  3. #3
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default Re: btrfs error read only

    The boot sequence allows start at states:

    1 Opensuse with Linux 3.16.7.21-desktop
    2 Or (recovery mode)
    3 Or with Linux 3.16.7.13-desktop
    4 Or recovery mode

    Tried 3 and problem loading kernel certificate ... then offered login which failed ?

    systemd-journald Failed to truncate file to its own size: Read-only file system

    Repeats similar message with different numbers on left column (timestamps??)

    Ignoring the text then type:

    journalctl -xd <Enter>

    Then can again login again as root
    Last edited by paulparker; 26-Jun-2015 at 20:27. Reason: typing all this on mobile

  4. #4
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default Re: btrfs error read only

    Able type here on mobile.

    On terminal type and view results from

    snapper list


    Type: snapper rollback 602

    Result: Creating read-only snapper of current system.IO Error.


    see again systemd-journald Failed to truncate file to its own size Read only file ststem..

    Nothing else seems happen... try restart

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: btrfs error read only

    On 2015-06-27 05:36, paulparker wrote:

    > systemd-journald Failed to truncate file to its own size: Read-only
    > file system


    You need boot a rescue CD of the same release and repair the filesystem.
    Probably with fsck, but I'm not that familiar with btrfs.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  6. #6
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default Re: btrfs error read only

    Was required elsewhere :-(

    Back and located my openSUSE-Live to boot up so could read or post here a bit easier.

    At least twice previously similar problems, on those occasions thought was snapper records filled the partition, so re-installed, what see appears not that, also like find better solution.



    Start of boot seems normal, until select either latest or previous kernel/boot settings, then end up in terminal, failing, so use journalctl -xd <Enter> this appears enable READ only mode, with other text every now and then appearing on screen as well as what typed.


    Can mount old /home no problem, see the 455 GB partition on Files.

    Q: How to mount sda3 root / to view log files etc there ?

    Else try re-boot to see if attempt to rollback worked.






    in BOLD the partition root /

    Code:
    linux:~ # gdisk  /dev/sda
    GPT fdisk (gdisk) version 0.8.10
    
    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with protective MBR; using GPT.
    
    Command (? for help): p
    Disk /dev/sda: 976764911 sectors, 465.8 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 3A6AAD46-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 976764877
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 4012 sectors (2.0 MiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1            2048            4095   1024.0 KiB  EF02  primary
       2            4096         4225023   2.0 GiB     0700  primary
       3         4225024        88117247   40.0 GiB    EF00  
       4        88117248       976762879   423.7 GiB   0700  primary
    
    Command (? for help): q
    linux:~ #


    Use e2fsck to check sda3 the / for partition errors, is result another problem ?

    Code:
    linux:~ # e2fsck -v  /dev/sda3
    e2fsck 1.42.12 (29-Aug-2014)
    ext2fs_open2: Bad magic number in super-block
    e2fsck: Superblock invalid, trying backup blocks...
    e2fsck: Bad magic number in super-block while trying to open /dev/sda3
    
    The superblock could not be read or does not describe a valid ext2/ext3/ext4
    filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
    filesystem (and not swap or ufs or something else), then the superblock
    is corrupt, and you might try running e2fsck with an alternate superblock:
        e2fsck -b 8193 <device>
     or
        e2fsck -b 32768 <device>
    
    linux:~ #



    Use e2fsck to check sda4 the /home for partition errors, is result another problem ?

    Code:
    linux:~ # e2fsck -v  /dev/sda4
    e2fsck 1.42.12 (29-Aug-2014)
    ext2fs_open2: Bad magic number in super-block
    e2fsck: Superblock invalid, trying backup blocks...
    e2fsck: Bad magic number in super-block while trying to open /dev/sda4
    
    The superblock could not be read or does not describe a valid ext2/ext3/ext4
    filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
    filesystem (and not swap or ufs or something else), then the superblock
    is corrupt, and you might try running e2fsck with an alternate superblock:
        e2fsck -b 8193 <device>
     or
        e2fsck -b 32768 <device>
    
    linux:~ #

    .

  7. #7
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default Re: btrfs error read only

    Thanks, just re-read what self posted few minutes ago, this option looks easier :-)




    Quote Originally Posted by robin_listas View Post
    On 2015-06-27 05:36, paulparker wrote:

    > systemd-journald Failed to truncate file to its own size: Read-only
    > file system


    You need boot a rescue CD of the same release and repair the filesystem.
    Probably with fsck, but I'm not that familiar with btrfs.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: btrfs error read only

    On 2015-06-27 11:46, paulparker wrote:

    > Start of boot seems normal, until select either latest or previous
    > kernel/boot settings, then end up in terminal, failing, so use
    > *journalctl -xd *<Enter> this appears enable READ only mode, with other
    > text every now and then appearing on screen as well as what typed.


    Initially, on boot, the filesystem is mounted read only, the operating
    system starts loading somethings, and runs a quick fsck. Some things are
    done directly from the initial ram image, I'm unsure at which precise
    instant the root filesystem is mounted r/o and used.

    If the fsck succeeds, then the root filesystem is remounted r/w and boot
    continues. For some reason in your case fsck or a later test failed, "/"
    continues r/o, but the system attempts to start, and fails because it
    can not write to disk.

    This situation should be better detected and reported to the user, with
    a message on how to solve it.


    > Q: How to mount sda3 root */* to view log files etc there ?


    pointless. No logs were written. r/o.

    > Else try re-boot to see if attempt to rollback worked.


    Impossible. r/o.


    > Use e2fsck to check sda3 the */* for partition errors, is result
    > another problem ?


    Obviously. You are trying ext3 fsck on a btrfs partition... can't be.
    Just try plain fsck, let it figure the type.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  9. #9
    Join Date
    Jun 2008
    Location
    UK
    Posts
    5,500

    Default Re: btrfs error read only

    This is the procedure I used successfully on a read-only root partition failure with btrfs, and a problem kernel (3.17.1)ownload and burn appropriate rescue CD.

    1. Boot with Rescue CD
    2. Install [the latest] btrfsprogs (if it's not on the CD). IIRC you need 3.17 or later for Step 4. to work. Older btrfs repair tools were incomplete, I think.
    3. Run "btrfs check --repair /dev/yourpartitionid" on unmounted partition, requires superuser privileges.
    4. If repair successful, [cross everything], and restart with a previous working kernel.
    5. Remove the bad kernel the 3.17.1 kernel.

    That's the best I can come up with, but YMMV.
    Leap 42.3 (ext4, KDE Plasma 5.8.7) ~ stable
    Manjaro (ext4, Xfce) ~ rolling updates
    Tumbleweed (ext4, KDE Plasma5) ~ managed updates via "Tumbleweed Snapshots" service.

  10. #10
    Join Date
    Jun 2008
    Location
    UK
    Posts
    5,500

    Default Re: btrfs error read only

    Quote Originally Posted by consused View Post
    This is the procedure I used successfully on a read-only root partition failure with btrfs, and a problem kernel (3.17.1)ownload and burn appropriate rescue CD.

    1. Boot with Rescue CD
    2. Install [the latest] btrfsprogs (if it's not on the CD). IIRC you need 3.17 or later for Step 3. to work. Older btrfs repair tools were incomplete, I think.
    3. Run "btrfs check --repair /dev/yourpartitionid" on unmounted partition, requires superuser privileges.
    4. If repair successful, [cross everything], and restart with a previous working kernel.
    5. Remove the bad kernel the 3.17.1 kernel.

    That's the best I can come up with, but YMMV.
    With corrections:

    This is the procedure I used successfully on a read-only root partition failure with btrfs, and a problem (3.17.1) kernel:

    1. Download and burn appropriate rescue CD.
    2. Boot with Rescue CD.
    3. Install [the latest] btrfsprogs (if it's not on the CD). IIRC you need 3.17 or later for Step 4. to work. Older btrfs repair tools were incomplete, I think.
    4. Run "btrfs check --repair /dev/yourpartitionid" on unmounted partition, requires superuser privileges.
    5. If repair successful, [cross everything], and restart Tumbleweed with last working kernel.
    6. Remove the bad kernel

    That's the best I can come up with, but YMMV.
    Leap 42.3 (ext4, KDE Plasma 5.8.7) ~ stable
    Manjaro (ext4, Xfce) ~ rolling updates
    Tumbleweed (ext4, KDE Plasma5) ~ managed updates via "Tumbleweed Snapshots" service.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •