FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 05-23-2008, 05:41 PM
Gerry Reno
 
Default sata and changing devices

We have a new machine which has SATA. This is the first machine we have
had with SATA. SATA and these changing device locations are giving me a
headache. None of our disk device tools work with SATA. For instance
we have a tool that will save all the MBR's and partition tables off to
files such as 'hda.mbr' and 'hda.part'. With SATA this does not work
because what was 'sda' during this boot may be 'sdc' on the next boot.
So I need to find out if there is some best practice guide for how to
rewrite our tools so that they can support SATA. We use LVM over RAID
on all our drives and all our RAID and LVM tools appear to still work.
It is only when dealing with the low-level disk devices themselves that
we have problems. Can someone give me some suggestions as to how to
manage things when using SATA?


Regards,
Gerry

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-23-2008, 06:30 PM
Jesse Keating
 
Default sata and changing devices

On Fri, 2008-05-23 at 13:41 -0400, Gerry Reno wrote:
> We have a new machine which has SATA. This is the first machine we have
> had with SATA. SATA and these changing device locations are giving me a
> headache. None of our disk device tools work with SATA. For instance
> we have a tool that will save all the MBR's and partition tables off to
> files such as 'hda.mbr' and 'hda.part'. With SATA this does not work
> because what was 'sda' during this boot may be 'sdc' on the next boot.
> So I need to find out if there is some best practice guide for how to
> rewrite our tools so that they can support SATA. We use LVM over RAID
> on all our drives and all our RAID and LVM tools appear to still work.
> It is only when dealing with the low-level disk devices themselves that
> we have problems. Can someone give me some suggestions as to how to
> manage things when using SATA?
>
> Regards,
> Gerry
>

Use disk UUIDs instead of device names.

--
Jesse Keating
Fedora -- Freedom˛ is a feature!
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-23-2008, 06:34 PM
"Daniel P. Berrange"
 
Default sata and changing devices

On Fri, May 23, 2008 at 01:41:32PM -0400, Gerry Reno wrote:
> We have a new machine which has SATA. This is the first machine we have
> had with SATA. SATA and these changing device locations are giving me a
> headache. None of our disk device tools work with SATA. For instance
> we have a tool that will save all the MBR's and partition tables off to
> files such as 'hda.mbr' and 'hda.part'. With SATA this does not work
> because what was 'sda' during this boot may be 'sdc' on the next boot.
> So I need to find out if there is some best practice guide for how to
> rewrite our tools so that they can support SATA. We use LVM over RAID
> on all our drives and all our RAID and LVM tools appear to still work.
> It is only when dealing with the low-level disk devices themselves that
> we have problems. Can someone give me some suggestions as to how to
> manage things when using SATA?

If you want stable device names, don't use /dev/sd* at all.

This is what /dev/disk/by-{id,label,path,uuid}/* are for

Dan.
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-23-2008, 08:00 PM
Alan Cox
 
Default sata and changing devices

On Fri, May 23, 2008 at 01:41:32PM -0400, Gerry Reno wrote:
> So I need to find out if there is some best practice guide for how to
> rewrite our tools so that they can support SATA. We use LVM over RAID
> on all our drives and all our RAID and LVM tools appear to still work.
> It is only when dealing with the low-level disk devices themselves that
> we have problems. Can someone give me some suggestions as to how to
> manage things when using SATA?

You want to look at the volume itself. SATA is hotplug so talking about
devices by their bus location is a bit meaningless.

You've got two useful identifiers

1. The serial number of the drive available directly either by using
SG_IO to issue an IDENTIFY or the boot one (which is fine) via ioctls too.
Or you can script parsing hdparm of course.

2. Labels on the file systems which is what RAID/LVM/etc all use.

For low level work where you want to know "this physical disk is the one
I saw last week" the disk vendor|model|serial combination should be unique
for any modern real world drive.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-23-2008, 08:24 PM
Gerry Reno
 
Default sata and changing devices

Alan Cox wrote:

On Fri, May 23, 2008 at 01:41:32PM -0400, Gerry Reno wrote:


So I need to find out if there is some best practice guide for how to
rewrite our tools so that they can support SATA. We use LVM over RAID
on all our drives and all our RAID and LVM tools appear to still work.
It is only when dealing with the low-level disk devices themselves that
we have problems. Can someone give me some suggestions as to how to
manage things when using SATA?



You want to look at the volume itself. SATA is hotplug so talking about
devices by their bus location is a bit meaningless.

You've got two useful identifiers

1. The serial number of the drive available directly either by using
SG_IO to issue an IDENTIFY or the boot one (which is fine) via ioctls too.
Or you can script parsing hdparm of course.

2. Labels on the file systems which is what RAID/LVM/etc all use.

For low level work where you want to know "this physical disk is the one
I saw last week" the disk vendor|model|serial combination should be unique
for any modern real world drive.



The serial number might be ok until you replace the disk.* Just have to
remember to rerun the tools for the replacement and to note the
replacement lineage.* In scripts I think I could parse smartctl output
for serial numbers or is there something better under /proc I can parse?







--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-23-2008, 08:34 PM
Alan Cox
 
Default sata and changing devices

On Fri, May 23, 2008 at 04:24:01PM -0400, Gerry Reno wrote:
> The serial number might be ok until you replace the disk. Just have to
> remember to rerun the tools for the replacement and to note the
> replacement lineage. In scripts I think I could parse smartctl output
> for serial numbers or is there something better under /proc I can parse?

hdparm is probably better to parse than hdparm. Especially

hdparm --Istdout

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-23-2008, 08:45 PM
Gerry Reno
 
Default sata and changing devices

Alan Cox wrote:

On Fri, May 23, 2008 at 04:24:01PM -0400, Gerry Reno wrote:


The serial number might be ok until you replace the disk. Just have to
remember to rerun the tools for the replacement and to note the
replacement lineage. In scripts I think I could parse smartctl output
for serial numbers or is there something better under /proc I can parse?



hdparm is probably better to parse than hdparm. Especially

hdparm --Istdout



Ok, I was trying to steer clear of hdparm if I could because I got
bit a couple times with that command.* But in this instance in a script
it should be ok.








--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-23-2008, 10:30 PM
Gerry Reno
 
Default sata and changing devices

Just following up on this theme with respect to GRUB. When Anaconda
installed GRUB it put entries into /boot/grub/device.map. But in grub>
when I do a 'find /boot/grub/stage1' the list of devices containing the
boot files is altogether different from what is in device.map. So my
question is this: On systems with SATA, is device.map no longer used?
Since it seems under GRUB that the devices where GRUB finds the boot
files keep changing between boots is device.map even usable?



--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-23-2008, 11:25 PM
Denis Leroy
 
Default sata and changing devices

Gerry Reno wrote:
The serial number might be ok until you replace the disk. Just have to
remember to rerun the tools for the replacement and to note the
replacement lineage. In scripts I think I could parse smartctl output
for serial numbers or is there something better under /proc I can parse?


sg_inq /dev/sda

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-24-2008, 12:39 AM
Gerry Reno
 
Default sata and changing devices

Denis Leroy wrote:

Gerry Reno wrote:
The serial number might be ok until you replace the disk. Just have
to remember to rerun the tools for the replacement and to note the
replacement lineage. In scripts I think I could parse smartctl
output for serial numbers or is there something better under /proc I
can parse?


sg_inq /dev/sda


Thanks. Here is the output I get from sg_inq:

# sg_inq /dev/sda
standard INQUIRY:
PQual=0 Device_type=0 RMB=0 version=0x05 [SPC-3]
[AERC=0] [TrmTsk=0] NormACA=0 HiSUP=0 Resp_data_format=2
SCCS=0 ACC=0 TPGS=0 3PC=0 Protect=0 BQue=0
EncServ=0 MultiP=0 [MChngr=0] [ACKREQQ=0] Addr16=0
[RelAdr=0] WBus16=0 Sync=0 Linked=0 [TranDis=0] CmdQue=0
[SPI: Clocking=0x0 QAS=0 IUS=0]
length=96 (0x60) Peripheral device type: disk
Vendor identification: ATA
Product identification: Hitachi HDP72502

Product revision level: GM2O
Unit serial number: GEK231RB045L2A

How new is this? Not sure the Vendor ID looks exactly right though.



--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 08:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org