3장. Setting Up DM Multipath


This chapter provides step-by-step example procedures for configuring DM Multipath. It includes the following procedures:
  • Basic DM Multipath setup
  • 로컬 디스크 무시
  • 설정 파일에 장치 추가
  • Starting multipath in the initramfs file system

3.1. Setting Up DM Multipath

Before setting up DM Multipath on your system, ensure that your system has been updated and includes the device-mapper-multipath package.
You set up multipath with the mpathconf utility, which creates the multipath configuration file /etc/multipath.conf.
  • If the /etc/multipath.conf file already exists, the mpathconf utility will edit it.
  • If the /etc/multipath.conf file does not exist, the mpathconf utility will use the /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf file as the starting file.
  • If the /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf file does not exist the mpathconf utility will create the /etc/multipath.conf file from scratch.
For more information on the mpathconf utility, see the mpathconf(8) man page.
If you do not need to edit the /etc/multipath.conf file, you can set up DM Multipath for a basic failover configuration by running the following command. This command enables the multipath configuration file and starts the multipathd daemon.
# mpathconf --enable --with_multipathd y
If you need to edit the /etc/multipath.conf file before starting the multipathd daemon. use the following procedure to set up DM Multipath for a basic failover configuration.
  1. Enter the mpathconf command with the --enable option specified:
    # mpathconf --enable
    For information on additional options to the mpathconf command you may require, see the mpathconf man page or enter the mpathconf command with the --help option specified.
    # mpathconf --help
    usage: /sbin/mpathconf <command>
    
    Commands:
    Enable: --enable 
    Disable: --disable
    Set user_friendly_names (Default y): --user_friendly_names <y|n>
    Set find_multipaths (Default y): --find_multipaths <y|n> 
    Load the dm-multipath modules on enable (Default y): --with_module  <y|n>
    start/stop/reload multipathd (Default n): --with_multipathd  <y|n>
    
  2. Edit the /etc/multipath.conf file if necessary. The default settings for DM Multipath are compiled in to the system and do not need to be explicitly set in the /etc/multipath.conf file.
    The default value of path_grouping_policy is set to failover, so in this example you do not need to edit the /etc/multipath.conf file. For information on changing the values in the configuration file to something other than the defaults, see 4장. The DM Multipath Configuration File.
    The initial defaults section of the configuration file configures your system so that the names of the multipath devices are of the form mpathn; without this setting, the names of the multipath devices would be aliased to the WWID of the device.
  3. Save the configuration file and exit the editor, if necessary.
  4. Execute the following command:
    # systemctl start multipathd.service
Since the value of user_friendly_names is set to yes in the configuration file, the multipath devices will be created as /dev/mapper/mpathn. For information on setting the name of the device to an alias of your choosing, see 4장. The DM Multipath Configuration File.
If you do not want to use user friendly names, you can enter the following command:
# mpathconf --enable --user_friendly_names n

참고

If you find that you need to edit the multipath configuration file after you have started the multipath daemon, you must execute the systemctl reload multipathd.service command for the changes to take effect.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.