Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

Thursday, January 28, 2016

file:///mnt/repodata/repomd.xml - Yum error - RHEL

Yum Error:

[root@hrspwr ~]#  yum repolist

file:///mnt/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/repodata/repomd.xml
Trying other mirror.
repo id                                              repo name                                            status
cd                                                   cd                                                   0
cdha                                                 cd                                                   0
yum                                                  yum                                                  0
yum-update                                           yum-update                                           0
repolist: 0

The repolist shows value 0


Anwer:

In this case we are trying to get the yum repository from the repository server and not from the internet or DVD.


The just to check /edit whether you have proper entry in /etc/auto.master & /etc/auto.yum

[root@hrspwr ~]# cd /etc/yum.repos.d

[root@hrspwr yum.repos.d]# ls -lrt
total 8
-rw-r--r--. 1 root root 529 Oct 30  2013 rhel-source.repo
-rw-r--r--  1 root root 130 Nov 14 09:29 dvd.repo


[root@hrspwr yum.repos.d]# cat dvd.repo
[cd]
name = cd
baseurl = file:///mnt/
enabled = 1
gpgcheck = 0


[cdha]
name = cd
baseurl = file:///mnt/
enabled = 1
gpgcheck = 0

[root@hrspwr yum.repos.d]# vi dvd.repo

The enabled value should be 0, so it will not read the repository coming from DVD.

[root@hrspwr yum.repos.d]#  yum repolist

yum                                                                                      | 4.0 kB     00:00 ...
yum/primary_db                                                                           | 3.1 MB     00:02 ...
yum-update                                                                               | 3.0 kB     00:00 ...
yum-update/primary_db                                                                    |  14 MB     00:07 ...
repo id                                              repo name                                            status
yum                                                  yum                                                   3,585
yum-update                                           yum-update                                           15,533
repolist: 19,118


Now the repolist is showing value 19,118


Regards,
Kiran Jadhav



Monday, January 4, 2016

Linux Commands to scan/rescan Virtual Disk - Linux

Linux Commands to scan/rescan Virtual Disks:

1. If a new disk is added to VM:

#cd /sys/class/scsi_host/

# ls –lrt  It will show host0, host1….

#echo "- - -" > /sys/class/scsi_host/host[0-1-2]/scan


2. To rescan existing disk. If a existing disk is extended by VMWare team. Then rescan the same disk so the extended size of pv will reflect.

Note down the path [2:0:4:0] or disk name [/dev/sde] which is extended by VMWare team.

#echo 1 > /sys/class/scsi_device/*/device/rescan

# echo 1 > /sys/class/scsi_device/2:0:4:0/device/rescan --> fdisk -l will show new size of that lun

or go to #cd /sys/class/scsi_device/2:0:4:0/device/
#echo 1 > rescan

then

#pvresize [particular PV]

#pvresize /dev/sde --> #pvs command will show extended size of that PV