Disk Is Not Getting Detected After Run The Scsi Command

Hi

RHEL 6.4 (64 Bit) is running as a Virutal Machine in a VCenter Server 5.5
As per our request, Vmware team added 500GB of disk space to this VM. Disk is not visible in "fdisk -l" after run the following command/script, but the new disk could be seen from the "multipath -l" command.

for i in `ls -ld /sys/class/scsi_host/host* | awk '{print $9}' `
do
echo "- - -" > $i/scan
done

Could someone clarify why it is not visible in "fdisk -l" output?


Similar Content



Problems After Cloning VM To Physical HD

I just cloned a Centos7 "everything install" VM to a physical disk using VMWare Workstation and Clonezilla using the instructions he https://www.howtoforge.com/convertin...cal-machine-p2

Now, when the clone (physical disk) boots up, it drops into the command line with this:

Quote:
dracut-initqueue[417]: Warning: Could not boot.
dracut-initqueue[417]: Warning: /dev/disk/by-uuid/4b8b5627-9027-46f7-b722-61d3ddd28e74 does not exist Starting dracut emergency shell...
What I've tried:
1. I checked /etc/fstab and the proper UUIDs are there, including the one above.
2. Tried booting via USB stick installer into rescue mode, chroot /mnt/sysimage , and:

Quote:
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-oh_crud.img
and then
Quote:
dracut /boot/initramfs-$(uname -r).img $(uname -r)
...but I get this:

Quote:
cat: write error: Broken pipe
When I enter "blkid", I see the HD in question showing up as both /dev/block... and /dev/sdb... I tried "lshw -class disk" but it says "command not found". Finally, the rescue shell says it is mounting my disk in /mnt/sysimage and all my files are where they should be, so it appears it is seeing and mounting the HD.

Any suggestions? I am a n00b, so going off a lot of google and not a lot of understanding here.

Help With Applying Passing Parameters

i need to complete this exercise but my code has some issues
HERE is the PRoblem:
Create a script that can accept ANY amount of numbers from the command line. Process the numbers one at a time, where numbers greater than 10 print “large”, numbers less than or equal to 10 print “small”
E.g. process 5 10 15 would print
small
small
large

and here is my code so far
if [ $@ -le "10" ]
then
echo "smaller"
else
echo "bigger"
shift
fi
if [ $@ -le "10" ]
then
echo "smaller"
else
echo "bigger"
shift
fi
if [ $@ -le "10" ]
then
echo "smaller"
else
echo "bigger"
shift
fi
if [ $@ -le "10" ]
then
echo "smaller"
else
echo "bigger"
shift
fi

any help would be greatly appreciated

Can No Longer Mount Data Dvds

For whatever reason, when I try to mount a data DVD I get the following message:

Unable to mount [disk name]
Error mounting: mount exited with exit code 1: helper failed with:
mount: mount point /media/cdrom does not exist

Yet, if I put a DVD video in I can play on any of my video apps, yet I also can't mount those in a file browser. I have no idea what has caused this. I haven't backed up data to disks in a long time, I only did so today because I'm running low on space in one of my drives.

I was told elsewhere that I needed to alter a file: /etc/udev/rules.d/70-persistent-cd.rules

But I have no idea how to do this, and what I found there does not look like what was shown. This is what my file looks like:

Code:
# This file maintains persistent names for CD/DVD reader and writer devices.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-cd-aliases-generator.rules
# file; however you are also free to add your own entries provided you
# add the ENV{GENERATED}=1 flag to your own rules as well.
# TSSTcorp_CDDVDW_SH-S223C (pci-0000:00:1f.2-scsi-1:0:1:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-1:0:1:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-1:0:1:0", SYMLINK+="cdrw", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-1:0:1:0", SYMLINK+="dvd", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-1:0:1:0", SYMLINK+="dvdrw", ENV{GENERATED}="1"

Any suggestions would be appreciated.

Better Way Of Writing This Command Of Leaving Multiple Blank Lines

Hi All..

I need to give four lines of gap(Freespace) between two command outputs.

what i did was below

Code:
echo "" >>$LOG_DIR/$LOG_NAME
echo "" >>$LOG_DIR/$LOG_NAME
echo "" >>$LOG_DIR/$LOG_NAME
echo "" >>$LOG_DIR/$LOG_NAME
print "***************** LEVEL 2: Truncating  Tables: Success:  tables Truncated ***********************" >> $LOG/$LOG_NAME
echo "" >>$LOG_DIR/$LOG_NAME
echo "" >>$LOG_DIR/$LOG_NAME
echo "" >>$LOG_DIR/$LOG_NAME
echo "" >>$LOG_DIR/$LOG_NAME
# Run the load scripts.
echo "***************** LEVEL 3: Loading Dupe Check Tables: Success: Dupe Check tables Loaded***********************" >> $LOG/$LOG_NAME


Is there any better way of writing this command to leave multiple lines between two commands.

Please advise...

Python FTP Send Command

hello Experts!
need some help here with python FTP. so what i'm trying to do is, from a linux machine, ill be sending over a python script to a windows machine via python ftp. that works fine with no problem. now, i want to execute that python script i sent remotely. im having trouble with that. here's my code to just execute the script:

p.s : please dont suggest other options such as python paramiko due to many network security reasons

Code:
ftp = ftplib.FTP("windows machine name")
ftp.login("username", "password")
ftp.cwd("where\\python\\script\\is kept\\")

ftp.sendcmd("python myscript.py")

but looks like it doesn't recognize that command. how do i accomplish this please?

How To Extend The / Partiotion In RedHat 5.4

im running out of space on the / partition
how do i extend this partition? this machine is inside a vmware environment.
i tried follow this article:

http://h30499.www3.hp.com/t5/System-...9#.VRPgAY6UdCc

but it seems that the command "fdisk" is not recognized

what should i do?

Perl Script Not Running Via Cron

Hi All,

I have perl script which I am trying to run on 1st Monday via cron job.
So I scheduled it as follows:

0 0 1-7 * * root ["$(date '+%a')" = "Mon"] && /usr/bin/perl script.pl

But then it didn't run so checked cron log and it seemed like its missing the command. so added a \ in front of %a and then it picked up the whole command as per cron log.

But still it didnt ran the script. I then change the script to just && echo "test">/tmp/test

Still nothing. if I run it as /usr/bin/perl script.pl it runs though

Thanks in advance.

Check Status

I am writing a script to check whether a "sysinfo" is installed in a system or not. sysinfo is a tool that gives information about the system. Its is installed in /usr/local/bin. so at CLI when I type sysinfo, it will display output.

#!/bin/bash
sysinfo=`/usr/local/bin/sysinfo`
echo "$sysinfo"
if [ "$?" = 0 ];then
echo "sysinfo installed"
else
echo "Please install sysinfo"
fi

Concept is, I run the command if it is present, it will show output and exit status of command is 0 else it is not installed. But it is not working as expected. Any thoughts , idea, suggestion.

Unable To Initiate Live DVD And Install To Hard Disk

Have Toshiba Tecra 64-bit 500gb disk 4gb ram running Windows 7 professional it has Intel core i5 processor.
I downloaded iso file of DVD LinuxMint Rebecca Cinnamon to DVD.
When I restart the system with the DVD inserted it immediately opens in Windows 7.
I could not follow the instructions to "disable secure boot and (u)efi".
Have partitioned the disk to allocate 100 gb to Linux in E:
First of all I really would like to run Live DVD and then later on to install it permanently it the E: partition.
Can I just simply copy the iso file into disk E:
Help from anyone is greatly appreciated.
Best regards to all of you.

Process Substitution With Awk, Output Splitting Incorrectly

I have the following code to extract two dates using awk, which are then read into two awk variables new and old respectively.
Each dates on the html file pulled with curl request is in this format:
2015-04-06 09:40:37
And two are being extracted
However the strings are being split on white space within the date strings. I tried changing OFS to ',', but it was still splitting incorrectly.
Code:
read dateStrNew dateStrOld < <(curl -k -q "$curl_call" | html2text | gawk '/Newest Sequence/ { new=$3" "$4 }/Oldest Sequence/ \
 {old=$3" "$4}END {OFS=","; print new,old }')  //new = date, old = date

Both parts of the date are being assigned to each variable using $3 and $4, then the space needs to be added back in so that the string can be used afterwards with a date command.

I just can't work out what is wrong, any help would be very much appreciated! Thanks!