Skillnad mellan versioner av "Oracle-Solaris"
Från wiki.soltec.se
Js146669 (Diskussion | bidrag) |
Js146669 (Diskussion | bidrag) |
||
Rad 1: | Rad 1: | ||
+ | __TOC__ | ||
==Disk Devices== | ==Disk Devices== | ||
Versionen från 5 september 2017 kl. 21.36
Disk Devices
Commands to display all disks on a system:
# cfgadm -s "select=type(disk)" # echo | format # format -e
Configure a disk to be used via iSCSI
# svcadm enable svc:/network/iscsi/initiator # iscsiadm modify initiator-node -A myclient # iscsiadm add discovery-address 10.211.55.200 # iscsiadm discovery -t enable # devfsadm -c iscsi
Replace a faulty disk c1t1d0 from ZFS pool testpool:
# zpool offline testpool c1t1d0 # cfgadm -c unconfigure c1::dsk/c1t1d0 # cfgadm -c configure c1::dsk/c1t1d0 # zpool replace testpool c1t1d0 # zpool online testpool c1t1d0
Mirror existing boot disk c3t0d0s0 with disk c3t2d0s0
# fdisk -B c3t2d0s0
Write the existing submirror disk vtoc to the replacement disk
# prvtoc /dev/rdsk/c3t0d0s0 | fmthard -s - /dev/rdsk/c3t2d0s0
Alternatively you can use the replaced disks vtoc from an
existing explorer data collector output, if installed. For an exact copy, don't forget to check that the replacement
disk has the same HW specs as the disk it replaces
On x86 systems:
# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c3t2d0s0
On SPARC systems:
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk/dev/rdsk/c3t2d0s0
Networking Manual Administration
Switch to manual network configuration:
# netadm enable –p ncp defaultfixed
Show physical network interfaces:
# dladm show-phys
Create interface with static IPv4 configuration:
# ipadm create-ip net0 # ipadm create-addr –T static –a local=10.9.8.7/24 net0/addr # ipadm show-addr
Create interface with DHCP configuration:
# ipadm create-ip net0 # ipadm create-addr –T dhcp net0/addr
Create interface with auto-generated IPv6 configuration:
# ipadm create-ip net0 # ipadm create-addr –T addrconf net0/addr
Configure default route:
# route –p add default 192.168.1.1
Activate DNS configuration:
# svccfg –s dns/client setprop config/nameserver = net_address: 192.168.1.1 # svccfg –s dns/client setprop config/domain = astring: “myhost.org” # svccfg –s name-service/switch setprop config/host = astring: \“files dns\” # svcadm refresh name-service/switch # svcadm refresh dns/client
Activate DNS configuration (alternate approach by editing /etc/resolv.conf and /etc/nsswitch.conf and then importing these modifications into SMF)
# nscfg import –f svc:/system/name-service/switch:default # nscfg import –f svc:/network/dns/client:default # svcadm refresh dns/client