詳細検索

Get backup with USB external hard drive on Solaris 10

Avatar
by miyashitak
3 min read

Get backup with USB external hard drive on Solaris 10
Translated from 日本語 • View original

Good morning. This is the Miyashita of infrastructure. Normally, it is cloud-oriented,
I have attached a USB HDD to solaris, so I will introduce the procedure.

Environment: Solaris 10
Equipment: SPARC T2000
HDD: 500GB USB portable hard disk with IO data

○1st time

I tried to connect it for the time being without thinking too much. messages logs appear and are recognized
You can check it.

[shell]Apr 9 15:45:11 test-web21 usba: [ID 912658 kern.info] USB 2.10 device (usb4bb,152) operating at hi speed (USB 2.x) on USB 2.0 external hub: storage@1, scsa2usb2 at bus address 7 Apr 9 15:45:11 test-web usba: [ID 349649 kern.info] I-O DATA DEVICE, INC. HDPF-UT 000315C3C1900CEE Apr 9 15:45:11 test-web genunix: [ID 936769 kern.info] scsa2usb2 is /pci@400/pci@2/pci@0/ pci@f/pci@0/usb@0,2/hub@4/storage@1 Apr 9 15:45:11 test-web genunix: [ID 408114 kern.info] /pci@400/pci@2/pci@0/pci@f/pci@0/usb@0,2/hub@4/storage@1 (scsa2usb2) online Apr 9 15:45:13 test-web scsi: [ID 583861 kern.info] sd5 at scsa2usb2: target 0 lun 0 Apr 9 15:45:13 test-web genunix: [ID 936769 kern.info] sd5 is /pci@400/pci@2/pci@0/pci@f/pci@0/usb@0,2/ hub@4/storage@1/disk@0,0 Apr 9 15:45:13 test-web genunix: [ID 408114 kern.info] /pci@400/pci@2/pci@0/pci@f/pci@0/usb@0,2/hub@4/storage@1/disk@0,0 (sd5) online[/shell]
When I checked the partition information, unfortunately it was NTFS, and solaris was not supported, so it became a format error.

[shell]# fdisk /dev/rdsk/c8t0d0s2

SELECT ONE OF THE FOLLOWING:

1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Exit (update disk configuration and exit) 5. Cancel (exit without updating disk configuration)[/shell]
To recreate the partition, delete the NTFS partition (3) and recreate it with solaris2 (1).
I thought I could mount it with this, but for some reason an error came out and we entered a stalemate.
The message says it's already mounted. Apparently the vol manager tried his best to mount
It seems that I can't move because I failed on the way.

[shell]# rmformat Looking for a device... 3. Volmgt Node: /vol/dev/aliases/rmdisk0 Logical Node: /dev/rdsk/c8t0d0s2 Physical Node: /pci@400/pci@2/pci@0/pci@f/pci@0/usb@0,2/hub@4/storage@1/disk@0,0 Connected Device: I-O DATA HDPF-UT 5312 Device Type: Removable[/shell]
Volmgt Node is /vol/dev/aliases/rmdisk0, and it is mounted in solaris, but it is an unknown file system.
I fell into a state where I could not read or write normally.

○ 2nd time

The vol manager stops and tries to proceed manually.

[shell]# /etc/init.d/volmgt stop[/shell]
It is the same until the HDD is connected and the device is recognized from the logs.
[shell]# rmformat 3. Logical Node: /dev/rdsk/c8t0d0s2 Physical Node: /pci@400/pci@2/pci@0/pci@f/pci@0/usb@0,2/hub@4/storage@1/disk@0,0 Connected Device: I-O DATA HDPF-UT 5312 Device Type: Removable[/ shell]
Since there is no Volmgt Node yet, automatic mounting has not been performed.

Create a UFS file system. [shell]# newfs -f 4096 /dev/rdsk/c8t0d0s0[/shell] *The device name c8t0d0sX is identified from the log information.
 The c8t0d0s2 and c8t0d0s0 designations are somehow specified by looking at the Oracle documentation.
 Creating a UFS file system takes about 1 hour for 500 GB.

Now let's mount it.
[shell]# mkdir /usb0 # /usr/sbin/mount /dev/dsk/c8t0d0s0 /usb0 # df -k /usb0 filesys 1K-block available available % mount position used /dev/dsk/c8t0d0s0 480990732 4860508 471320320 2% /usb0[/shell]
I was able to mount it safely. Now I have a simple backup area.
I really want to use StrageGateway, but that's for the next time.

○ Compare writing speeds

Let's create a file of 1GB each with a USB HDD and a local HDD and compare the write speed.
USB DISK
[shell]# time mkfile 1g file.dat

real 3:09.0 user 0.2 sys 2.3[/shell]
・Local DISK
[shell]# time mkfile 1g file.dat

real 8.2 user 0.1 sys 2.0[/shell]
As expected, the writing speed is quite different. I don't think it can be used for time-limited maintenance...
As for future challenges,

・Can it be improved a little if the power supply is an AC-powered HDD instead of bus power?
・Can it be properly recognized when connecting the HDD mounted this time to another Solaris machine?

I would like to verify this.

Finally, don't forget to start volmgt.

[shell]# /etc/init.d/volmgt start[/shell]

Related Articles