Bug #6184
closed2.3 NanoBSD issues with getting stuck read-only mounted
0%
Description
Hi all,
I just did a new pfSense 2.3 NanoBSD install after getting a new CF card yesterday. I just skipped through the initial configuration and immediately restored my old config from pfSense 2.2.6 (not NanoBSD). After a reboot, pfSense is no longer able to change any settings. It appears that it's having trouble writing to /cf/conf/config.xml.
It looks like /cf is being mounted read-only:
[2.3-RELEASE][admin@pfsense.home.lan]/cf/conf: ls -l config.xml -rw-r--r-- 1 root wheel 23529 Apr 15 18:23 config.xml [2.3-RELEASE][admin@pfsense.home.lan]/cf/conf: mount /dev/ufs/pfsense0 on / (ufs, local, noatime, synchronous) devfs on /dev (devfs, local) /dev/ufs/cf on /cf (ufs, local, noatime, read-only, synchronous) /dev/md0 on /tmp (ufs, local) /dev/md1 on /var (ufs, local) devfs on /var/dhcpd/dev (devfs, local)
When I try to save on a certain page (Services -> NTP in this case), I get this error at the top of the page:
Warning: copy(/cf/conf/backup/config-1460759016.xml): failed to open stream: Read-only file system in /etc/inc/config.lib.inc on line 920 Call Stack: 0.0002 124428 1. {main}() /usr/local/www/services_ntpd.php:0 0.0692 545148 2. write_config() /usr/local/www/services_ntpd.php:182 0.0692 545264 3. backup_config() /etc/inc/config.lib.inc:553 0.0699 545544 4. copy() /etc/inc/config.lib.inc:920 Warning: filesize(): stat failed for /cf/conf/backup/config-1460759016.xml in /etc/inc/config.lib.inc on line 927 Call Stack: 0.0002 124428 1. {main}() /usr/local/www/services_ntpd.php:0 0.0692 545148 2. write_config() /usr/local/www/services_ntpd.php:182 0.0692 545264 3. backup_config() /etc/inc/config.lib.inc:553 0.0710 548208 4. filesize() /etc/inc/config.lib.inc:927 Warning: fopen(/cf/conf/backup/backup.cache): failed to open stream: Read-only file system in /etc/inc/config.lib.inc on line 928 Call Stack: 0.0002 124428 1. {main}() /usr/local/www/services_ntpd.php:0 0.0692 545148 2. write_config() /usr/local/www/services_ntpd.php:182 0.0692 545264 3. backup_config() /etc/inc/config.lib.inc:553 0.0716 548448 4. fopen() /etc/inc/config.lib.inc:928 Warning: fwrite() expects parameter 1 to be resource, boolean given in /etc/inc/config.lib.inc on line 929 Call Stack: 0.0002 124428 1. {main}() /usr/local/www/services_ntpd.php:0 0.0692 545148 2. write_config() /usr/local/www/services_ntpd.php:182 0.0692 545264 3. backup_config() /etc/inc/config.lib.inc:553 0.0723 549356 4. fwrite() /etc/inc/config.lib.inc:929 Warning: fclose() expects parameter 1 to be resource, boolean given in /etc/inc/config.lib.inc on line 930 Call Stack: 0.0002 124428 1. {main}() /usr/local/www/services_ntpd.php:0 0.0692 545148 2. write_config() /usr/local/www/services_ntpd.php:182 0.0692 545264 3. backup_config() /etc/inc/config.lib.inc:553 0.0728 548380 4. fclose() /etc/inc/config.lib.inc:930 Warning: fopen(/cf/conf/config.xml.37953): failed to open stream: Read-only file system in /etc/inc/config.lib.inc on line 495 Call Stack: 0.0002 124428 1. {main}() /usr/local/www/services_ntpd.php:0 0.0692 545148 2. write_config() /usr/local/www/services_ntpd.php:182 0.1163 577140 3. safe_write_file() /etc/inc/config.lib.inc:565 0.1164 577260 4. fopen() /etc/inc/config.lib.inc:495
On the dashboard, I get this crash report:
Crash report begins. Anonymous machine information: i386 10.3-RELEASE FreeBSD 10.3-RELEASE #5 05adf0a(RELENG_2_3_0): Mon Apr 11 19:14:12 CDT 2016 root@ce23-i386-builder:/builder/pfsense-230/tmp/obj/builder/pfsense-230/tmp/FreeBSD-src/sys/pfSense_wrap_vga Crash report details: PHP Errors: [16-Apr-2016 20:50:26 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:26 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:26 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:26 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:26 America/New_York] PHP 4. copy() /etc/inc/config.lib.inc:920 [16-Apr-2016 20:50:26 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:26 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:26 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:26 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:26 America/New_York] PHP 4. filesize() /etc/inc/config.lib.inc:927 [16-Apr-2016 20:50:26 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:26 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:26 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:26 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:26 America/New_York] PHP 4. fopen() /etc/inc/config.lib.inc:928 [16-Apr-2016 20:50:26 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:26 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:26 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:26 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:26 America/New_York] PHP 4. fwrite() /etc/inc/config.lib.inc:929 [16-Apr-2016 20:50:26 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:26 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:26 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:26 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:26 America/New_York] PHP 4. fclose() /etc/inc/config.lib.inc:930 [16-Apr-2016 20:50:26 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:26 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:26 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:26 America/New_York] PHP 3. safe_write_file() /etc/inc/config.lib.inc:565 [16-Apr-2016 20:50:26 America/New_York] PHP 4. fopen() /etc/inc/config.lib.inc:495 [16-Apr-2016 20:50:41 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:41 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:41 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:41 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:41 America/New_York] PHP 4. copy() /etc/inc/config.lib.inc:920 [16-Apr-2016 20:50:41 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:41 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:41 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:41 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:41 America/New_York] PHP 4. filesize() /etc/inc/config.lib.inc:927 [16-Apr-2016 20:50:41 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:41 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:41 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:41 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:41 America/New_York] PHP 4. fopen() /etc/inc/config.lib.inc:928 [16-Apr-2016 20:50:41 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:41 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:41 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:41 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:41 America/New_York] PHP 4. fwrite() /etc/inc/config.lib.inc:929 [16-Apr-2016 20:50:41 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:41 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:41 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:41 America/New_York] PHP 3. backup_config() /etc/inc/config.lib.inc:553 [16-Apr-2016 20:50:41 America/New_York] PHP 4. fclose() /etc/inc/config.lib.inc:930 [16-Apr-2016 20:50:41 America/New_York] PHP Stack trace: [16-Apr-2016 20:50:41 America/New_York] PHP 1. {main}() /usr/local/www/index.php:0 [16-Apr-2016 20:50:41 America/New_York] PHP 2. write_config() /usr/local/www/index.php:166 [16-Apr-2016 20:50:41 America/New_York] PHP 3. safe_write_file() /etc/inc/config.lib.inc:565 [16-Apr-2016 20:50:41 America/New_York] PHP 4. fopen() /etc/inc/config.lib.inc:495
Updated by Anonymous over 8 years ago
For what it's worth, I'm still in the second boot of the system (after the auto-reboot from the config.xml restore). I'm avoiding a reboot right now in case there's something I can do to help debug the issue.
Updated by Jim Pingle over 8 years ago
Try this: https://forum.pfsense.org/index.php?topic=109766.msg612108#msg612108
There is some issue here we haven't yet been able to narrow down.
Updated by Anonymous over 8 years ago
Thanks, that seems to have solved it:
[2.3-RELEASE][admin@pfsense.home.lan]/root: umount -f /cf; fsck -t ufs -y /cf; mount -f -o rw /cf ** /dev/ufs/cf ** Last Mounted on /cf ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 22 files, 3011 used, 98044 free (44 frags, 12250 blocks, 0.0% fragmentation) ***** FILE SYSTEM IS CLEAN *****
I've rebooted a few times as it seems to stay mounted rw.
Updated by Jim Thompson over 8 years ago
- Assignee set to Renato Botelho
- Target version set to 2.3.1
- Affected Version set to 2.3
may be dup
Updated by Chris Buechler over 8 years ago
- Subject changed from pfSense 2.3 NanoBSD fresh install cannot write settings after config.xml restore to 2.3 NanoBSD issues with getting stuck read-only mounted
- Category set to Operating System
- Status changed from New to Confirmed
"fixing" the alignment had no impact on this issue on flash that's slow to rw->ro mount. we'll go permanent rw for 2.3.1.
Updated by Chris Buechler over 8 years ago
- Status changed from Confirmed to Feedback
pushed change so conf_mount_ro does nothing, so things will stay rw.
Updated by Anonymous over 8 years ago
Thanks. I just did a reboot, ran:
umount -f /cf; fsck -t ufs -y /cf; mount -f -o rw /cf
and tried an upgrade to 2.3.1 from the web interface and it failed. The version still says 2.3-RELEASE, but there's no update available, and /cf is still mounted read only.
I'll try and see if I still run into the read-only issue with a clean install of 2.3.1.
Updated by Chris Buechler over 8 years ago
pushed clean up of diag_nanobsd.php now that things are always rw. That should take care of this for 2.3.1
Updated by Chris Buechler over 8 years ago
- Status changed from Feedback to Resolved
- Assignee changed from Renato Botelho to Chris Buechler
all good.