Monday, March 4, 2013

Solaris: Create New Partition

Script started on March  4, 2013 10:57:39 AM EST
# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>  solaris
          /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0
       1. c0t1d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>  solaris
          /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@1,0
Specify disk (enter its number): 0
selecting c0t0d0: solaris
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c0t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c0t0d0s1 is currently used by swap. Please see swap(1M).


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        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> p


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' 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> p
Volume:  solaris
Current partition table (original):
Total disk cylinders available: 46873 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm     672 -  2685       12.00GB    (2014/0/0)   25175000
  1       swap    wu       0 -   671        4.01GB    (672/0/0)     8400000
  2     backup    wm       0 - 46872      279.38GB    (46873/0/0) 585912500
  3 unassigned    wm    2686 -  4699       12.00GB    (2014/0/0)   25175000
  4 unassigned    wm       0                0         (0/0/0)             0
  3 unassigned    wm    2686 -  4699       12.00GB    (2014/0/0)   25175000
  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

partition> 1
Part      Tag    Flag     Cylinders         Size            Blocks
  1       swap    wu       0 -   671        4.01GB    (672/0/0)     8400000

Enter partition id tag[swap]:
Enter partition permission flags[wu]:
Enter new starting cyl[0]:
Enter partition size[8400000b, 672c, 671e, 4101.56mb, 4.01gb]: 8gb
partition> p
Volume:  solaris
Current partition table (unnamed):
Total disk cylinders available: 46873 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm     672 -  2685       12.00GB    (2014/0/0)   25175000
  1       swap    wu       0 -  1342        8.00GB    (1343/0/0)   16787500
  2     backup    wm       0 - 46872      279.38GB    (46873/0/0) 585912500
 1       swap    wu       0 -  1342        8.00GB    (1343/0/0)   16787500
  2     backup    wm       0 - 46872      279.38GB    (46873/0/0) 585912500
  3 unassigned    wm    2686 -  4699       12.00GB    (2014/0/0)   25175000
  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

partition> 4
Part      Tag    Flag     Cylinders         Size            Blocks
  4 unassigned    wm       0                0         (0/0/0)             0

Enter partition id tag[unassigned]: usr2
`usr2' not expected.
Enter partition id tag[unassigned]: 4
`4' not expected.
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 4700
Enter partition size[0b, 0c, 4700e, 0.00mb, 0.00gb]: 80gb
partition> p
Volume:  solaris
Current partition table (unnamed):
olume:  solaris
Current partition table (unnamed):
Total disk cylinders available: 46873 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm     672 -  2685       12.00GB    (2014/0/0)   25175000
  1       swap    wu       0 -  1342        8.00GB    (1343/0/0)   16787500
  2     backup    wm       0 - 46872      279.38GB    (46873/0/0) 585912500
  3 unassigned    wm    2686 -  4699       12.00GB    (2014/0/0)   25175000
  4 unassigned    wm    4700 - 18121       80.00GB    (13422/0/0) 167775000
  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

partition> label
Ready to label disk, continue? y

partition> q


 # newfs /dev/rdsk/c0t0d0s5
newfs: construct a new file system /dev/rdsk/c0t0d0s5: (y/n)? y
Warning: 3116 sector(s) in last cylinder unallocated
/dev/rdsk/c0t0d0s5:     293612500 sectors in 47789 cylinders of 48 tracks, 128 s
ectors
        143365.5MB in 2987 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
...........................................................
super-block backups for last 10 cylinder groups at:
 292655264, 292753696, 292852128, 292950560, 293048992, 293147424, 293245856,

super-block backups for last 10 cylinder groups at:
 292655264, 292753696, 292852128, 292950560, 293048992, 293147424, 293245856,
 293344288, 293442720, 293541152
# newfs /dev/rdsk/c0t0d0s4
newfs: construct a new file system /dev/rdsk/c0t0d0s4: (y/n)? y
Warning: 5352 sector(s) in last cylinder unallocated
/dev/rdsk/c0t0d0s4:     167775000 sectors in 27308 cylinders of 48 tracks, 128 s
ectors
        81921.4MB in 1707 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
.................................
super-block backups for last 10 cylinder groups at:
 166826144, 166924576, 167023008, 167121440, 167219872, 167318304, 167416736,
 167515168, 167613600, 167712032
# mkdir /dbfs

 # cat /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0t0d0s1       -       -       swap    -       no      -
/dev/dsk/c0t0d0s0       /dev/rdsk/c0t0d0s0      /       ufs     1       no      logging
/dev/dsk/c0t0d0s4       /dev/rdsk/c0t0d0s4      /usr2   ufs     1       no      logging
/dev/dsk/c0t0d0s5       /dev/rdsk/c0t0d0s5      /dbfs   ufs     1       no      logging
/devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -



No comments:

Post a Comment