|
Description
|
Category
kernel
Sub-Category
boot-x86
Description
In case there ever had been some large files (>2G) on an ufs root filesystem,
you can't fast reboot to such a file system.
# reboot -f /dev/dsk/c29d0s0 /platform/i86pc/kernel/unix -B disable-mouse8042=true -v
reboot: not all drivers have implemented quiesce(9E)
reboot: File too large
reboot: failed to mount /dev/dsk/c29d0s0
reboot: /devices/pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0:a: kernel name must be unix
# fstyp -v /dev/rdsk/c29d0s0|more
ufs
magic11954formatdynamictimeSat Oct 4 19:48:37 2008
sblkno16cblkno24iblkno32dblkno760
sbsize2048cgsize8192cgoffset 64cgmask0xffffffc0
ncg91size4469472blocks4401750
bsize8192shift13mask0xffffe000
fsize1024shift10mask0xfffffc00
frag8shift3fsbtodb1
minfree1%maxbpg2048optimtime
maxcontig 7rotdelay 0msrps60
csaddr760cssize2048shift9mask0xfffffe00
ntrak48nsect128spc6144ncyl1455
cpg16bpg6144fpg49152ipg5824
nindir2048inopb64nspf2
nbfree268978ndir11858nifree488035nffree19183
cgrotor18fmod0ronly0logbno1568
rolled1si0flags1 <<<<<<<
Suggested fix:
==============
I think reboot should mount the ufs file system with option "largefiles"...
diff --git a/usr/src/cmd/halt/halt.c b/usr/src/cmd/halt/halt.c
--- a/usr/src/cmd/halt/halt.c
+++ b/usr/src/cmd/halt/halt.c
@@ -52,6 +52,7 @@
#include <sys/mntent.h>
#include <sys/mnttab.h>
#include <sys/mount.h>
+#include <sys/fs/ufs_mount.h>
#include <alloca.h>
#include <assert.h>
#include <errno.h>
@@ -595,11 +596,13 @@
static int
validate_ufs_disk(char *arg, char *mountpoint)
{
-char mntopts[MNT_LINE_MAX] = { '\0' };
+struct ufs_args ufs_args;
+char mntopts[MNT_LINE_MAX] = { MNTOPT_LARGEFILES };
/* perform the mount */
-if (mount(arg, mountpoint, MS_DATA|MS_OPTIONSTR,
- MNTTYPE_UFS, NULL, 0, mntopts, sizeof (mntopts)) != 0) {
+ufs_args.flags = UFSMNT_LARGEFILES;
+if (mount(arg, mountpoint, MS_DATA|MS_OPTIONSTR, MNTTYPE_UFS,
+ &ufs_args, sizeof (ufs_args), mntopts, sizeof (mntopts)) != 0) {
perror(cmdname);
(void) fprintf(stderr,
gettext("%s: failed to mount %s\n"), cmdname, arg);
Frequency
Always
Regression
No
Steps to Reproduce
On an alternate ufs root files ystem, create some large files, e.g.
with
mount /dev/dsk/c29d0s0 /mnt
mkfile -n 8G /mnt/var/tmp/foobar
umount /mnt
and fast reboot:
reboot -f /dev/dsk/c29d0s0
Expected Result
System reboots (fast reboot).
Actual Result
Fast reboot refuses to mount the alternate root file system, complains with
the error message "reboot: File too large"
Error Message(s)
# reboot -f /dev/dsk/c29d0s0 /platform/i86pc/kernel/unix -B disable-mouse8042=true -v
reboot: not all drivers have implemented quiesce(9E)
reboot: File too large
reboot: failed to mount /dev/dsk/c29d0s0
reboot: /devices/pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0:a: kernel name must be unix
Test Case
Workaround
Workaround: delete all large files and fsck the ufs file system
Submitter wants to work on bug
Yes
Additional configuration information
SXCE build 95, bfu'ed to current opensolaris (2008-10-2)
Didn't read the bug report fully the first time. Indeed a bug and
should be fixed.
|