rmlv 명령어 (AIX 5.3·6.1)

핵심 정리

  • 논리 볼륨과 그 안의 데이터를 모두 지웁니다: rmlv datalv(확인을 물음), rmlv -f datalv(묻지 않음).
  • 논리 볼륨이 닫혀 있어야 합니다. 파일 시스템이면 먼저 umount합니다.
  • 파일 시스템이 있는 LV는 rmlv 대신 rmfs를 씁니다. rmlv는 /etc/filesystems 항목을 지우지 않기 때문입니다.
  • -p hdiskN은 그 디스크에 있는 파티션만 지웁니다. LV가 여러 디스크에 걸쳐 있으면 LV 전체가 망가질 수 있으니 미러 사본을 지울 때는 rmlvcopy를 씁니다.
  • 스냅숏 볼륨 그룹과 (6.1) 활성 펌웨어 지원 덤프 LV에는 쓸 수 없습니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 펌웨어 지원 덤프 LV 제한과 RBAC 안내가 더해짐)
원문 IBM Commands Reference — 5.3 Volume 4, 6.1 Volume 4
파일 /usr/sbin/rmlv
관련 명령어 rmfs, mklv, rmlvcopy, umount, lsvg

목적

볼륨 그룹에서 논리 볼륨을 지웁니다.

영어 원문

Removes logical volumes from a volume group.

구문

text
rmlv [ -B ] [ -f ] [ -p PhysicalVolume ] LogicalVolume ...

설명

주의: 이 명령은 지정한 논리 볼륨의 데이터를 모두 없앱니다.

rmlv 명령은 논리 볼륨을 지웁니다. LogicalVolume 매개변수는 논리 볼륨 이름이나 ID입니다. 논리 볼륨은 먼저 닫혀 있어야 합니다. 볼륨 그룹이 동시 모드로 varyon되어 있으면 그 볼륨 그룹을 켠 모든 동시 노드에서 닫혀 있어야 합니다. 예를 들어 파일 시스템이 있으면 마운트를 풀어야 합니다. 그러나 논리 볼륨을 지워도 그 위의 파일 시스템이 없어졌다고 운영 체제에 알리지 않습니다. /etc/filesystems는 rmfs 명령이 고칩니다.

참고:

  1. root 권한이 있거나 system 그룹 구성원이어야 합니다.
  2. 스냅숏 볼륨 그룹이나 스냅숏 볼륨 그룹을 가진 볼륨 그룹에는 쓸 수 없습니다.
  3. (6.1) 활성 펌웨어 지원 덤프 논리 볼륨에는 쓸 수 없습니다.

Web-based System Manager(wsm)의 Volumes 응용 프로그램이나 SMIT 빠른 경로 smit rmlv로도 실행할 수 있습니다.

영어 원문

Attention: This command destroys all data in the specified logical volumes.

The rmlv command removes a logical volume. The LogicalVolume parameter can be a logical volume name or logical volume ID. The logical volume first must be closed. If the volume group is varied on in concurrent mode, the logical volume must be closed on all the concurrent nodes on which volume group is varied on. For example, if the logical volume contains a file system, it must be unmounted. However, removing the logical volume does not notify the operating system that the file system residing on it have been destroyed. The command rmfs updates the /etc/filesystems file.

Note:

  1. To use this command, you must either have root user authority or be a member of the system group.

  2. You cannot use the rmlv command on a snapshot volume group or a volume group that has a snapshot volume group.

  3. You cannot use the rmlv command on an active firmware assisted dump logical volume.

You can use the Volumes application in Web-based System Manager (wsm) to change volume characteristics.

You could also use the System Management Interface Tool (SMIT) smit rmlv fast path to run this command.

플래그

플래그 설명
-B 논리 볼륨을 -l 플래그로 만들었으면 부모 논리 볼륨에 chlvcopy -B -s를 실행합니다. 일반 논리 볼륨이면 무시합니다.
-f 확인을 묻지 않고 지웁니다.
-p PhysicalVolume 그 물리 볼륨에 있는 논리 파티션만 지웁니다. 다른 물리 파티션이 남아 있으면 논리 볼륨은 지우지 않습니다. 주의: 논리 볼륨이 여러 물리 볼륨에 걸쳐 있으면 그 물리 볼륨의 파티션만 지워도 논리 볼륨 전체의 무결성이 깨질 수 있습니다.
영어 원문
  • -B — Issues a chlvcopy -B -s for the parent logical volume if the logical volume was created using the -l flag. If it is a regular logical volume then the -B flag is ignored.
  • -f — Removes the logical volumes without requesting confirmation.
  • -p PhysicalVolume — Removes only the logical partition on the PhysicalVolume. The logical volume is not removed unless there are no other physical partitions allocated. Attention: If the logical volume spans multiple physical volumes, the removal of only logical partitions on the PhysicalVolume can jeopardize the integrity of the entire logical volume.

보안

(6.1) RBAC와 Trusted AIX 사용자: 이 명령은 특권 작업을 할 수 있으며 특권 사용자만 할 수 있습니다. 권한과 특권은 lssecattr 명령이나 getcmdattr 하위 명령으로 봅니다.

영어 원문

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

예제

주의: 이 예의 명령은 논리 볼륨의 데이터를 모두 없앱니다.

lv05를 확인 없이 지웁니다. 논리 볼륨이 볼륨 그룹에서 지워집니다.

bash
rmlv -f lv05

자주 쓰는 형태:

bash
lsvg -l datavg               # LV 상태가 closed인지
rmlv -f oldlv
rmfs -r /old                 # 파일 시스템이 있으면 이쪽
영어 원문

Attention: The command used in this example destroys all data in the logical volumes.

To remove logical volume lv05 without requiring user confirmation, enter the following command:

rmlv -f lv05

The logical volume is removed from the volume group.

파일

파일 설명
/usr/sbin/rmlv rmlv 명령
/tmp 명령이 실행되는 동안 임시 파일을 두는 디렉터리
/etc/filesystems 알려진 파일 시스템과 그 특성
영어 원문
  • /usr/sbin/rmlv — Directory where the rmlv command resides.
  • /tmp — Directory where the temporary files are stored while the command is running.
  • /etc/filesystems — Lists the known file systems and defines their characteristics.

Related reference:

  • rmfs Command

Related information:

  • varyonvg command
  • unmount command
  • Logical volume storage
  • System management interface tool

리눅스(GNU)와 다른 점

리눅스 LVM2도 물리 볼륨(PV), 볼륨 그룹(VG), 논리 볼륨(LV) 구조가 같지만 명령 이름이 다릅니다. AIX lspv·lsvg·lslv는 pvs/pvdisplay, vgs/vgdisplay, lvs/lvdisplay에, mkvg·extendvg·reducevg는 vgcreate·vgextend·vgreduce에, mklv·extendlv·rmlv는 lvcreate·lvextend·lvremove에, varyonvg·varyoffvg는 vgchange -ay/-an에, importvg·exportvg는 vgimport·vgexport에, migratepv는 pvmove에 해당합니다. AIX의 물리 파티션(PP)은 리눅스의 물리 익스텐트(PE)이고, 미러는 lvcreate --type raid1이나 lvconvert -m1로 만듭니다. 리눅스는 디스크마다 PVID 대신 PV UUID를 쓰며, 파일 시스템은 따로 mkfs로 만듭니다. rmlv에 해당하는 것은 lvremove /dev/datavg/datalv이며, /etc/fstab 항목은 따로 지웁니다.