ZFS FreeBSD 8.2 RC3 - boots only in single user mode (manual mount of filesystems)

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

ZFS FreeBSD 8.2 RC3 - boots only in single user mode (manual mount of filesystems)

Postby margor » 01 Feb 2011, 10:56

Hello,

I installed FreeBSD 8.2-RC3 amd64 on my T61p without UFS (ZFS). It seems to me that OS cannot mount ZFS file systems during standard boot procedure. I can see lots of errors:
Code: Select all
init: can't exec getty '/usr/libexec/getty' for port /dev/ttyvx

where x is digit. I can easily reboot system by CTRL+ALT+DEL.

If I boot in verbose mode I see that basic programs are not available:
(sed not found, logger not found)

If I choose single user mode there is no problem in mounting file systems.
Code: Select all
# mount -u /
# zfs mount -a
# exit


OS boots without any problem.

I use GPT.

[file]/boot/loader.conf[/file]:
Code: Select all
# ZFS
zfs_load=YES
vfs.root.mountfrom="zfs:tank"

# WLAN
if_iwn_load="YES"


[file]/etc/rc.conf[/file]:
Code: Select all
zfs_load=YES
hostname="t61p"
moused_enable="YES"
sendmail_enable="NONE"

# WLANS
wlans_iwn0="wlan0"
ifconfig_wlan0="wpa DHCP"


[file]/etc/fstab[/file]:
Code: Select all
proc /proc procfs rw 0 0
/dev/ad4p2 none swap sw 0 0


zpool config:
Code: Select all
# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tank    87G  1.44G  85.6G     1%  ONLINE  -

# zfs list
NAME            USED  AVAIL  REFER  MOUNTPOINT
tank           1.44G  84.2G   290M  legacy
tank/home      26.5K  84.2G  26.5K  /home
tank/obj       4.67M  84.2G  4.67M  /usr/obj
tank/ports      369M  84.2G   369M  /usr/ports
tank/src        537M  84.2G   537M  /usr/src
tank/tmp         23K  84.2G    23K  /tmp
tank/usr        269M  84.2G   269M  /usr
tank/usrlocal    18K  84.2G    18K  /usr/local
tank/var        478K  84.2G   478K  /var


disk config:
Code: Select all
# gpart list
Geom name: ad4
state: OK
fwheads: 16
fwsectors: 63
last: 195371534
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ad4p1
   Mediasize: 65536 (64K)
   Sectorsize: 512
   Mode: r0w0e0
   rawuuid: c3f4a060-2d90-11e0-b00c-001e37cca61f
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: (null)
   length: 65536
   offset: 17408
   type: freebsd-boot
   index: 1
   end: 161
   start: 34
2. Name: ad4p2
   Mediasize: 6442450944 (6.0G)
   Sectorsize: 512
   Mode: r1w1e0
   rawuuid: cfd9d36f-2d90-11e0-b00c-001e37cca61f
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b


I don't have idea how solve this problem. Did I forget about sth in loader.conf?
margor
Junior Member
 
Posts: 10
Joined: 27 Dec 2010, 14:04

Postby margor » 01 Feb 2011, 11:01

I cannot edit post. I made mistake in gpart list:
Code: Select all
Geom name: ad4
state: OK
fwheads: 16
fwsectors: 63
last: 195371534
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ad4p1
   Mediasize: 65536 (64K)
   Sectorsize: 512
   Mode: r0w0e0
   rawuuid: c3f4a060-2d90-11e0-b00c-001e37cca61f
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: (null)
   length: 65536
   offset: 17408
   type: freebsd-boot
   index: 1
   end: 161
   start: 34
2. Name: ad4p2
   Mediasize: 6442450944 (6.0G)
   Sectorsize: 512
   Mode: r1w1e0
   rawuuid: cfd9d36f-2d90-11e0-b00c-001e37cca61f
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 6442450944
   offset: 82944
   type: freebsd-swap
   index: 2
   end: 12583073
   start: 162
3. Name: ad4p3
   Mediasize: 93587692032 (87G)
   Sectorsize: 512
   Mode: r1w1e1
   rawuuid: 13441203-2d91-11e0-b00c-001e37cca61f
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 93587692032
   offset: 6442533888
   type: freebsd-zfs
   index: 3
   end: 195371534
   start: 12583074
Consumers:
1. Name: ad4
   Mediasize: 100030242816 (93G)
   Sectorsize: 512
   Mode: r2w2e3
margor
Junior Member
 
Posts: 10
Joined: 27 Dec 2010, 14:04

Postby da1 » 01 Feb 2011, 11:56

Hi,

Pls use "code" tags for your code and paste the "dmesg".
da1
Member
 
Posts: 738
Joined: 02 Sep 2009, 09:35
Location: Berlin,DE

Postby chrcol » 01 Feb 2011, 12:08

I also use gpt and on 8.2-rc3 for one server (upgraded yesterday), it boots fine.

your first line in loader.conf looks off.

shouldnt it be?

Code: Select all
vfs.root.mountfrom="zfs:tank/root"
chrcol
Member
 
Posts: 345
Joined: 17 Nov 2008, 12:31

Postby kpa » 01 Feb 2011, 12:23

Nothing wrong with the mountfrom parameter. As you can see from his [CMD="#"]zfs list[/CMD] output there is no [FILE]tank/root[/FILE] filesystem and he is using the root filesystem of the pool as [FILE]/[/FILE]
kpa
MFC'd
 
Posts: 3387
Joined: 05 Jul 2010, 13:19
Location: People's Technocratic Republic of Finland

Postby da1 » 01 Feb 2011, 12:37

I had the same issue and I corrected it by adding the below line to [FILE]/etc/fstab[/FILE]:
Code: Select all
tank                   /                       zfs             rw      0       0
da1
Member
 
Posts: 738
Joined: 02 Sep 2009, 09:35
Location: Berlin,DE

Postby margor » 01 Feb 2011, 16:09

Thanks for a clue.
I modified /etc/fstab to:
Code: Select all
proc /proc procfs rw 0 0
/dev/ad4p2 none swap sw 0 0
tank/usr /usr zfs rw 0 0
tank/ports /usr/ports zfs rw 0 0
tank/src /usr/src zfs rw 0 0
tank/home /home zfs rw 0 0
tank/var /var zfs rw 0 0
tank/usrlocal /usr/local zfs rw 0 0
tank/obj /usr/obj zfs rw 0 0
tank/tmp /tmp zfs rw 0 0


Solved.
margor
Junior Member
 
Posts: 10
Joined: 27 Dec 2010, 14:04

Postby da1 » 01 Feb 2011, 16:21

Sorry to bust the whole joy state of trance but it's not really solved because:

  1. You shouldn't need to specify anything in [FILE]/etc/fstab[/FILE] when you are using ZFS because it should be mounted automagically @ boot
  2. If you use this workaround (because this IS a workaround) you do not need to mount everything, just the "/" partition. Try it. The rest will mount automagically.

I will return in a couple of hours, after I run some tests and update you guys.
da1
Member
 
Posts: 738
Joined: 02 Sep 2009, 09:35
Location: Berlin,DE

Postby chrcol » 01 Feb 2011, 16:45

I am at a loss here, my VM boots fine on 8.2-PRERELEASE, and the server I updated last night boots fine on 8.2-RC3, I do not mount via fstab it is done with the loader.conf line. So baffling its done this to you guys. I am using GPT labels.
chrcol
Member
 
Posts: 345
Joined: 17 Nov 2008, 12:31

Postby usdmatt » 01 Feb 2011, 17:01

You have
Code: Select all
zfs_load="YES"
in [FILE]/etc/rc.conf[/FILE] when it should be
Code: Select all
zfs_enable="YES"


I've never actually booted any ZFS system without this line but I believe ZFS filesystems will not be mounted without it (you have to add them to [FILE]/etc/fstab[/FILE] as mentioned). I would still expect [FILE]/[/FILE] to mount but it appears not.

So simple fix, either correct [FILE]/etc/rc.conf[/FILE] or add all zfs filesystems to [FILE]/etc/fstab[/FILE].
usdmatt
Member
 
Posts: 419
Joined: 16 Mar 2009, 12:59

Postby margor » 01 Feb 2011, 19:24

With correct
Code: Select all
[b]zfs_enable="YES"[/b]
works without [file]/etc/fstab[/file] entries.
margor
Junior Member
 
Posts: 10
Joined: 27 Dec 2010, 14:04

Postby chrcol » 01 Feb 2011, 20:06

usdmatt wrote:You have zfs_load="YES" in [FILE]/etc/rc.conf[/FILE] when it should be zfs_enable="YES".

I've never actually booted any ZFS system without this line but I believe ZFS filesystems will not be mounted without it (you have to add them to [FILE]/etc/fstab[/FILE] as mentioned). I would still expect / to mount but it appears not.

So simple fix, either correct [FILE]/etc/rc.conf[/FILE] or add all zfs filesystems to [FILE]/etc/fstab[/FILE].


I can confirm I have that line on all zfs systems. Good find.
chrcol
Member
 
Posts: 345
Joined: 17 Nov 2008, 12:31


Return to General

Who is online

Users browsing this forum: No registered users and 0 guests