mkfs.btrfs - error checking /dev/sda5 mount status
Hi,
I'm hitting this issue - sda5 is a normal device, nothing to do with loop, encryption etc.
# mkfs.btrfs /dev/sda5
WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using
error checking /dev/sda5 mount status
Is there something I can do to resolve this?
Thank you
Lubos
Quoted 5 lines · Lubos Kolouch
Hi,
I'm hitting this issue - sda5 is a normal device, nothing to do with loop, encryption etc.
Quoted 8 lines
# mkfs.btrfs /dev/sda5WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using
error checking
/dev/sda5mount statusIs there something I can do to resolve this?
Some months ago I posted a patch [*] which allows to create a filesystem even if an integrity tests fail.
Anyway it would be interesting understand why mkfs.btrfs fails. It is possible to have a strace of the command ?
Regards
G.Baroncelli
Quoted 4 lines
Thank you
Lubos
[*] email dated 01/03/2011 - subject: [PATCH] add a --force option to mkfs.btrf [was Re: Odd mkbtrfs behavior inside of chroot]
Quoted 6 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
.
Goffredo Baroncelli, Tue, 08 Feb 2011 21:00:25 +0100:
Quoted 11 lines · Lubos Kolouch
Quoted 10 lines
Hi,
I'm hitting this issue - sda5 is a normal device, nothing to do with loop, encryption etc.
# mkfs.btrfs /dev/sda5WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see
http://btrfs.wiki.kernel.org before using
Quoted 9 lines
Quoted 3 lines
error checking
/dev/sda5mount statusIs there something I can do to resolve this?
Some months ago I posted a patch [*] which allows to create a filesystem even if an integrity tests fail.
Anyway it would be interesting understand why mkfs.btrfs fails. It is possible to have a strace of the command ?
here ... http://paste.pocoo.org/show/334638/
but it is not in chroot, it is in "normal" system
Lubos
Quoted 23 lines · Lubos Kolouch
Goffredo Baroncelli, Tue, 08 Feb 2011 21:00:25 +0100:
Quoted 11 lines · Lubos Kolouch
Quoted 10 lines
Hi,
I'm hitting this issue - sda5 is a normal device, nothing to do with loop, encryption etc.
# mkfs.btrfs /dev/sda5WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see
http://btrfs.wiki.kernel.org before usingQuoted 9 lines
Quoted 3 lines
error checking
/dev/sda5mount statusIs there something I can do to resolve this?
Some months ago I posted a patch [*] which allows to create a filesystem even if an integrity tests fail.
Anyway it would be interesting understand why mkfs.btrfs fails. It is possible to have a strace of the command ?
Quoted 5 lines
here ... http://paste.pocoo.org/show/334638/
but it is not in chroot, it is in "normal" systemLubos
Hi Lubos,
Could you post also the output of "cat /proc/mounts" command and the output of "btrfs filesystem show" command.
I cannot understand what should be the problem.
Quoted 6 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
.
Goffredo Baroncelli, Wed, 09 Feb 2011 19:25:34 +0100:
Quoted 27 lines · Lubos Kolouch
Quoted 26 lines
Goffredo Baroncelli, Tue, 08 Feb 2011 21:00:25 +0100:
Quoted 11 lines · Lubos Kolouch
Quoted 10 lines
Hi,
I'm hitting this issue - sda5 is a normal device, nothing to do with loop, encryption etc.
# mkfs.btrfs /dev/sda5WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using
Quoted 10 lines
Quoted 3 lines
error checking
/dev/sda5mount statusIs there something I can do to resolve this?
Some months ago I posted a patch [*] which allows to create a filesystem even if an integrity tests fail.
Anyway it would be interesting understand why mkfs.btrfs fails. It is possible to have a strace of the command ?here ... http://paste.pocoo.org/show/334638/ but it is not in chroot, it is in "normal" system
Quoted 8 lines
Quoted 3 lines
Lubos
Hi Lubos,
Could you post also the output of "cat
/proc/mounts" command and the output of "btrfs filesystem show" command. I cannot understand what should be the problem.
Hi Goffredo,
Sure,
# cat /proc/mounts
rootfs / rootfs rw 0 0/dev/root / btrfs rw,noatime,compress,ssd 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
rc-svcdir /lib/rc/init.d tmpfs rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0 udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=217934,mode=755 0 0 fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0 none /dev/shm tmpfs rw,relatime 0 0/dev/sda1 /boot ext2 rw,relatime,errors=continue 0 0
none /var/tmp/portage tmpfs rw,relatime 0 0binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0/dev/mapper/_dev_sda6 /home btrfs rw,noatime,compress,ssd 0 0
# btrfs filesystem show
Label: none uuid: fd070c17-e98b-4b50-9fa8-3453482aafa2
Total devices 1 FS bytes used 5.51GB devid 1 size 18.64GB used 10.79GB path /dev/sda2
Label: none uuid: bf9a1b00-f8bd-44d3-b140-10eea088a60e
Total devices 1 FS bytes used 6.73GB devid 1 size 19.54GB used 19.54GB path /dev/sda5
Label: none uuid: ae0ba016-1945-4e7a-9fb4-e9311d199727
Total devices 1 FS bytes used 57.50GB devid 1 size 78.91GB used 78.91GB path /dev/dm-0
# mkfs.btrfs /dev/sda5
WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using
error checking /dev/sda5 mount status
Also, I can mount it no problem - strange, isn't it
Lubos
Quoted 1 line · Lubos Kolouch
/dev/root/ btrfs rw,noatime,compress,ssd 0 0
My memory of the strace showed that there was no /dev/root when it tried to open it - can you confirm whether or not that's the case please ?
cheers!
Chris
Signature · 1 line
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
Chris Samuel, Thu, 10 Feb 2011 14:09:17 +1100:
Quoted 11 lines · Lubos Kolouch
Quoted 2 lines
/dev/root/ btrfs rw,noatime,compress,ssd 0 0My memory of the strace showed that there was no
/dev/rootwhen it tried to open it - can you confirm whether or not that's the case please ?cheers!
Chris
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
Chris,
You mean this?
# ls -la /dev/root ls: cannot access /dev/root: No such file or directory
Lubos
Hallo, Lubos,
Du meintest am 09.02.11:
Quoted 4 lines
# cat /proc/mountsrootfs / rootfs rw 0 0
/dev/root/ btrfs rw,noatime,compress,ssd 0 0
"/dev/root" is a symlink (which I don't like).
rdev
shows which real device is meant.
Viele Gruesse!
Helmut
Hallo, Lubos,
Du meintest am 10.02.11:
Quoted 5 lines
Quoted 1 line
Quoted 1 line
/dev/root/ btrfs rw,noatime,compress,ssd 0 0# ls -la /dev/root ls: cannot access /dev/root: No such file or directory
ls -la $(rdev)
(but that's no simple way ...)
Viele Gruesse!
Helmut
Quoted 77 lines · Lubos Kolouch
Goffredo Baroncelli, Wed, 09 Feb 2011 19:25:34 +0100:
Quoted 27 lines · Lubos Kolouch
Quoted 26 lines
Goffredo Baroncelli, Tue, 08 Feb 2011 21:00:25 +0100:
Quoted 11 lines · Lubos Kolouch
Quoted 10 lines
Hi,
I'm hitting this issue - sda5 is a normal device, nothing to do with loop, encryption etc.
# mkfs.btrfs /dev/sda5WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using
Quoted 10 lines
Quoted 3 lines
error checking
/dev/sda5mount statusIs there something I can do to resolve this?
Some months ago I posted a patch [*] which allows to create a filesystem even if an integrity tests fail.
Anyway it would be interesting understand why mkfs.btrfs fails. It is possible to have a strace of the command ?here ... http://paste.pocoo.org/show/334638/ but it is not in chroot, it is in "normal" system
Quoted 8 lines
Quoted 3 lines
Lubos
Hi Lubos,
Could you post also the output of "cat
/proc/mounts" command and the output of "btrfs filesystem show" command. I cannot understand what should be the problem.Hi Goffredo,
Sure,
# cat /proc/mountsrootfs / rootfs rw 0 0
/dev/root/ btrfs rw,noatime,compress,ssd 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
rc-svcdir/lib/rc/init.dtmpfs rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 securityfs/sys/kernel/securitysecurityfs rw,nosuid,nodev,noexec,relatime 0 0
debugfs/sys/kernel/debugdebugfs rw,nosuid,nodev,noexec,relatime 0 0 udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=217934,mode=755 0 0 fusectl/sys/fs/fuse/connectionsfusectl rw,relatime 0 0
none/dev/ptsdevpts rw,relatime,mode=600,ptmxmode=000 0 0 none/dev/shmtmpfs rw,relatime 0 0/dev/sda1/boot ext2 rw,relatime,errors=continue 0 0
none/var/tmp/portagetmpfs rw,relatime 0 0binfmt_misc/proc/sys/fs/binfmt_miscbinfmt_miscrw,nosuid,nodev,noexec,relatime 0 0/dev/mapper/_dev_sda6/home btrfs rw,noatime,compress,ssd 0 0# btrfs filesystem showLabel: none uuid: fd070c17-e98b-4b50-9fa8-3453482aafa2
Total devices 1 FS bytes used 5.51GB devid 1 size 18.64GB used 10.79GB path /dev/sda2Label: none uuid: bf9a1b00-f8bd-44d3-b140-10eea088a60e
Total devices 1 FS bytes used 6.73GB devid 1 size 19.54GB used 19.54GB path /dev/sda5Label: none uuid: ae0ba016-1945-4e7a-9fb4-e9311d199727
Total devices 1 FS bytes used 57.50GB devid 1 size 78.91GB used 78.91GB path /dev/dm-0
Quoted 8 lines
# mkfs.btrfs /dev/sda5WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using
error checking
/dev/sda5mount statusAlso, I can mount it no problem - strange, isn't it
Ok, I think to have track down the problem. To me it seems a bug in mkfs.btrfs.
The first thing that should be highlighted is that you are trying to format an already btrfs formatted device. In this there is not anything wrong.
However, before formatting a device mkfs.btrfs performs some sanity check. It checks if the device is already mounted, scanning /proc/mounts.
In a normal case (the device which will be formatted doesn't contain a btrfs filesystem), mkfs.btrfs is smart enough to don't check device which are in /proc/mounts bat doesn't exist (like /dev/root).
Instead when the device which will be formatted already contains a btrfs filesystem, mkfs.btrfs performs a different checks. In fact it considers also the case of a multi-device based btrfs filesystem. However in this case it doesn't skip a not existent device but it raises an error. I think that this is a bug.
As workaround I suggest the following: make a link between the real root device and /dev/root.
It should be sufficient to format the device.
Quoted 8 lines
Lubos
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
.
Goffredo Baroncelli, Thu, 10 Feb 2011 19:24:57 +0100:
Quoted 107 lines · Lubos Kolouch
Quoted 75 lines
Goffredo Baroncelli, Wed, 09 Feb 2011 19:25:34 +0100:
Quoted 27 lines · Lubos Kolouch
Quoted 26 lines
Goffredo Baroncelli, Tue, 08 Feb 2011 21:00:25 +0100:
Quoted 11 lines · Lubos Kolouch
Quoted 10 lines
Hi,
I'm hitting this issue - sda5 is a normal device, nothing to do with loop, encryption etc.
# mkfs.btrfs /dev/sda5WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using
Quoted 10 lines
Quoted 3 lines
error checking
/dev/sda5mount statusIs there something I can do to resolve this?
Some months ago I posted a patch [*] which allows to create a filesystem even if an integrity tests fail. Anyway it would be interesting understand why mkfs.btrfs fails. It is possible to have a strace of the command ?
here ... http://paste.pocoo.org/show/334638/ but it is not in chroot, it is in "normal" system
Quoted 8 lines
Quoted 3 lines
Lubos
Hi Lubos,
Could you post also the output of "cat
/proc/mounts" command and the output of "btrfs filesystem show" command. I cannot understand what should be the problem.Hi Goffredo,
Sure,
# cat /proc/mountsrootfs / rootfs rw 0 0
/dev/root/ btrfs rw,noatime,compress,ssd 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 rc-svcdir/lib/rc/init.dtmpfs rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 securityfs/sys/kernel/securitysecurityfs rw,nosuid,nodev,noexec,relatime 0 0 debugfs/sys/kernel/debugdebugfs rw,nosuid,nodev,noexec,relatime 0 0 udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=217934,mode=755 0 0 fusectl/sys/fs/fuse/connectionsfusectl rw,relatime 0 0 none/dev/ptsdevpts rw,relatime,mode=600,ptmxmode=000 0 0 none/dev/shmtmpfs rw,relatime 0 0/dev/sda1/boot ext2 rw,relatime,errors=continue 0 0 none/var/tmp/portagetmpfs rw,relatime 0 0binfmt_misc/proc/sys/fs/binfmt_miscbinfmt_miscrw,nosuid,nodev,noexec,relatime 0 0/dev/mapper/_dev_sda6/home btrfs rw,noatime,compress,ssd 0 0# btrfs filesystem showLabel: none uuid: fd070c17-e98b-4b50-9fa8-3453482aafa2
Total devices 1 FS bytes used 5.51GB devid 1 size 18.64GB used 10.79GB path /dev/sda2Label: none uuid: bf9a1b00-f8bd-44d3-b140-10eea088a60e
Total devices 1 FS bytes used 6.73GB devid 1 size 19.54GB used 19.54GB path /dev/sda5Label: none uuid: ae0ba016-1945-4e7a-9fb4-e9311d199727
Total devices 1 FS bytes used 57.50GB devid 1 size 78.91GB used 78.91GB path /dev/dm-0Quoted 8 lines
# mkfs.btrfs /dev/sda5WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see
http://btrfs.wiki.kernel.org before usingerror checking
/dev/sda5mount statusAlso, I can mount it no problem - strange, isn't it
Ok, I think to have track down the problem. To me it seems a bug in mkfs.btrfs.
The first thing that should be highlighted is that you are trying to format an already btrfs formatted device. In this there is not anything wrong.
However, before formatting a device mkfs.btrfs performs some sanity check. It checks if the device is already mounted, scanning
/proc/mounts.In a normal case (the device which will be formatted doesn't contain a btrfs filesystem), mkfs.btrfs is smart enough to don't check device which are in
/proc/mountsbat doesn't exist (like/dev/root).Instead when the device which will be formatted already contains a btrfs filesystem, mkfs.btrfs performs a different checks. In fact it considers also the case of a multi-device based btrfs filesystem. However in this case it doesn't skip a not existent device but it raises an error. I think that this is a bug.
Quoted 5 lines
As workaround I suggest the following: make a link between the real root device and
/dev/root.It should be sufficient to format the device.
Hello - you are right...
# ln -s /dev/sda2 /dev/root
# mkfs.btrfs /dev/sda5
WARNING! - Btrfs v0.19-35-g1b444cd-dirty IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using
fs created label (null) on /dev/sda5
nodesize 4096 leafsize 4096 sectorsize 4096 size 19.54GB
Btrfs v0.19-35-g1b444cd-dirty
Lubos