?
Solved

Write a File System to Solaris?

Posted on 2010-09-20
9
Medium Priority
?
405 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 79

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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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 79

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 79

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 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