Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Write a File System to Solaris?

Posted on 2010-09-20
9
Medium Priority
?
406 Views
Last Modified: 2012-05-10
This might seem like a pretty simple question.  But how do I write a File System to a Hard Disk I've formatted and partitioned by Solaris format command?  Obviously the next step would be to write the File System...
0
Comment
Question by:ihateuselessitbooks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
9 Comments
 
LVL 80

Expert Comment

by:arnold
ID: 33722202
newfs is the command.
i.e. newfs /dev/dsk/c0t0d0s1

it also depends on your system x86 or sparc in terms on how the disk/partition are identified.

There are parameters you might want to use to optimize the filesystem for a specific purpose i.e. if there are always going to be large files, etc.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 33722966
You are wanting to create a filesystem.

Depends if you want a ufs or zfs filesystem.
0
 

Author Comment

by:ihateuselessitbooks
ID: 33723976
I'd prefer a UFS, BUT how do I obtain the DEVICE NAME in order to create the new file system?  (that is, what are the parameters I need to use with newfs)


format     lists the 2 availiable disks, but no device name is associated with them?

I realize this is a basic question, but I'm new to Solaris



0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 48

Expert Comment

by:Tintin
ID: 33724072
The format command should certainly list the devices.  You should see something like:

AVAILABLE DISK SELECTIONS:
0.c0t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>  boot
  /pci@1f,4000/scsi@3/sd@0,0

in this case c0t0d0.  

c0 = controller 0
t0  = target 0
d0 = disk 0

then you just need to know the slice you want to create the filesystem on.    You said you have already done this, but you can double check with the 'print' subcommand from the format menu.


0
 
LVL 80

Expert Comment

by:arnold
ID: 33724849
Do not try to make a file system on slice 2 the backup.
newfs /dev/dsk/c0t0d0s0
newfs /dev/dsk/c0t0d0s1
newfs /dev/dsk/c0t0d0s3
newfs /dev/dsk/c0t0d0s4
newfs /dev/dsk/c0t0d0s5
newfs /dev/dsk/c0t0d0s6
newfs /dev/dsk/c0t0d0s7
 
These are your options.

On an X86, I think the device name is reduced to /dev/dsk/c0d0s0 etc.

When you formated the 0 partition is s0 etc. through 7



0
 

Author Comment

by:ihateuselessitbooks
ID: 33730793
Alright this is what I have so far...I ran the newfs, but got an I/O Error...

# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c2t0d0 <DEFAULT cyl 19449 alt 2 hd 255 sec 63>  main
          /pci@0,0/pci1028,1d1@1f,2/disk@0,0
       1. c2t1d0 <ATA-ST3120211AS-B cyl 14590 alt 2 hd 255 sec 63>  backup
          /pci@0,0/pci1028,1d1@1f,2/disk@1,0
Specify disk (enter its number): 1
selecting c2t1d0: backup
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> partition


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> print
Volume:  backup
Current partition table (original):
Total disk cylinders available: 14590 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       home    wm       1 - 14589      111.76GB    (14589/0/0) 234372285
  1 unassigned    wm       0                0         (0/0/0)             0
  2     backup    wu       0 - 14589      111.77GB    (14590/0/0) 234388350
  3 unassigned    wm       0                0         (0/0/0)             0
  4 unassigned    wm       0                0         (0/0/0)             0
  5 unassigned    wm       0                0         (0/0/0)             0
  6 unassigned    wm       0                0         (0/0/0)             0
  7 unassigned    wm       0                0         (0/0/0)             0
  8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
  9 unassigned    wm       0                0         (0/0/0)             0

partition> q


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> q
# newfs /dev/dsk/c2t1d0s4
/dev/rdsk/c2t1d0s4: I/O error
#
0
 
LVL 80

Accepted Solution

by:
arnold earned 1120 total points
ID: 33731457
You do not have a slice/Partition 4
You have 0 and 8
newfs /dev/dsk/c2t1d0s0

0
 

Author Comment

by:ihateuselessitbooks
ID: 33732939
newfs  /dev/rdsk/c2t1d0s0      did the format.  (NOT dsk, but rdsk.)  thanks for the help.

after formatting I was able to mount it to a directory of my choice and have the space to work with on the new drive.  beautiful indeed. thanks.  
0
 
LVL 48

Expert Comment

by:Tintin
ID: 33733145
Pretty certain that it doesn't matter if you use dsk or rdsk when with newfs.  It works out the raw device.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.
Suggested Courses

636 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