Link to home
Start Free TrialLog in
Avatar of andyzhao
andyzhao

asked on

Question about mkfs on large file systems.

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!

Avatar of jlevie
jlevie

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').
Avatar of andyzhao

ASKER

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.

Thanks.
"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.
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
#

Thanks!
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.

regards

ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.