LVM Commands

# Grow a file system:
SIZE=+220G
DEVICE=/dev/vg1/misc

lvextend -L${SIZE} ${DEVICE} && umount ${DEVICE} && e2fsck -f ${DEVICE} && resize2fs ${DEVICE} ; mount ${DEVICE}


# Shrink a filesystem:

umount ${DEVICE} && e2fsck -f ${DEVICE} && resize2fs ${DEVICE} ${SIZE} && lvresize -L${SIZE} ${DEVICE} ; mount ${DEVICE}


# Remount all volume groups
find /dev/vg?/* | xargs -l umount && find /dev/vg?/* | xargs -l mount
Dette indlæg blev udgivet i Knowledge Base, Linux, Old Base. Bogmærk permalinket.

Skriv et svar