Solved

Write a File System to Solaris?

Posted on 2010-09-20
9
398 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
  • 3
  • 3
  • 3
9 Comments
 
LVL 76

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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 76

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 76

Accepted Solution

by:
arnold earned 280 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now