FAQ14: Growing disk partitions: fdisk

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

FAQ14: Growing disk partitions: fdisk

Stephane HUC "PengouinBSD"
Hi...

there seems to be a problem with fsck command on OpenBSD 6.2 amd64 -stable.

Into the FAQ14, "Growing disk partitions" section, it's written:

"Before the partition can be mounted again, its integrity must be
checked with fsck(8):

    # fsck sd0h
"

but one of our forum members obsd4a.net asks us if it's normal that it
doesn't work.

I read the FAQ, and attempt with my laptop.

My disklabel:

[code]
#disklabel -E sd0
Label editor (enter '?' for help at any prompt)
> p
OpenBSD area: 64-976768065; size: 976768001; free: 194252529
#                size           offset  fstype [fsize bsize   cpg]
  a:         10486016        104780352  4.2BSD   2048 16384 12958 # /
  b:         17100976          2097216    swap                    # none
  c:        976773168                0  unused
  d:         10474368        115266368  4.2BSD   2048 16384 12958 # /tmp
  e:         20964832        125740736  4.2BSD   2048 16384 12958 # /var
  f:          4194304         69128768  4.2BSD   2048 16384 12958 # /usr
  g:          2097152         73323072  4.2BSD   2048 16384 12958 #
/usr/X11R6
  h:         20971520         75420224  4.2BSD   2048 16384 12958 #
/usr/local
  i:          4194304         96391744  4.2BSD   2048 16384 12958 # /usr/src
  j:         20964832        817772736  4.2BSD   2048 16384 12958 # /usr/obj
  k:         20964832        146705568  4.2BSD   2048 16384 12958 # /var/log
  l:        629137472        167670400  4.2BSD   4096 32768 26062 # /home
  m:         20964864        796807872  4.2BSD   2048 16384 12958 #
/usr/ports
> q
No label changes.
[/code]

Ok, i attempt to check only my slide /tmp... fstype: 4.2BSD

My fstab file is:
$ cat /etc/fstab

ef1ea0f909e0b8d8.b none swap sw
ef1ea0f909e0b8d8.a / ffs rw,softdep 1 1
ef1ea0f909e0b8d8.l /home ffs rw,nodev,nosuid,softdep 1 2
ef1ea0f909e0b8d8.d /tmp ffs rw,nodev,nosuid,softdep 1 2
ef1ea0f909e0b8d8.f /usr ffs rw,nodev,softdep 1 2
ef1ea0f909e0b8d8.g /usr/X11R6 ffs rw,nodev,softdep 1 2
ef1ea0f909e0b8d8.h /usr/local ffs rw,wxallowed,nodev,softdep 1 2
ef1ea0f909e0b8d8.j /usr/obj ffs rw,nodev,nosuid,softdep 1 2
ef1ea0f909e0b8d8.m /usr/ports ffs rw,nodev,nosuid,softdep,wxallowed 1 2
ef1ea0f909e0b8d8.i /usr/src ffs rw,nodev,nosuid,softdep 1 2
ef1ea0f909e0b8d8.e /var ffs rw,nodev,nosuid,softdep 1 2
ef1ea0f909e0b8d8.k /var/log ffs rw,nodev,noexec,nosuid,softdep 1 2

The fs type /tmp seems to be good:
$ awk '/\/tmp/ { print $3 }' /etc/fstab
ffs

ffs = 4.2BSD! OK.

But if i attempt to fsck, with rights root:
# fsck sd0d
fsck: sd0d: unknown special file or file system.

???

If i use fsck_ffs, its OK!
# fsck_ffs sd0d
** /dev/sd0d (sd0d)
** File system is clean; not checking

Error into FAQ14 or fdisk's bug?

--
~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD " +=<<<
----
<me>Stephane HUC as PengouinBSD or CIOTBSD</me>
<mail>[hidden email]</mail>


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FAQ14: Growing disk partitions: fdisk

Otto Moerbeek
On Fri, Nov 03, 2017 at 05:08:53AM +0100, Stephane HUC "PengouinBSD" wrote:

> Hi...
>
> there seems to be a problem with fsck command on OpenBSD 6.2 amd64 -stable.
>
> Into the FAQ14, "Growing disk partitions" section, it's written:
>
> "Before the partition can be mounted again, its integrity must be
> checked with fsck(8):
>
>     # fsck sd0h
> "
>
> but one of our forum members obsd4a.net asks us if it's normal that it
> doesn't work.
>
> I read the FAQ, and attempt with my laptop.
>
> My disklabel:
>
> [code]
> #disklabel -E sd0
> Label editor (enter '?' for help at any prompt)
> > p
> OpenBSD area: 64-976768065; size: 976768001; free: 194252529
> #                size           offset  fstype [fsize bsize   cpg]
>   a:         10486016        104780352  4.2BSD   2048 16384 12958 # /
>   b:         17100976          2097216    swap                    # none
>   c:        976773168                0  unused
>   d:         10474368        115266368  4.2BSD   2048 16384 12958 # /tmp
>   e:         20964832        125740736  4.2BSD   2048 16384 12958 # /var
>   f:          4194304         69128768  4.2BSD   2048 16384 12958 # /usr
>   g:          2097152         73323072  4.2BSD   2048 16384 12958 #
> /usr/X11R6
>   h:         20971520         75420224  4.2BSD   2048 16384 12958 #
> /usr/local
>   i:          4194304         96391744  4.2BSD   2048 16384 12958 # /usr/src
>   j:         20964832        817772736  4.2BSD   2048 16384 12958 # /usr/obj
>   k:         20964832        146705568  4.2BSD   2048 16384 12958 # /var/log
>   l:        629137472        167670400  4.2BSD   4096 32768 26062 # /home
>   m:         20964864        796807872  4.2BSD   2048 16384 12958 #
> /usr/ports
> > q
> No label changes.
> [/code]
>
> Ok, i attempt to check only my slide /tmp... fstype: 4.2BSD
>
> My fstab file is:
> $ cat /etc/fstab
>
> ef1ea0f909e0b8d8.b none swap sw
> ef1ea0f909e0b8d8.a / ffs rw,softdep 1 1
> ef1ea0f909e0b8d8.l /home ffs rw,nodev,nosuid,softdep 1 2
> ef1ea0f909e0b8d8.d /tmp ffs rw,nodev,nosuid,softdep 1 2
> ef1ea0f909e0b8d8.f /usr ffs rw,nodev,softdep 1 2
> ef1ea0f909e0b8d8.g /usr/X11R6 ffs rw,nodev,softdep 1 2
> ef1ea0f909e0b8d8.h /usr/local ffs rw,wxallowed,nodev,softdep 1 2
> ef1ea0f909e0b8d8.j /usr/obj ffs rw,nodev,nosuid,softdep 1 2
> ef1ea0f909e0b8d8.m /usr/ports ffs rw,nodev,nosuid,softdep,wxallowed 1 2
> ef1ea0f909e0b8d8.i /usr/src ffs rw,nodev,nosuid,softdep 1 2
> ef1ea0f909e0b8d8.e /var ffs rw,nodev,nosuid,softdep 1 2
> ef1ea0f909e0b8d8.k /var/log ffs rw,nodev,noexec,nosuid,softdep 1 2
>
> The fs type /tmp seems to be good:
> $ awk '/\/tmp/ { print $3 }' /etc/fstab
> ffs
>
> ffs = 4.2BSD! OK.
>
> But if i attempt to fsck, with rights root:
> # fsck sd0d
> fsck: sd0d: unknown special file or file system.
>
> ???
>
> If i use fsck_ffs, its OK!
> # fsck_ffs sd0d
> ** /dev/sd0d (sd0d)
> ** File system is clean; not checking
>
> Error into FAQ14 or fdisk's bug?
>
> --
> ~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD " +=<<<
> ----
> <me>Stephane HUC as PengouinBSD or CIOTBSD</me>
> <mail>[hidden email]</mail>
>

My guess is that if you use duids in fstab then you should call it by
that name withc fsck (which uses fstab). Alternatively, specify the
mount point.

        -Otto


Reply | Threaded
Open this post in threaded view
|

Re: FAQ14: Growing disk partitions: fdisk

Stephane HUC "PengouinBSD"

Le 11/03/17 à 07:27, Otto Moerbeek a écrit :
(...)
>
> My guess is that if you use duids in fstab then you should call it by
> that name withc fsck (which uses fstab). Alternatively, specify the
> mount point.
>
> -Otto
>
>

Interesting point of view, but:

1/ I've not change the writing of the fstab file. It is the fact of the
installer OpenBSD.

2/ Normally, fsck uses fstab. But, as i wrote in my first message, it
seems it not doing it.

> # fsck sd0d
> fsck: sd0d: unknown special file or file system.

3/ By using duids, how i call fsck?

# fsck /tmp

???

4/ And, yes, calling fsck as:

# fsck /dev/sd0d

seems run correctly!

=> But then why is it written in the FAQ this below, since it doesn't
seem to work? (at least with stable amd64 OpenBSD)

"Before the partition can be mounted again, its integrity must be
checked with fsck(8):

    # fsck sd0h
"



--
~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD " +=<<<
----
<me>Stephane HUC as PengouinBSD or CIOTBSD</me>
<mail>[hidden email]</mail>


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FAQ14: Growing disk partitions: fdisk

Theo Buehler-4
> => But then why is it written in the FAQ this below, since it doesn't
> seem to work? (at least with stable amd64 OpenBSD)

i tested it before giving my ok, but apparently i overlooked this detail.
fixed, thanks

Reply | Threaded
Open this post in threaded view
|

Re: FAQ14: Growing disk partitions: fdisk

Otto Moerbeek
In reply to this post by Stephane HUC "PengouinBSD"
On Fri, Nov 03, 2017 at 08:07:37AM +0100, Stephane HUC "PengouinBSD" wrote:

>
> Le 11/03/17 à 07:27, Otto Moerbeek a écrit :
> (...)
> >
> > My guess is that if you use duids in fstab then you should call it by
> > that name withc fsck (which uses fstab). Alternatively, specify the
> > mount point.
> >
> > -Otto
> >
> >
>
> Interesting point of view, but:
>
> 1/ I've not change the writing of the fstab file. It is the fact of the
> installer OpenBSD.
>
> 2/ Normally, fsck uses fstab. But, as i wrote in my first message, it
> seems it not doing it.
>
> > # fsck sd0d
> > fsck: sd0d: unknown special file or file system.

It does use fstab, but it cannot find sd0d in fstab.

>
> 3/ By using duids, how i call fsck?

fsck ef1ea0f909e0b8d8.d

>
> # fsck /tmp
>
> ???

That line didn't show properly in my mal client.

>
> 4/ And, yes, calling fsck as:
>
> # fsck /dev/sd0d
>
> seems run correctly!

Yes, because if a full path is given, fsck uses that without
needing to consult fstab.

>
> => But then why is it written in the FAQ this below, since it doesn't
> seem to work? (at least with stable amd64 OpenBSD)
>
> "Before the partition can be mounted again, its integrity must be
> checked with fsck(8):
>
>     # fsck sd0h
> "

That's an error in the FAQ. It has been fixed now,

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: FAQ14: Growing disk partitions: fdisk

Alexander Hall


On November 3, 2017 8:41:20 AM GMT+01:00, Otto Moerbeek <[hidden email]> wrote:

>On Fri, Nov 03, 2017 at 08:07:37AM +0100, Stephane HUC "PengouinBSD"
>wrote:
>
>>
>> Le 11/03/17 à 07:27, Otto Moerbeek a écrit :
>> (...)
>> >
>> > My guess is that if you use duids in fstab then you should call it
>by
>> > that name withc fsck (which uses fstab). Alternatively, specify the
>> > mount point.
>> >
>> > -Otto
>> >
>> >
>>
>> Interesting point of view, but:
>>
>> 1/ I've not change the writing of the fstab file. It is the fact of
>the
>> installer OpenBSD.
>>
>> 2/ Normally, fsck uses fstab. But, as i wrote in my first message, it
>> seems it not doing it.
>>
>> > # fsck sd0d
>> > fsck: sd0d: unknown special file or file system.
>
>It does use fstab, but it cannot find sd0d in fstab.
>
>>
>> 3/ By using duids, how i call fsck?
>
>fsck ef1ea0f909e0b8d8.d
>
>>
>> # fsck /tmp
>>
>> ???
>
>That line didn't show properly in my mal client.
>
>>
>> 4/ And, yes, calling fsck as:
>>
>> # fsck /dev/sd0d
>>
>> seems run correctly!
>
>Yes, because if a full path is given, fsck uses that without
>needing to consult fstab.

Is there some reason why one can it or is not convert fsck to use opendev()?

/Alexander

>
>>
>> => But then why is it written in the FAQ this below, since it doesn't
>> seem to work? (at least with stable amd64 OpenBSD)
>>
>> "Before the partition can be mounted again, its integrity must be
>> checked with fsck(8):
>>
>>     # fsck sd0h
>> "
>
>That's an error in the FAQ. It has been fixed now,
>
> -Otto

Reply | Threaded
Open this post in threaded view
|

Re: FAQ14: Growing disk partitions: fdisk

Otto Moerbeek
On Fri, Nov 03, 2017 at 05:12:54PM +0100, Alexander Hall wrote:

>
>
> On November 3, 2017 8:41:20 AM GMT+01:00, Otto Moerbeek <[hidden email]> wrote:
> >On Fri, Nov 03, 2017 at 08:07:37AM +0100, Stephane HUC "PengouinBSD"
> >wrote:
> >
> >>
> >> Le 11/03/17 à 07:27, Otto Moerbeek a écrit :
> >> (...)
> >> >
> >> > My guess is that if you use duids in fstab then you should call it
> >by
> >> > that name withc fsck (which uses fstab). Alternatively, specify the
> >> > mount point.
> >> >
> >> > -Otto
> >> >
> >> >
> >>
> >> Interesting point of view, but:
> >>
> >> 1/ I've not change the writing of the fstab file. It is the fact of
> >the
> >> installer OpenBSD.
> >>
> >> 2/ Normally, fsck uses fstab. But, as i wrote in my first message, it
> >> seems it not doing it.
> >>
> >> > # fsck sd0d
> >> > fsck: sd0d: unknown special file or file system.
> >
> >It does use fstab, but it cannot find sd0d in fstab.
> >
> >>
> >> 3/ By using duids, how i call fsck?
> >
> >fsck ef1ea0f909e0b8d8.d
> >
> >>
> >> # fsck /tmp
> >>
> >> ???
> >
> >That line didn't show properly in my mal client.
> >
> >>
> >> 4/ And, yes, calling fsck as:
> >>
> >> # fsck /dev/sd0d
> >>
> >> seems run correctly!
> >
> >Yes, because if a full path is given, fsck uses that without
> >needing to consult fstab.
>
> Is there some reason why one can it or is not convert fsck to use opendev()?

fsck never did interpret short names, so I would be surpised it it did
that suddenly.

        -Otto

>
> /Alexander
>
> >
> >>
> >> => But then why is it written in the FAQ this below, since it doesn't
> >> seem to work? (at least with stable amd64 OpenBSD)
> >>
> >> "Before the partition can be mounted again, its integrity must be
> >> checked with fsck(8):
> >>
> >>     # fsck sd0h
> >> "
> >
> >That's an error in the FAQ. It has been fixed now,
> >
> > -Otto