Question about mkfs on large file systems.

Posted on 2004-10-14
Medium Priority
Last Modified: 2013-12-27
Hi, All.
I am not very experience with Solaris. I am facing this problem:
I have a Sparc server running Cyclone, RAID dead, I recreated the logical drive on RAID box, but need to make the file system before it is mountable.
I boot to single user mode, use format assigned all the space to c2t1d0s0 (208.50G), label it, quit.
It looks fine. But when I use mkfs -F ufs /dev/rdsk/c2t1d0s0 it gives me the error:
size not specified

How do I create this file system ? This file system is used to store news spool, they are large files.

Thank you!

Question by:andyzhao
LVL 40

Expert Comment

ID: 12315110
Just use 'newfs /dev/rdsk/c2t1d0s0'. You'd only want to use mkfs if you had specific file system options that needed to be included when constructing the file system (see 'man mkfs').

Author Comment

ID: 12315311
Thanks for the reply.
I have tried newfs /dev/rdsk/c2t1d0s0, it was not working.
It gave me error about wrong magic number or something.
I could not recall the error. I can not try it again now, since I was rebuilding the raid, it is currently initializing.

LVL 40

Expert Comment

ID: 12315817
"wrong magic number" would imply that there's not a Solaris partition structure and disk label on the volume. Before using newfs it is necessary to run format and create the partition structure.
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!


Author Comment

ID: 12315849
Thanks for the reply again.
Like I said, after successfully initialized the RAID. I boot the server to single user mode (from OK prompt, boot -s)
I run format command.
Assigned all the space to slice 0 (because I only need one large slice).
Then I labeled, quit.
Then tried the newfs and mkfs command.
It seems now mkfs working, because I run mkfs -m from another server, and modified the raw device name, and the block size.
But I am afraid that there is any mistake in those options, since I am not quite understand everyone's meaning.
Also, the news spool file is 20G each, dont know if there is any potential problem.
Command I used here:

mkfs -F ufs -o nsect=32, ntrack=16, bsize=8192, fragsize=8192, cgsize=16, free=1, rps=60, nbpi=8684, opt=t, apc=0, gap=0, nrpos=8, maxcontig=32 /dev/rdsk/c2t1d0s0 426776896


Expert Comment

ID: 12512574
hi Andy,

Please clarify this message : "I could not recall the error. I can not try it again now, since I was rebuilding the raid, it is currently initializing."

What I understand from this is : U have created a partition on the LUN, when the RAID was STILL being rebuilt..
No Wonder the newfs failed.!!!!
U MUST WAIT till the RAID creation process is complete and THEN go ahead with creation of partitions and newfs the filesystems.
Hope this helps.



Accepted Solution

modulo earned 0 total points
ID: 12807761
PAQed with no points refunded (of 125)

Community Support Moderator

Author Comment

ID: 13975675
My problem is now solved.
It was pretty simple:

mkfs -F ufs /dev/rdsk/c2t1d0s7 1921782923

**1921782923 is the block size, you can get it from format command, then look at the partition information.

Because this file system is for news spools, so, it is necessary to run "tunefs -m 0 /dev/dsk/c2t1d0s7" after mkfs sucessful, otherwise, by default, it will reserve 10% of disk space that only writeable by super user.

Sorry about the late reply, I almost forgot I asked this question until I accidentally got this page again by google.

Thanks for all the help from everyone.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question