Temat: dodanie dysku do zone
probowalem na roznych slice'ach
solaris1# zpool destroy mypool
solaris1# newfs /dev/rdsk/c2t2d0
newfs: /dev/rdsk/c2t2d0: No such file or directory
solaris1# newfs /dev/rdsk/c2t2d0s0
newfs: construct a new file system /dev/rdsk/c2t2d0s0: (y/n)? y
/dev/rdsk/c2t2d0s0: 4173824 sectors in 1019 cylinders of 128 tracks, 32 sectors
2038,0MB in 45 cyl groups (23 c/g, 46,00MB/g, 11264 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 94272, 188512, 282752, 376992, 471232, 565472, 659712, 753952, 848192,
3298432, 3392672, 3486912, 3581152, 3675392, 3769632, 3863872, 3958112,
4052352, 4146592
solaris1# zonecfg -z mojzone
zonecfg:mojzone> add fs
zonecfg:mojzone:fs> set type=ufs
zonecfg:mojzone:fs> set dir=/mnt/disk5
zonecfg:mojzone:fs> set special=/dev/dsk/c2t2d0s0
zonecfg:mojzone:fs> set raw=/dev/rdsk/c2t2d0s0
zonecfg:mojzone:fs> end
zonecfg:mojzone> commit
zonecfg:mojzone> exit
solaris1# mkdir /mnt/disk5
solaris1# mount /dev/dsk/c2t2d0s0 /mnt/disk5
solaris1# zonecfg -z mojzone
zonecfg:mojzone> commit
zonecfg:mojzone> info
zonename: mojzone
zonepath: /dyski/mojzone
brand: native
autoboot: true
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
fs:
dir: /mnt/disk5
special: /dev/dsk/c2t2d0s0
raw: /dev/rdsk/c2t2d0s0
type: ufs
options: []
net:
address: 192.168.0.45
physical: e1000g0
defrouter: 192.168.0.1
attr:
name: comment
type: string
value: "god damnit"
zonecfg:mojzone> exit
solaris1# zoneadm -z mojzone boot
zoneadm: zone 'mojzone': fsck of '/dev/rdsk/c2t2d0s0' failed with exit status 33; run fsck manually
zoneadm: zone 'mojzone': call to zoneadmd failed
solaris1# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 4092 alt 2 hd 128 sec 32>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c0d1 <DEFAULT cyl 2044 alt 2 hd 128 sec 32>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0
2. c1d1 <DEFAULT cyl 2044 alt 2 hd 128 sec 32>
/pci@0,0/pci-ide@7,1/ide@1/cmdk@1,0
3. c2t0d0 <DEFAULT cyl 1020 alt 2 hd 128 sec 32>
/pci@0,0/pci15ad,1976@10/sd@0,0
4. c2t1d0 <DEFAULT cyl 1020 alt 2 hd 128 sec 32>
/pci@0,0/pci15ad,1976@10/sd@1,0
5. c2t2d0 <DEFAULT cyl 1020 alt 2 hd 128 sec 32>
/pci@0,0/pci15ad,1976@10/sd@2,0
Specify disk (enter its number): 5
selecting c2t2d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c2t2d0s0 is currently mounted on /mnt/disk5. Please see umount(1M).
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
fdisk - run the fdisk program
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> part
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> print
Current partition table (original):
Total disk cylinders available: 1020 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 1 - 1019 1.99GB (1019/0/0) 4173824
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 1019 1.99GB (1020/0/0) 4177920
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 2.00MB (1/0/0) 4096
9 unassigned wm 0 0 (0/0/0) 0
partition>quit
solaris1# df -h /mnt/disk5
Filesystem size used avail capacity Mounted on
/dev/dsk/c2t2d0s0 1,9G 2,0M 1,9G 1% /mnt/disk5
solaris1# mount | grep disk5
/mnt/disk5 on /dev/dsk/c2t2d0s0 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=8000c0 on Pn maj 10 15:45:57 2010
solaris1#
Edit:
oczywiscie bez dysku chodzi :)
solaris1#
solaris1#
solaris1# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- mojzone installed /dyski/mojzone native shared
solaris1# zonecfg -z mojzone
zonecfg:mojzone> remove fs dir=/mnt/disk5
zonecfg:mojzone> commit
zonecfg:mojzone> exit
solaris1# zoneadm -z mojzone boot
solaris1# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
30 mojzone running /dyski/mojzone native shared
solaris1#
Rafal S. edytował(a) ten post dnia 10.05.10 o godzinie 16:58