Sie sind auf Seite 1von 2

Hot-Plugging and Dynamic Reconfiguration

Adding, removing, or replacing system components such as SCSI drives typically requires that the system be shut down, the components changed, and then the system reconfigured during the next system boot. Hot-plugging allows these types of hardware system components to be changed without shutting down the system. Dynamic Reconfiguration supports hot-plugging by allowing the system to recognize the new hardware (or even software) configuration. The cfgadm command supports hot-plugging SCSI devices on SPARC and Intel-compatible platforms and PCI adapter cards on Intel compatible platforms. The following cfgadm command can be used to display this information:
# cfgadm -al AP_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown #

to disconnect the command:

c1

controller, use the following

# cfgadm -c disconnect c1 #

Likewise, to connect the


# cfgadm -c connect c1 #

c1

controller, use the following command:

the following shows you how to add a disk to the c0 controller on an SPARC system:
# cfgadm -x insert_device c0 Adding device to SCSI HBA: /devices/sbus@1f,0/ SUNW:fas@0,8800000 This operation will suspend activity on SCSI bus: c0 Continue (yes/no)? y SCSI bus quiesced successfully. It is now safe to proceed with hot plug operation. Enter y if operation is complete or n to abort (yes/no)? y #

Creating UFS File Systems


The mkfs(1M), mkfs_ufs(1M), and a UFS file system.
newfs(1M)

commands can be used to create

The following listing shows the fsck command checking the 1GB file system previously created:
# fsck -F ufs /dev/rdsk/c0t2d0s4 ** /dev/rdsk/c0t2d0s4 ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 9 used, 288846 free #

The superblock stores summary information about the file system and it is the most frequently corrupted component. Fortunately, alternative superblocks are configured when a file system is created using the newfs command. To replace a corrupted superblock, first use the newfs command with the -N command-line argument to display the alternative superblocks. Then, use the -o b=block option of the fsck command to specify the alternative superblock. If for some reason you cannot run newfs to locate alternative superblocks, try block 32, because it is typically the first alternative superblock in a UFS file system. The following listing shows this procedure.
# newfs -N /dev/rdsk/c0t2d0s4 /dev/rdsk/c0t2d0s4: 615600 sectors in 405 cylinders of 19 tracks, 80 sectors 300.6MB in 26 cyl groups (16 c/g, 11.88MB/g, 5696 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 24432, 48832, 73232, 97632, 122032, 146432, 170832, 195232, 219632, 244032, 268432, 292832, 317232, 341632, 366032, 390432, 414832, 439232, 463632, 488032, 512432, 536832, 561232, 585632, 610032, # fsck -F ufs -o b=32 /dev/rdsk/c0t2d0s4 Alternate super block location: 32. ** /dev/rdsk/c0t2d0s4 ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 9 used, 288846 free ***** FILE SYSTEM WAS MODIFIED ***** #

Das könnte Ihnen auch gefallen