Few commands learned on SuSE Linux
List version of SuSE Linux:# cat /etc/SuSE-release
Restart network:
# /sbin/rcnetwork restart
Network config files under : /etc/sysconfig/network/ directory (ifcfg-<interface name> files)
Routes in /etc/sysconfig/network/routes file
Status of the Network: ifstatus <network interface name>
Bring down netowork – ifdown <network interface name>
Bring up network – ifup <network interface name>
YaST – configuration tool for SuSE – pretty much all the system configuration can be done from this tool
Generic LVM commands in Linux:
List the physical disks installed:# fdisk –l
Create Physical Volume (initialize physical disk for LVM)
# pvcreate /dev/sdc [or any free device name]
Create Volume group
# vgcreate myvg /dev/sdc
Create Logical Volume:
# lvcreate –L 3G –n mylv myvg
Display Commands
# pvdisplay
# vgdisplay
# lvdisplay
Create ext3 filesystem:
# mkfs.ext3 mylv
[
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
]Check file system:
# e2fsck –f /dev/myvg/mylv
Extend LV:
# lvextend –L2G /dev/myvg/mylv
Resize the file system that is using the LV:
# resize2fs /dev/myvg/mylv
Remove LV:
# lvremove /dev/myvg/mylv
Change LV properties:
# lvchange
To deactivate a LV:
# lvchange -an /dev/myvg/mylv
Display all the LVs in a Volume Group (more verbose information):
# vgdisplay -v myvg
Rescan for new disks:
echo "- - -" > /sys/class/scsi_host/host0/scan