Go to main content
Oracle® Solaris 11.3 でのデバイスの管理

印刷ビューの終了

更新: 2016 年 11 月
 
 

USB 大容量ストレージデバイス上に Solaris パーティションを作成してスライスを変更する方法

次の手順では、Solaris パーティションを作成してスライスを変更する方法を示します。

このタスクを実行する前にデータをバックアップしてください。

  1. 管理者になります。
  2. (オプション) システムのパーティションの情報を表示します。
    # fdisk device
  3. 現在のスライスを表示します。
    # prtvtoc device
  4. スライスの情報を含むテキストファイルを作成します。

    各スライスがシリンダ境界から始まっていることを確認します。たとえば、スライス 1 は 822280000 バイトから始まっています。この数は、シリンダサイズ (バイト数) の 1000 倍になります。

    詳細は、rmformat(1)–s オプションの説明を参照してください。

  5. 前の手順で作成したスライスファイルを参照することによって、スライスを作成します。
    # rmformat -s slice-file device
  6. 新しいスライスの情報を表示します。
    # prtvtoc device
使用例 57  USB デバイスでのスライスの作成

次の例では、デバイス c5t0d0s2 にスライスを作成しています。スライスファイル myslice が次の内容で作成されました。

slices: 0 = 0, 5GB, "wm", "home" :
1 = 8225280000, 6GB :
2 = 0, 44GB, "wm", "backup" :
6 = 16450560000, 15GB

このファイルは、新しいスライスを作成するときに使用されます。

# 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現在のパーティションが受け入れられ、変更されません。

# prtvtoc /dev/rdsk/c5t0d0s2
* /dev/rdsk/c5t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*     255 tracks/cylinder
*   16065 sectors/cylinder
*    5836 cylinders
*    5836 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
0      0    00          0  93755340  93755339
2      0    00          0  93755340  93755339

# rmformat -s myslice /dev/rdsk/c5t0d0s2

# prtvtoc /dev/rdsk/c5t0d0s2
* /dev/rdsk/c5t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*     255 tracks/cylinder
*   16065 sectors/cylinder
*    5836 cylinders
*    5836 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector
*    10485760   5579240  16064999
*    28647912   3482088  32129999
*    63587280  30168060  93755339
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
0      8    00          0  10485760  10485759
1      3    01   16065000  12582912  28647911
2      5    00          0  92274688  92274687
6      4    00   32130000  31457280  63587279