Thursday, February 2, 2012

Formatting and Command Line tips

These commands were performed on a Solaris 10 i386 & SPARC system.

A quick method to monitor CPU intensive processes:
# ps -ef | egrep -v "STIME|$LOGNAME" | sort +3 -r | head -n 15

Formatting USB Devices to create a Unix File System (UFS) on Solaris 10

Make sure that your USB drive is not plugged into the Solaris system.
# svcadm disable volfs

Plug in your USB drive, the data provided is just for example.
# rmformat –l

Looking for devices …
1. Logical Node: /dev/rdsk/c0t0d0p0
Physical Node: /pci@0,0/pci17aa,20ab@1d,7 /storage@2/disk@0,0
Connected Device: Seagate    10EAVS External 1.75
Device Type: Removable

Run fdisk on the “Volmgt Node” for your device
# fdisk /dev/rdsk/c0t0d0p0

Delete any existing partitions and create a new partition with the SOLARIS2 option.  Make sure to choose option 5 to update disk configuration and exit.

Perform the following command to create your UFS file system.
# newfs /dev/rdsk/c0t0d0s2

FAT32 Creation on Solaris 10

Make sure that your USB drive is not plugged into the Solaris system.
# svcadm disable volfs

Plug in your USB drive, the data provided is just for example.
# rmformat –l

Looking for devices …
2. Logical Node: /dev/rdsk/c0t0d0p0
Physical Node: /pci@0,0/pci17aa,20ab@1d,7 /storage@2/disk@0,0
Connected Device: Seagate    10EAVS External 1.75
Device Type: Removable

Run fdisk on the “Volmgt Node” for your device
# fdisk /dev/rdsk/c0t0d0p0

Delete any existing partitions and create a new partition with the FAT32 option.  Make sure to choose option 5 to update disk configuration and exit.

Perform the following command to create your FAT32 file system.
# mkfs –F pcfs –o b=SEAGATE,fat=32 /dev/rdsk/c0t0d0p0:c
(the “b” is a labelname … useful if you want to label USB sticks)

To mount the newly created USB drive, perform the following:
# rmformat -l
# mount –F pcfs /dev/dsk/<USB DRIVE>:c /mnt
*Note* <USB DRIVE> could look like c0t0d0p0 depending on USB connection.

No comments:

Post a Comment