Sie sind auf Seite 1von 4

rescan devices in linux (similar to devfsadm)

Sir here is the output


============ Before scanning ======================
bash-3.00# fdisk -l
Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot
Start
End
Blocks
Id
/dev/sda1
*
1
1566
12578863+ 83
Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot
Start
End
Blocks
Id
/dev/sdb1
1
522
4192933+ 82
Disk /dev/sdc: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot
Start
End
Blocks
Id
/dev/sdc1
1
13054
104856223+ 83
Disk /dev/sdd: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/sde: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

System
Linux

System
Linux swap

System
Linux

=======================================================
=========== After scanning ============================
bash-3.00# fdisk -l
Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot
Start
End
Blocks
Id
/dev/sda1
*
1
1566
12578863+ 83
Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot
Start
End
Blocks
Id
/dev/sdb1
1
522
4192933+ 82
Disk /dev/sdc: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot
Start
End
Blocks
Id
/dev/sdc1
1
13054
104856223+ 83
Disk /dev/sdd: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/sde: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders

System
Linux

System
Linux swap

System
Linux

Units = cylinders of 16065 * 512 = 8225280 bytes


Disk /dev/sde doesn't contain a valid partition table
Disk /dev/sdf: 107.3 GB, 107374182400 bytes
<===== new /dev/sdf 100 GB
Lun
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdf doesn't contain a valid partition table
Mohammed X Saleem [5:39 PM]:
so that means 100GB is available
Bharatt Hareindharan [5:40 PM]:
like format in solaris
fdisk in linux
if we are able to see in fdisk
then the disk can be used
like creating partitions etc etc....
:)
Mohammed X Saleem [5:40 PM]:
how did u scan
Bharatt Hareindharan [5:42 PM]:
This is the result for 208
Before scanning
bash-3.00# fdisk -l | grep '^D'
Disk /dev/sda: 12.8 GB, 12884901888 bytes
Disk /dev/sdb: 4294 MB, 4294967296 bytes
Disk /dev/sdc: 107.3 GB, 107374182400 bytes
Disk /dev/sdd: 107.3 GB, 107374182400 bytes
After scanning
Disk /dev/sda: 12.8 GB, 12884901888 bytes
Disk /dev/sdb: 4294 MB, 4294967296 bytes
Disk /dev/sdc: 107.3 GB, 107374182400 bytes
Disk /dev/sdd: 107.3 GB, 107374182400 bytes
Disk /dev/sde: 107.3 GB, 107374182400 bytes
Mohammed X Saleem [5:44 PM]:
how did u scan
Bharatt Hareindharan [5:47 PM]:

<===== newly added 100 GB

The command to scan newly added SAN lun in linux without reboot is as
below
bash-3.00# ls -l /sys/class/scsi_host/
total 0
drwxr-xr-x 2 root root 0 Oct 12 05:02 host0
bash-3.00#
There was only one host#
If there are many "host#" then we have to appropriately host# needed and
scan them using the below command.

bash-3.00# echo "- - -" > /sys/class/scsi_host/host0/scan


In this case there was only "host0"
There was not any "host1" or "host2" etc ....
Sir so issue resolved :)
Mohammed X Saleem [5:50 PM]:
we did like
cd /sys/class/scsi_host/host0
echo "- - -" > scan
but no luck
Bharatt Hareindharan [5:50 PM]:
yup
you saw the command right!
Mohammed X Saleem [5:50 PM]:
yes
Bharatt Hareindharan [5:50 PM]:
I did no magic :)
Mohammed X Saleem [5:51 PM]:
May be linux hosts will listen you
:D
Bharatt Hareindharan [5:51 PM]:
:D
and solaris to you :D
Mohammed X Saleem [5:51 PM]:
not always
so r u working from home
or is this some extra effort
Bharatt Hareindharan [5:52 PM]:
today is my week-off
and tomorrow
not like that
just came online
in the morning
and am there till now
:)
Mohammed X Saleem [5:53 PM]:
u can take comoff tomor and fri
Bharatt Hareindharan [5:53 PM]:
it is fine sir
as far as am happy and not getting bored "all is well" :)
and able to help
to my level best
Mohammed X Saleem [5:54 PM]:
Good spirit
Bharatt Hareindharan [5:54 PM]:
now am happy
got an opportunity to scan Luns in Linux
to be frank this is my first time :D
Mohammed X Saleem [5:54 PM]:
:)
Bharatt Hareindharan [5:55 PM]:

you gave me the opportunity


Mohammed X Saleem [5:55 PM]:
goodness u tested finally
Bharatt Hareindharan [5:55 PM]:
thanks to you
:)
I do not hesitate working in Linux, as far as data is secured
this activity will not cause any harm to the data right
so just did it
:)
Mohammed X Saleem [5:56 PM]:
U did it MAN. r u closing the tkt or its honor to me
Bharatt Hareindharan [5:57 PM]:
Can even panic a system, bring it to "kernel panic"
no issue
will bring it back
the honor to you sir
for giving me the opportunity
:)
Mohammed X Saleem [5:58 PM]:
no panic sir, lets live for time more here
Bharatt Hareindharan [5:58 PM]:
it will take time to open the peregrine and am lazy to open it, and more
over am happy in sharing this tech info with you
Actually am saying
I can even make a Linux system panic
and bring it back
without hesitation
as long as data is fine
:)
so generally do not hesitate in working BIT CRAZY WAY in Linux
:)
Mohammed X Saleem [6:03 PM]:
thank u sir
also got to know our problem in firing that command echo "---"
we didnt give space in the hiphens
Bharatt Hareindharan [6:35 PM]:
ok
:)

Das könnte Ihnen auch gefallen