Editing
Solaris 10 System Administration Part I
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Local disk devices == disk device has physical & logical components === physical disk components === See other sites for more details on physical disk components. components include spindle, platters, heads, head actuator arm === logical disk components === sector - smallest addressable unit on a platter, one sector can hold 512 bytes of data track - series of sectors positioned end-to-end in a circular path, # of sectors per track varies due to size of tracks cylinder - a stack of concentric tracks <insert pic> a disk platter [physical component] is divided into sectors, tracks, & cylinders [logical components] disks present a fixed number of sectors per track to the Solaris OS even though # of sectors is different per track === disk labels & partition tables === disk slices are groups of cylinders used to organize data typically, administrators will use slices to organize data by function so a slice may store user's home directories, binaries, swap space, or system files a beginning & ending cylinder define each slice # of cylinders determines the size of a slice A disk label is a defined area of disk space used to store information about disk controller, geometry, & slices A disk label also contains a partition table which holds partition, cylinder, & slice information Label a disk = write slice info to disk [label a disk after changes are made] Solaris 10 supports two disk labels * Sun Microsystems, Inc (SMI) disk label ** SPARC-based Solaris OS ** SPARC volume table of contents (VTOC) label for disks (SMI VTOC) ** supports disks <1 terabyte in size ** resides in 1st sector of disk on SPARC ** includes partition table which enables you to define 0-7 disk partitions (slices) *** slice 2 represents entire disk *** slice 2 maintains important data regarding entire disk, like total # cylinders, size of total disk ** Must be used for SPARC-based & Solaris x86/x64-based systems boot disks ** Solaris x86/x64-based systems maintain two partition tables on each disk *** 1st sector contains a fixed disk (fdisk) partition table *** 2nd sector contains partition table with slice info within Solaris fdisk partition ** fdisk partition defines up to four fdisk partitions * extensible firmware interface (EFI) disk label ** supports disks >1 terabyte in size on 64-bit kernel ** supports virtual disk volumes ** partition table defines 0-9 disk partitions (slices) ** compatible with UFS & can create UFS >1 terabyte ** Solaris OS systems do not currently boot from disks using EFI labels <insert some pics of physical disks> === x86/x64 partitions & slices === recommended that you use fdisk menu & format utility to create or modify fdisk partition table 2nd sector of Solaris fdisk partition contains a partition table that defines slices within Solaris fdisk partition, the label that contains this partition table is known as x84/x64 VTOC using format utility Solaris fdisk partition can be divided into ten slices [0-9]. Slices 0-7 are used for the same purposes as SPARC SMI labels. Slice 2 represents entire disk drive. Slice 8 & 9 are used for purposes relating to x86/x64 hardware format utility automatically creates slice 8 & 9 when x86/x64 VTOC is defined within Solaris fdisk partition. slice 8 is always required, slice 9 exists, unassigned, on SCSI or Fibre-Channel disks. format utility prevents modifying slices 8 & 9 Solaris OS systems on x86/x64 platforms create device files to support 16 slices for each disk [0-15]. format utility limits to slices 0-7. Solaris x86/x64 systems also create device files that represent four possible fdisk partitions slice 8 is boot slice by default & contains GRUB stage1 program in sector 0, the Solaris disk label & VTOC in sectors 1 & 2, & GRUB stage2 program beginning at sector 50. Slice 8 occupies the 1st cylinder [0] of Solaris fdisk partition IDE/SATA disk drives slice 9 is tagged alternates slice. If slice 9 is defined it occupies 2nd & 3rd cylinder [1-2] of Solaris fdisk partition & contains blocks used to store bad block info === disk naming conventions === disk device names identify a series of components that together specify a particular disk device <insert image of naming convention> Disk device name format: controller, target, disk (or LUN), fdisk partition, & slice that a particular disk device uses disk device names represent full name of a slice or fdisk partition Controller #: identifies host bus adapter (HBA), HBA controls command & data communication between system & disk unit, [system <-HBA-> disk unit], #s are assigned sequentially Target #: identifies a unique hardware address assigned to SCSI target controller of a disk, tape, or optical drive. IDE & SATA drives typically do not use target #s (some do), Fibre-Channel attached disks may use World Wide Name (WWN) instead of a target # Disk #: unique identifier for each disk per controller # & target # pair. also known as logical unit number (LUN) fdisk partition #: number ranging from p0 to p4, number p0 represents whole physical disk, device names that include p# are only found on x86/x64 systems slice #: a # ranging from s0-s7 on SPARC systems & s0-s15 on x86/x64 systems ==== SCSI disk device names ==== SCSI specification allows multiple disks to one target controller * In some cases, SCSI disk & target controller are combined into one physical unit * also known as embedded SCSI configuration * disk # is always set to d0 with embedded SCSI disks <insert pic of embedded SCSI & regular configurations> ==== iSCSI disk devices ==== Solaris 10 8/07 release included support for iSCSI target devices The targets can be disk or tape systems with dedicated arrays can now export replicated storage with ZFS or UFS use <code>iscsitadm</code> command to set up & manage iSCSI target devices use <code>iscsiadm</code> command to identify iSCSI targets, which will discover & use iSCSI target devices === IDE & SATA disk device names === IDE & SATA disks do not use target controllers device names for IDE & SATA disks have controller #, disk #, & slice (fdisk partition) # Example: c#d#s# <insert image showing overview> Ultra 10 systems are different & use a target # to represent identify of disks on primary & secondary IDE buses * t0 = master device on primary IDE bus * t1 = slave device on primary IDE bus * t2 = master device on secondary IDE bus * t3 = slave device on secondary IDE bus <insert image example> === Solaris OS device naming conventions === Solaris OS uses three different types of names depending on how the device is being referenced * logical device names * physical device names * instance names ==== logical device names ==== logical device names are symbolic links to physical device names in /devices directory logical devices are primarily used when entering commands on command line all logical device names are in /dev directory logical device names contain controller #, target # (if required), disk #, & [slice or fdisk partition #] every disk has entries in /dev/dsk & /dev/rdsk directories /dev/dsk is for block disk devices /dev/rdsk is for character disk devices ==== physical device names ==== uniquely identifies physical location of hardware devices on system physical device names are located in /devices directory physical device name contains hardware information, separated by slashes, that represent the path through the system's physical device tree to the device symbolic links in /dev/dsk & /dev/rdsk point to physical device files, use ls -l use ls -lL The use of <code>ls</code> command with -L option will, if file is a symbolic link, evaluate the file info & file type of the file or directory that the symbolic link references, rather than those of the link itself. However, the name of the link is displayed, rather than the referenced file or directory. Example: <pre># ls -l /dev/dsk/c1t1d0s0 lrwxrwxrwx 1 root root 43 May 3 16:19 /dev/dsk/c1t1d0s0 -> ../../devices/pci@1c,600000/scsi@2/sd@1,0:a # ls -lL /dev/dsk/c1t1d0s0 brw-r----- 1 root sys 32, 8 Jul 14 16:50 /dev/dsk/c1t1d0s0</pre> <insert pic of sample device tree> Two categories of device trees include devices recognized by hardware at boot time & known by Solaris OS kernel [managed by software controls available to Solaris OS. If no device file exists for a powered-on & connected physical device then Solaris OS kernel doesn't recognize the device in its device tree Top directory in hierarchy is called root node of the device tree. The bus nexus nodes & leaf nodes below root object have device drivers associated to them A device driver is software that communicates with physical device & device driver must be available to Solaris OS kernel so system can use device During system initialization the Solaris OS kernel identifies physical location of a device. The kernel relates a node with an address [nodename@address] which is the physical device name <insert pic of example> ==== instance names ==== instance names are shortened names for a physical device instance names are abbreviated names assigned by the Solaris OS kernel for each system device instance names are usually used to display on console or in /var/adm/messages log file Example instance names: * sd# = SCSI disk name & # is the number, such that sd1 would be 2nd SCSI disk device * cmdk# = common disk driver is the disk name & # is the number, such that cmdk0 would be first SATA disk device * dad# = direct access device name & # is the number, such that dad1 would be 2nd IDE disk device * ata# = Advanced Technology Attachment (ATA) is disk name & # is the number, such that ata0 would be first * qfe# = quad fast ethernet & # is the number, such that qfe2 is 3rd interface on quad fast ethernet device === listing device names === Some ways in Solaris OS to list system devices: * /etc/path_to_inst file * prtconf command * format utility ==== /etc/path_to_inst file ==== Solaris system maps physical name <-> instance name in /etc/path_to_inst file Solaris kernel uses the names in file to identify every possible device * file is read only at boot time * maintained by kernel Example file from v240: <pre># cat /etc/path_to_inst # # Caution! This file contains critical kernel state # "/iscsi" 0 "iscsi" "/pseudo" 0 "pseudo" "/scsi_vhci" 0 "scsi_vhci" "/options" 0 "options" "/ramdisk-root" 0 "ramdisk" "/pci@1f,700000" 0 "pcisch" "/pci@1f,700000/network@2" 0 "bge" "/pci@1f,700000/network@2,1" 1 "bge" "/pci@1e,600000" 1 "pcisch" "/pci@1e,600000/isa@7" 0 "ebus" "/pci@1e,600000/isa@7/power@0,800" 0 "power" "/pci@1e,600000/isa@7/rmc-comm@0,3e8" 0 "rmc_comm" "/pci@1e,600000/isa@7/i2c@0,320" 0 "pcf8584" "/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2" 0 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/chassis-fru-prom@0,a8" 1 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0" 2 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4" 3 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6" 4 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8" 5 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba" 6 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc" 7 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6" 8 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8" 9 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca" 10 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc" 11 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/nvram@0,50" 12 "seeprom" "/pci@1e,600000/isa@7/i2c@0,320/gpio@0,44" 0 "pca9556" "/pci@1e,600000/isa@7/i2c@0,320/gpio@0,46" 1 "pca9556" "/pci@1e,600000/isa@7/i2c@0,320/gpio@0,4a" 2 "pca9556" "/pci@1e,600000/isa@7/i2c@0,320/gpio@0,68" 3 "pca9556" "/pci@1e,600000/isa@7/i2c@0,320/gpio@0,88" 4 "pca9556" "/pci@1e,600000/isa@7/i2c@0,320/gpio@0,70" 5 "pca9556" "/pci@1e,600000/isa@7/serial@0,3f8" 0 "su" "/pci@1e,600000/isa@7/serial@0,2e8" 1 "su" "/pci@1e,600000/pmu@6" 0 "pmubus" "/pci@1e,600000/pmu@6/gpio@80000000" 0 "pmugpio" "/pci@1e,600000/pmu@6/i2c@0,0" 0 "smbus" "/pci@1e,600000/usb@a" 0 "ohci" "/pci@1e,600000/ide@d" 0 "uata" "/pci@1e,600000/ide@d/sd@0,0" 3 "sd" "/memory-controller@0,0" 0 "mc-us3i" "/memory-controller@1,0" 1 "mc-us3i" "/pci@1c,600000" 2 "pcisch" "/pci@1c,600000/scsi@2" 0 "glm" "/pci@1c,600000/scsi@2/sd@0,0" 0 "sd" "/pci@1c,600000/scsi@2/sd@1,0" 1 "sd" "/pci@1c,600000/scsi@2/sd@2,0" 2 "sd" "/pci@1c,600000/scsi@2/sd@3,0" 4 "sd" "/pci@1c,600000/scsi@2,1" 1 "glm" "/pci@1d,700000" 3 "pcisch" "/pci@1d,700000/network@2" 2 "bge" "/pci@1d,700000/network@2,1" 3 "bge" "/pci@1d,700000/pci@1" 0 "pci_pci" "/pci@1d,700000/pci@1/pci@0" 1 "pci_pci" "/pci@1d,700000/pci@1/pci@0/network@0" 0 "ce" "/pci@1d,700000/pci@1/pci@0/network@1" 1 "ce" "/pci@1d,700000/pci@1/pci@4" 2 "pci_pci" "/pci@1d,700000/pci@1/pci@4/network@2" 2 "ce" "/pci@1d,700000/pci@1/pci@4/network@3" 3 "ce" #</pre> Instance names correlate values in the last two fields, for example an entry for SCSI disk 3 on Sun v240 from file is "/pci@1c,600000/scsi@2/sd@2,0" 2 "sd" this line & sd2 identify the same device physical device path /pci@1c,600000/scsi@2/sd@2,0 identifies the path through the device tree to the device different systems have different physical device names ==== prtconf command ==== * use prtconf command to display system configuration info * prtconf lists all possible instances of devices (whether attached or not) * use <code>prtconf | grep -v not</code> to list only attached devices on system example prtconf output on Sun v240: <pre># prtconf | grep -v not System Configuration: Sun Microsystems sun4u Memory size: 8192 Megabytes System Peripherals (Software Nodes): SUNW,Sun-Fire-V240 scsi_vhci, instance #0 options, instance #0 memory-controller, instance #0 memory-controller, instance #1 pci, instance #0 network, instance #0 network, instance #1 pci, instance #1 isa, instance #0 i2c, instance #0 motherboard-fru-prom, instance #0 chassis-fru-prom, instance #1 power-supply-fru-prom, instance #2 power-supply-fru-prom, instance #3 dimm-spd, instance #4 dimm-spd, instance #5 dimm-spd, instance #6 dimm-spd, instance #7 dimm-spd, instance #8 dimm-spd, instance #9 dimm-spd, instance #10 dimm-spd, instance #11 nvram, instance #12 gpio, instance #0 gpio, instance #1 gpio, instance #2 gpio, instance #3 gpio, instance #4 gpio, instance #5 power, instance #0 serial, instance #0 serial, instance #1 rmc-comm, instance #0 pmu, instance #0 i2c, instance #0 gpio, instance #0 usb, instance #0 ide, instance #0 sd, instance #3 pci, instance #2 scsi, instance #0 sd, instance #0 sd, instance #1 sd, instance #2 sd, instance #4 scsi, instance #1 pci, instance #3 network, instance #2 network, instance #3 pci, instance #0 pci, instance #1 network, instance #0 network, instance #1 pci, instance #2 network, instance #2 network, instance #3 iscsi, instance #0 pseudo, instance #0 #</pre> ==== format utility ==== use format utility to display both logical & physical device names for all currently available disks Example from Sun v240 <pre># format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@0,0 1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@1,0 2. c1t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@2,0 3. c1t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@3,0 Specify disk (enter its number):</pre> ==== prtdiag command ==== use prtdiag command to display system configuration & system info === reconfiguring devices === Solaris system can recognize devices that were just added by using various methods, including a reconfiguration boot, or devfsadm command ==== reconfiguration boot ==== reconfiguration boot process adds new device entries to /etc/path_to_inst file & symbolic links & device files to /dev & /devices directories Example of a reconfiguration boot: # create /reconfigure file, this file causes system to check for presence of newly installed devices at next boot/power on ## # touch /reconfigure # shutdown system (reboot if device is already installed) # install new device # power on & boot system # log in to system & use prtconf command to verify newly installed device Note: On SPARC-based systems you can invoke a manual reconfiguration boot with open boot PROM (OBP) level command "boot -r". On x86/x64 systems use GRUB & edit kernel command associated with desired boot selection & add "-r" option then boot system ==== use devfsadm command ==== devfsadm command attempts to load every driver in the system & attach all possible device instances For new devices devfsadm will: * create physical device files in /devices directory * create symbolic links in /dev directory * manage entries in /etc/path_to_inst file use devfsadm -c option to limit devfsadm to a particular device class format: <code>devfsadm -c device_class [-c device_class1 -c device_class2 etc]</code> values for device_class include disk, tape, port, audio, & pseudo use devfsadm -i option to limit devfsadm to the name of a specific driver format: <code>devfsadm -i driver_name</code> example: devfsadm -i sd limits devfsadm to those disks supported by the sd driver Include -v option to devfsadm to display verbose output of changes to device tree Run cleanup routines to remove unreferenced symbolic links & device files for devices no longer attached to system by using devfsadm -C [capital C] === partitioning hard disk === use format utility to configure disk partitions & slices X86/x64 systems require additional step to create a Solaris fdsik partition before you can create slices within that partition. SPARC systems do not use fdisk partitions Solaris OS will perform disk partition as part of installation process ==== disk partitioning ==== Using format utility to create fdisk partitions or slices # identify correct disk # x86/x64 systems use fdisk menu in format utility to create fdisk partitions & save fdisk partition table to disk # use partition menu in format utility to divide disk or Solaris fdisk partitions into slices # label disk or Solaris fdisk partition ==== disk management ==== Slices are defined by an offset & a size, expressed in whole cylinders. On SPARC systems the offset is the distance from cylinder 0. On x86/x64 systems slice offsets are specified from 1st cylinder of Solaris fdisk partition <insert pic & text details showing example> On x86/x64 systems the format utility shows 1st cylinder of Solaris fdisk partition as cylinder 0 IDE/SATA disks in x86/x64 systems slice 8 occupies cylinder 0 & slice 9 cylinder 1 & 2. Slice 8 & 9 are reserved so format utility does not allow changes to slice 8 & 9. First available cylinder for additional slice definitions is cylinder 3. Slice 2 starts at cylinder 0 & ends on last available cylinder of Solaris fdisk partition. <insert pic of x86/x64 slice example> ==== identifying wasted disk space ==== when any cylinders are not allocated to any disk slice disk space is wasted <insert pic showing unallocated cylinders> once identified wasted space may be assigned to a slice ==== identifying overlapping disk slices ==== overlapping disk slices occur when cylinders are allocated to more than one disk slice <insert pic of overlapping disk slices> only format utility modify command warns of overlapping slices Note: changing size of slices will make existing data inaccessible, backup or copy data to another location before resizing slices or changing partitions ==== format utility & disk partition table ==== format utility allows modification of two partition tables on disk: * fdisk partition table * Solaris OS partition tables (SPARC VTOC & x86/x64 VTOC) ===== fdisk partition tables ===== fdisk partition table defines up to four fdisk partitions on a disk Solaris OS systems on x86/x64 platforms use fdisk partition table to determine parts of disk reserved for different operating systems & identify boot partition Only x86/x64 systems use fdisk partition tables (fdisk menu from format utility) ===== Solaris OS partition tables ===== VTOC define slices that Solaris OS will use on a disk. use partition menu in format utility to view, modify, & save partition tables (VTOC) * SPARC systems read VTOC from 1st sector of disk * x86/x64 systems read VTOC from 2nd sector of Solaris fdisk partition partition menu in format utility describes writing the VTOC as labeling the disk. Labeling means saving slice info into VTOC. Failure to label disk or Solaris fdisk partition after making changes the slice info changes will be lost format utility works with /etc/format.dat file which is read when format utility is run /etc/format.dat file is a table of available disk types & a set of predefined partition tables that can be used to partition a disk quickly partition menu uses term partition exclusively instead of slice so the term partition & slice are identical <insert image to show relationship between VTOC, memory, & /etc/format.dat> save function in format utility * writes partition table info into ./format.dat by default * to save to /etc/format.dat specify absolute path or run format utility within /etc directory & accept default file name * by default Solaris OS format.dat file exists in /etc directory ==== using format utility ==== type format at command prompt & use menu-driven choices to perform various format activites Example of format: <pre># format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@0,0 1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@1,0 2. c1t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@2,0 3. c1t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@3,0 Specify disk (enter its number): 0 selecting c1t0d0 [disk formatted] Warning: Current Disk has mounted partitions. /dev/dsk/c1t0d0s0 is currently mounted on /. Please see umount(1M). /dev/dsk/c1t0d0s1 is currently mounted on /usr/openwin. Please see umount(1M). /dev/dsk/c1t0d0s3 is currently mounted on /var. Please see umount(1M). /dev/dsk/c1t0d0s4 is currently used by swap. Please see swap(1M). /dev/dsk/c1t0d0s5 is currently mounted on /opt. Please see umount(1M). /dev/dsk/c1t0d0s6 is currently mounted on /usr. Please see umount(1M). /dev/dsk/c1t0d0s7 is currently mounted on /export/home. Please see umount(1M). 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 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></pre> <insert example of using format utility to setup disk> === using format utility to create fdisk partitions === * Only x86/x64 systems require fdisk partitions [at least one on each disk] * fdisk menu allows creation of up to four disk partitions * only one Solaris OS fdisk partition can exist on a disk <insert example of using format utility to setup fdisk partitions> === EFI Label & VTOC Label comparison === EFI & Volume Table of Contents (VTOC) differences: * EFI supports disk sizes >1 TB * EFI provides usable slices 0-6 (2 is not special) * EFI label is typically 34 (0-33) sectors so partitions start at sector 34 * No cylinder, head, or sector info is stored in EFI label * sizes are reported as blocks * info that was stored in alternate cylinder areas (last two cylinders on disk) is now stored in slice 8 === EFI Disk Label Restrictions === * cannot boot from disk with an EFI disk label * cannot use fdisk command on disk with EFI label on >1 terabyte disks * EFI specification prohibits overlapping slices * EFI disk label provides info about disk or partition sizes in sectors & blocks * format command save option is not supported (no format.dat file) * format command backup option not applicable === Viewing the VTOC === * format command verify option * prtvtoc command from CLI === Replacing SPARC or x86/x64 VTOC on disk === * use prtvtoc command to save VTOC info to a file * use fmthard command to replace SPARC or x86/x64 VTOC * prtvtoc & fmthard commands read & write VTOC on disks & do not modify fidsk partitions Example: <pre># prtvtoc /dev/rdsk/c1t0d0s2 * /dev/rdsk/c1t0d0s2 partition map * * Dimensions: * 512 bytes/sector * 424 sectors/track * 24 tracks/cylinder * 10176 sectors/cylinder * 14089 cylinders * 14087 accessible cylinders * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 0 4100928 4100927 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 4100928 24005184 28106111 / 1 4 00 28106112 10247232 38353343 /usr/openwin 2 5 00 0 143349312 143349311 3 7 00 38353344 2818752 41172095 /var 4 3 01 0 4100928 4100927 5 0 00 41172096 10247232 51419327 /opt 6 4 00 51419328 10003008 61422335 /usr 7 8 00 61422336 81926976 143349311 /export/home # prtvtoc /dev/rdsk/c1t0d0s2 > /var/tmp/c1t0d0s2.vtoc # ls /var/tmp c1t0d0s2.vtoc # cat /var/tmp/c1t0d0s2.vtoc * /dev/rdsk/c1t0d0s2 partition map * * Dimensions: * 512 bytes/sector * 424 sectors/track * 24 tracks/cylinder * 10176 sectors/cylinder * 14089 cylinders * 14087 accessible cylinders * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 0 4100928 4100927 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 4100928 24005184 28106111 / 1 4 00 28106112 10247232 38353343 /usr/openwin 2 5 00 0 143349312 143349311 3 7 00 38353344 2818752 41172095 /var 4 3 01 0 4100928 4100927 5 0 00 41172096 10247232 51419327 /opt 6 4 00 51419328 10003008 61422335 /usr 7 8 00 61422336 81926976 143349311 /export/home # fmthard -s /var/tmp/c1t0d0s2.vtoc /dev/rdsk/c1t0d0s2 fmthard: New volume table of contents now in place. # prtvtoc /dev/rdsk/c1t0d0s2 * /dev/rdsk/c1t0d0s2 partition map * * Dimensions: * 512 bytes/sector * 424 sectors/track * 24 tracks/cylinder * 10176 sectors/cylinder * 14089 cylinders * 14087 accessible cylinders * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 0 4100928 4100927 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 4100928 24005184 28106111 / 1 4 00 28106112 10247232 38353343 /usr/openwin 2 5 00 0 143349312 143349311 3 7 00 38353344 2818752 41172095 /var 4 3 01 0 4100928 4100927 5 0 00 41172096 10247232 51419327 /opt 6 4 00 51419328 10003008 61422335 /usr 7 8 00 61422336 81926976 143349311 /export/home #</pre> === x86/x64 VTOC info & Solaris fdisk partitions === On x86/x64 systems Solaris fdisk partition must much size in VTOC. If the info doesn't match fmthard reports an error. To fix: * Use partition menu in format utility to adjust slices in Solaris fdisk partition * Use fdisk menu in format utility to adjust fdisk partition to match size defined in prtvtoc output. Use fmthard to write x86/x64 VTOC info to disk * Use fdisk command to replace the fdisk partition table with save fdisk partition info, use fmthard to write the x86/x64 VTOC info to disk === Replace fdisk partition tables on x86/x64 systems === fdisk command enables user to: * view & modify fdisk partition tables on disk * save fdisk partition table to file * replace fdisk partition table on disk with file of saved partition table info view fdisk partition table # fdisk -W - /dev/rdsk/[disk name] fdisk commands lists disk geometry, all possible partition types & their corresponding ID values, & current defined fdisk partitions Save fdisk partition table info to a file Example: # fdisk -W [file to save partition table info] /dev/rdsk/[specify fdisk partition 0 of correct disk] Replace fdisk partition table on disk with save info Example: # fdisk -F [file of partition table info] /dev/rdsk/[specify fdisk partition 0 of correct disk] -F option will zero out VTOC on Solaris partition if fdisk partition table changes
Summary:
Please note that all contributions to GotOpinion may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
GotOpinion:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information