• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • Last Modified:

Write a File System to Solaris?

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
ihateuselessitbooks
Asked:
ihateuselessitbooks
  • 3
  • 3
  • 3
1 Solution
 
arnoldCommented:
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
 
TintinCommented:
You are wanting to create a filesystem.

Depends if you want a ufs or zfs filesystem.
0
 
ihateuselessitbooksAuthor Commented:
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.

 
TintinCommented:
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
 
arnoldCommented:
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
 
ihateuselessitbooksAuthor Commented:
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
 
arnoldCommented:
You do not have a slice/Partition 4
You have 0 and 8
newfs /dev/dsk/c2t1d0s0

0
 
ihateuselessitbooksAuthor Commented:
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
 
TintinCommented:
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now