Sunday, July 17, 2016

Solaris 10: Disk partition



[root@unknown: dsk# format
Searching for disks...
Inquiry failed for this logical diskdone


AVAILABLE DISK SELECTIONS:
       0. c0d0 <▒x▒▒▒▒▒▒▒▒▒@▒▒▒ cyl 3782 alt 2 hd 255 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
Specify disk (enter its number): ^C
[root@unknown: dsk# devfsadm
[root@unknown: dsk# format
Searching for disks...
Inquiry failed for this logical diskdone


AVAILABLE DISK SELECTIONS:
       0. c0d0 <▒x▒▒▒▒▒▒▒▒▒@▒▒▒ cyl 3782 alt 2 hd 255 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
       1. c2t0d0 <VMware,-VMware Virtual -1.0  cyl 1021 alt 2 hd 128 sec 32>
          /pci@0,0/pci15ad,1976@10/sd@0,0
Specify disk (enter its number): 1
selecting c2t0d0
[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> fdisk
No fdisk table exists. The default partition for the disk is:

  a 100% "SOLARIS System" partition

Type "y" to accept the default partition,  otherwise type "n" to edit the
 partition table.
y
format> p


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> p
Current partition table (original):
Total disk cylinders available: 1020 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)          0
  1 unassigned    wm       0               0         (0/0/0)          0
  2     backup    wu       0 - 1019        1.99GB    (1020/0/0) 4177920
  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        2.00MB    (1/0/0)       4096
  9 unassigned    wm       0               0         (0/0/0)          0

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

Enter partition id tag[unassigned]: ?
Expecting one of the following: (abbreviations ok):
        unassigned    boot          root          swap
        usr           backup        stand         var
        home          alternates    reserved

Enter partition id tag[unassigned]: alternates
Enter partition permission flags[wm]: ?
Expecting one of the following: (abbreviations ok):
        wm    - read-write, mountable
        wu    - read-write, unmountable
        rm    - read-only, mountable
        ru    - read-only, unmountable

Enter partition permission flags[wm]:
Enter new starting cyl[1]:
Enter partition size[0b, 0c, 1e, 0.00mb, 0.00gb]: 1g
partition> p
Current partition table (unnamed):
Total disk cylinders available: 1020 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0 alternates    wm       1 -  512     1024.00MB    (512/0/0)  2097152
  1 unassigned    wm       0               0         (0/0/0)          0
  2     backup    wu       0 - 1019        1.99GB    (1020/0/0) 4177920
  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        2.00MB    (1/0/0)       4096
  9 unassigned    wm       0               0         (0/0/0)          0

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

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 513
Enter partition size[0b, 0c, 513e, 0.00mb, 0.00gb]: $
partition> p
Current partition table (unnamed):
Total disk cylinders available: 1020 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0 alternates    wm       1 -  512     1024.00MB    (512/0/0)  2097152
  1 unassigned    wm       0               0         (0/0/0)          0
  2     backup    wu       0 - 1019        1.99GB    (1020/0/0) 4177920
  3 unassigned    wm       0               0         (0/0/0)          0
  4 unassigned    wm       0               0         (0/0/0)          0
  5 unassigned    wm     513 - 1019     1014.00MB    (507/0/0)  2076672
  6 unassigned    wm       0               0         (0/0/0)          0
  7 unassigned    wm       0               0         (0/0/0)          0
  8       boot    wu       0 -    0        2.00MB    (1/0/0)       4096
  9 unassigned    wm       0               0         (0/0/0)          0

partition> ?
Expecting one of the following: (abbreviations ok):
        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> label
Ready to label disk, continue? y

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
[root@unknown: dsk# echo | format
Searching for disks...
Inquiry failed for this logical diskdone


AVAILABLE DISK SELECTIONS:
       0. c0d0 <▒x▒▒▒▒▒▒▒▒▒@▒▒▒ cyl 3782 alt 2 hd 255 sec 63>
          /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
       1. c2t0d0 <VMware,-VMware Virtual -1.0 cyl 1020 alt 2 hd 128 sec 32>
          /pci@0,0/pci15ad,1976@10/sd@0,0
Specify disk (enter its number): Specify disk (enter its number):
[root@unknown: dsk# newfs /dev/dsk/c2t0d0s0
newfs: construct a new file system /dev/rdsk/c2t0d0s0: (y/n)? y
/dev/rdsk/c2t0d0s0:     2097152 sectors in 512 cylinders of 128 tracks, 32 sectors
        1024.0MB in 26 cyl groups (20 c/g, 40.00MB/g, 19456 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 81984, 163936, 245888, 327840, 409792, 491744, 573696, 655648, 737600,
 1311264, 1393216, 1475168, 1557120, 1639072, 1721024, 1802976, 1884928,
 1966880, 2048832
[root@unknown: dsk# newfs /dev/dsk/c2t0d0s5
newfs: construct a new file system /dev/rdsk/c2t0d0s5: (y/n)? y
/dev/rdsk/c2t0d0s5:     2076672 sectors in 507 cylinders of 128 tracks, 32 sectors
        1014.0MB in 32 cyl groups (16 c/g, 32.00MB/g, 15360 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 65600, 131168, 196736, 262304, 327872, 393440, 459008, 524576, 590144,
 1442528, 1508096, 1573664, 1639232, 1704800, 1770368, 1835936, 1901504,
 1967072, 2032640
[root@unknown: dsk# mkdir /opt/mount1 /opt/mount2
[root@unknown: dsk# mount /dev/rdsk/c2t0d0s0 /opt/mount1
mount: /dev/rdsk/c2t0d0s0 not a block device
[root@unknown: dsk# mount /dev/dsk/c2t0d0s0 /opt/mount1
[root@unknown: dsk# mount /dev/dsk/c2t0d0s5 /opt/mount2
[root@unknown: dsk# df -h /opt/mount1 /opt/mount2
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c2t0d0s0      962M   1.0M   903M     1%    /opt/mount1
/dev/dsk/c2t0d0s5      953M   1.0M   895M     1%    /opt/mount2
[root@unknown: dsk#


[root@unknown: dsk# vi /etc/vfstab
"/etc/vfstab" 13 lines, 457 characters
#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/c0d0s1 -       -       swap    -       no      -
/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0        /       ufs     1       no      -
/dev/dsk/c0d0s7 /dev/rdsk/c0d0s7        /export/home    ufs     2       yes     -
/devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
/dev/dsk/c2t0d0s0 /dev/rdsk/c2t0d0s0    /opt/mount1     ufs     2       yes     -
~

~
~
~
"/etc/vfstab" 14 lines, 518 characters
[root@unknown: dsk# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0d0s0        8.1G   3.9G   4.1G    49%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   1.7G   556K   1.7G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
                       8.1G   3.9G   4.1G    49%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   1.7G    72K   1.7G     1%    /tmp
swap                   1.7G    32K   1.7G     1%    /var/run
/dev/dsk/c0d0s7         20G    20M    20G     1%    /export/home
/dev/dsk/c2t0d0s0      962M   1.0M   903M     1%    /opt/mount1
/dev/dsk/c2t0d0s5      953M   1.0M   895M     1%    /opt/mount2
[root@unknown: dsk# umount /opt/mount1
[root@unknown: dsk# mount /opt/mount1
[root@unknown: dsk# df -h /opt/mount1
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c2t0d0s0      962M   1.0M   903M     1%    /opt/mount1
[root@unknown: dsk#


No comments:

Post a Comment