Rabu, 03 Februari 2010

Cara Mengenali hingga Mounting usb-disk di solaris 10

Umumnya, disk yang di mount di solaris 10 adalah internal disk yang sudah di partisi atau external disk baik itu FC atau SATA yang di attachkan pada system. Pertanyaan yang muncul, apakah usb-disk atau pendrive dapat di attachkan dan dikenali pada solaris 10? jawabnya bisa iya bisa tidak tergantung format file system pada usb-disk atau pendrivenya.

untuk lebih detailnya tentang usb disk dan utility lainnya bisa cek di

http://www.sun.com/io_technologies/usb/USB-Faq.html#Storage

berikut step-step yang pernah saya kerjakan di mesin Sun Fire V890

1. jadi superuser (Login as root)
2. lihat konfigurasikonfigurasi disk
#cfgadm -al

bash-3.00# cfgadm -al
Ap_Id Type Receptacle Occupant Condition
PCI0 pci-pci/hp connected configured ok
PCI1 unknown empty unconfigured unknown
PCI2 pci-pci/hp connected configured ok
PCI3 unknown empty unconfigured unknown
PCI4 unknown empty unconfigured unknown
PCI5 unknown empty unconfigured unknown
PCI6 unknown empty unconfigured unknown
PCI7 fibre/hp connected configured ok
PCI8 fibre/hp connected configured ok
c0 scsi-bus connected configured unknown
c0::dsk/c0t0d0 CD-ROM connected configured unknown
c1 fc-private connected configured unknown
c1::500000e017710e81 disk connected configured unknown
c1::500000e017711171 disk connected configured unknown
c1::500000e0181b8d91 disk connected configured unknown
c1::500000e0181c1d91 disk connected configured unknown
c1::508002000065d961 ESI connected configured unknown
c2 fc-private connected configured unknown
c2::200400a0b832c06d disk connected configured unknown
c3 fc-private connected configured unknown
c3::200400a0b829e0ce disk connected configured unknown
usb0/1 usb-storage connected configured ok
usb0/2 unknown empty unconfigured ok
usb0/3 unknown empty unconfigured ok
usb0/4 unknown empty unconfigured ok


terlihat : usb0/1 usb-storage connected configured ok

2. check dengan iostat -En (sekalian melihat ukuran size hardisknya)

bash-3.00# iostat -En
c4t0d0 Soft Errors: 54 Hard Errors: 1 Transport Errors: 40
Vendor: Seagate Product: FreeAgent Go Revision: 102D Serial No: Size: 320.07GB <320070320640 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 54 Predictive Failure Analysis: 0
c0t0d0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: TSSTcorp Product: CD/DVDW TS-H652D Revision: SI00 Serial No:
Size: 0.00GB <0 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c5t0d0 Soft Errors: 315 Hard Errors: 3 Transport Errors: 3
Vendor: Seagate Product: FreeAgent Go Revision: 102D Serial No: Size: 320.07GB <320070320640 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 315 Predictive Failure Analysis: 0
c2t1d2 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0

3. cek dengan rmformat

ash-3.00# rmformat
Looking for devices...
1. Logical Node: /dev/rdsk/c0t0d0s2
Physical Node: /pci@8,700000/ide@1/sd@0,0
Connected Device: TSSTcorp CD/DVDW TS-H652D SI00
Device Type: DVD Reader/Writer
2. Logical Node: /dev/rdsk/c5t0d0s2
Physical Node: /pci@9,700000/usb@1,3/storage@1/disk@0,0
Connected Device: Seagate FreeAgent Go 0138
Device Type: Removable


4. format disk dengan tipe file system yang bisa terbaca pada solaris (menggunakan command fdisk)

bash-3.00# fdisk /dev/rdsk/c5t0d0s2
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
bash-3.00#


atau menggunakan command newfs -T

bash-3.00# newfs -T /dev/rdsk/c4t0d0s0
newfs: construct a new file system /dev/rdsk/c4t0d0s0: (y/n)? y
Warning: cylinder groups must have a multiple of 16 cylinders with the given
parameters
Rounded cgsize up to 64
Warning: insufficient space in super block for
rotational layout tables with nsect 63, ntrack 255, and nrpos 8.
Omitting tables - file system performance may be impaired.
Warning: 1 sector(s) in last cylinder unallocated
/dev/rdsk/c4t0d0s0: 625137344 sectors in 38913 cylinders of 255 tracks, 63 sectors
305242.8MB in 811 cyl groups (48 c/g, 376.52MB/g, 384 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 771216, 1542400, 2313584, 3084768, 3855952, 4627136, 5398320, 6169504,
6940688,
Initializing cylinder groups:
................
super-block backups for last 10 cylinder groups at:
617669264, 618440448, 619211632, 619982816, 620754000, 621525184, 622296368,
623067552, 623838736, 624609920

5. buat folder baru

mkdir /rmdisk

6. mount ke /rmdisk

# mount /dev/dsk/c5t0d0s2 /rmdisk
bash-3.00#
bash-3.00# ls
lost+found
bash-3.00# du -kh
8K ./lost+found
16K .
bash-3.00#


7. check mount poinnya

df -kh
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 14G 4.9G 9.4G 34% /
/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 26G 1.5M 26G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1
14G 4.9G 9.4G 34% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
14G 4.9G 9.4G 34% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
/dev/md/dsk/d6 8.6G 816M 7.7G 10% /tmp
swap 26G 32K 26G 1% /var/run
/dev/md/dsk/d4 19G 408M 19G 3% /source
/dev/md/dsk/d5 29G 4.5G 24G 16% /arch01
/dev/md/dsk/d3 48G 18G 30G 38% /apps
/dev/dsk/c5t0d0s2 298G 64M 295G 1% /rmdisk