** Mac OS Bigsur XSAN 7 cmd line 設定方式
1. 設定HostName
sh-3.2# sudo scutil --set HostName MDC.private
2. Edit /etc/hosts 增加 HostName IP to hosts
sh-3.2# cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
10.10.8.157 mdc.private
3. Create SAN server and account
user : accusys
password : accusys
SAN_Name: Xsan
mail : xsan@gmail.com
certificate auth name. In this example the certificate auth name is Accusyscert
" sudo xsanctl createSan SAN_Name --account user --pass password --user user --cert-auth-name certificate_auth_name --cert-admin-email mail "
sh-3.2# sudo xsanctl createSan xsan --account accusys --pass accusys --user accusys --cert-auth-name videocert --cert-admin-email xsan@gmail.com
PS. "xsanctl listSan"
xsan (mdc3.private)
xsan (mdc.private)
4. Create an Xsan volume
a. export volum setting
sh-3.2# sudo cvlabel -c >label_list
b. Edit the label_list file, changing CvfsDisk_UNKNOWN to the desired label name MetadataLUN and DataLUN:
sh-3.2# sudo vi label_list
From
CvfsDisk_UNKNOWN /dev/rdisk5 # host 1 lun 0 sectors 4194285535 sector_size 512 inquiry [ACCUSYS A12S3-PS 364] serial 50363230313800003632323000000000
CvfsDisk_UNKNOWN /dev/rdisk6 # host 1 lun 0 sectors 20971501535 sector_size 512 inquiry [ACCUSYS A12S3-PS 364] serial 50363230313800013632323000000000
Change to
MetadataLUN /dev/rdisk5 # host 1 lun 0 sectors 4194285535 sector_size 512 inquiry [ACCUSYS A12S3-PS 364] serial 50363230313800003632323000000000
DataLUN /dev/rdisk6 # host 1 lun 0 sectors 20971501535 sector_size 512 inquiry [ACCUSYS A12S3-PS 364] serial 50363230313800013632323000000000
c. Update label_list
sh-3.2# sudo cvlabel label_list
*WARNING* This program will over-write volume labels on the
devices specified in the file "label_list".
After execution, the devices will only be usable by the
Xsan. You will have to re-partition the
devices to use them on a different file system.
Do you want to proceed? (Y / N) -> y
/dev/rdisk5 [ACCUSYS A12S3-PS 364] unknown Controller 'default', Serial '50363230313800003632323000000000', Sector Size 512, Sectors Max 4194285535 (2.1TB)
Do you want to label it acfs-EFI - Name: MetadataLUN Sectors: 4194285535 (Y / N) -> y
New Volume Label -Device: /dev/rdisk5 acfs Label: MetadataLUN Sectors: 4194285535.
/dev/rdisk6 [ACCUSYS A12S3-PS 364] unknown Controller 'default', Serial '50363230313800013632323000000000', Sector Size 512, Sectors Max 20971501535 (10.7TB)
Do you want to label it acfs-EFI - Name: DataLUN Sectors: 20971501535 (Y / N) -> y
New Volume Label -Device: /dev/rdisk6 acfs Label: DataLUN Sectors: 20971501535.
Done. 2 source lines. 2 labels.
Requesting disk rescan .
5. Mapping volume to Lun
-In this example, the name of the volume is Xsan.
-In this example, the name of the metadata LUN is MetadataLUN.
-In this example, the name of the data LUN is DataLUN.
Press Return after each step and if necessary, enter the administrator password.
sh-3.2# sudo xsanctl addVolume xsan --defaultFirstPool --addLUN MetadataLUN --storagePool data --addLUN DataLUN
Verify the volume was created: sudo xsanctl list.
To mount/unmount Xsan volume: sudo xsanctl mount/unmount XsanVolume
To remove Xsan volume: sudo xsanctl dropVolume XsanVolume
To stop/start Xsan volume: sudo xsanctl stopVolume/startVolume XsanVolume
6. For other client to quick setting
Export the Xsan configuration file for other client
sh-3.2# sudo xsanctl exportClientProfile
After you press Return, the Xsan configuration profile is saved in the current working directory. In this example, the file is named Xsan.mobilconfig.
# Remove SAN volume 流程!
a. Verify the volume was created:
sh-3.2# sudo xsanctl list
b. To mount/unmount Xsan volume:
sh-3.2# sudo xsanctl mount/unmount XsanVolume
c. To remove Xsan volume:
sh-3.2# sudo xsanctl dropVolume XsanVolume
d. stop/start Xsan volume:
sh-3.2# sudo xsanctl stopVolume/startVolume XsanVolume
# Remove SAN 流程!
After you press Return, the xsanctl command creates the Open Directory and SAN.
a. To destroy SAN:
sh-3.2# xsanctl destroySan Xsan
b. To destroy Open Directory:
sh-3.2# xsanctl destroyMaster --account accusys --pass accusys
沒有留言:
張貼留言