With the default settings in my Supermicro motherboard CentOS calls my SATA drive /dev/hda. If in bios setup I change 'Native Mode Operation' from auto to 'Serial ATA' it boots up calling the drive /dev/sda. I keep thinking its likely better under /dev/sda not? Any problem switching it to that after install?
Matt
On Wed, Aug 18, 2010 at 1:23 AM, Matt lm7812@gmail.com wrote:
With the default settings in my Supermicro motherboard CentOS calls my SATA drive /dev/hda. If in bios setup I change 'Native Mode Operation' from auto to 'Serial ATA' it boots up calling the drive /dev/sda. I keep thinking its likely better under /dev/sda not? Any problem switching it to that after install?
If you have setup lvm and use labels for mounting your filesystem, the change should be hassle free. Otherwise you have to check grub.conf for the root parameter and change blockdevices in /etc/fstab.
On Wed, 18 Aug 2010, Hannes Frederic Sowa wrote:
To: CentOS mailing list centos@centos.org From: Hannes Frederic Sowa hannes@mailcolloid.de Subject: Re: [CentOS] SDA and HDA
On Wed, Aug 18, 2010 at 1:23 AM, Matt lm7812@gmail.com wrote:
With the default settings in my Supermicro motherboard CentOS calls my SATA drive /dev/hda. If in bios setup I change 'Native Mode Operation' from auto to 'Serial ATA' it boots up calling the drive /dev/sda. I keep thinking its likely better under /dev/sda not? Any problem switching it to that after install?
If you have setup lvm and use labels for mounting your filesystem, the change should be hassle free. Otherwise you have to check grub.conf for the root parameter and change blockdevices in /etc/fstab.
I don't use LVM yet, but I found that using hard-coded /dev/sda?? or /dev/hda?? in /etc/fstab is not recommended.
If LVM supports them, partition labels are the way to go.
/dev/?da?? get screwed up if you create or destroy partitions. Whereas labels don't care about the actual device name in question.
From my etc/fstab file:
########################################################################## # device sda - PRIMARY MASTER - BOTTOM BAY 4 ##########################################################################
LABEL=Fedora-12-root / ext3 defaults 1 1
#/dev/sda5 LABEL=home /home ext3 defaults 1 2
# dev/sda6 LABEL=other-docs /mnt/other-docs ext3 rw,noauto,noexec,user 0 0
# dev/sda7 LABEL=tmp /tmp ext3 defaults 1 2
HTH
Keith Roberts
----------------------------------------------------------------- Websites: http://www.php-debuggers.net http://www.karsites.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------
On Wed, Aug 18, 2010 at 2:56 PM, Keith Roberts keith@karsites.net wrote:
On Wed, 18 Aug 2010, Hannes Frederic Sowa wrote:
From: Hannes Frederic Sowa hannes@mailcolloid.de On Wed, Aug 18, 2010 at 1:23 AM, Matt lm7812@gmail.com wrote:
With the default settings in my Supermicro motherboard CentOS calls my SATA drive /dev/hda. If in bios setup I change 'Native Mode Operation' from auto to 'Serial ATA' it boots up calling the drive /dev/sda. I keep thinking its likely better under /dev/sda not? Any problem switching it to that after install?
If you have setup lvm and use labels for mounting your filesystem, the change should be hassle free. Otherwise you have to check grub.conf for the root parameter and change blockdevices in /etc/fstab.
I don't use LVM yet, but I found that using hard-coded /dev/sda?? or /dev/hda?? in /etc/fstab is not recommended.
If LVM supports them, partition labels are the way to go.
A partition label is a filesystem property so you can give an LV's filesystem a label if you choose to, but this isn't necessary because LV names are persistent.
On 08/18/10 11:56 AM, Keith Roberts wrote:
If LVM supports them, partition labels are the way to go.
/dev/?da?? get screwed up if you create or destroy partitions. Whereas labels don't care about the actual device name in question.
and plug that disk with label 'root' into another system that has label 'root' and watch it not be to mount the root file system when it boots.
btdt.
On Wed, 18 Aug 2010, John R Pierce wrote:
To: CentOS mailing list centos@centos.org From: John R Pierce pierce@hogranch.com Subject: Re: [CentOS] SDA and HDA
On 08/18/10 11:56 AM, Keith Roberts wrote:
If LVM supports them, partition labels are the way to go.
/dev/?da?? get screwed up if you create or destroy partitions. Whereas labels don't care about the actual device name in question.
and plug that disk with label 'root' into another system that has label 'root' and watch it not be to mount the root file system when it boots.
btdt.
Thanks for pointing that anomaly out John. I'll keep that in mind for future installations.
The full root partition label name is:
LABEL=Fedora-12-root
and there is only one entry in /etc/fstab to mount the root partition by that label name.
Personally I can't see myself moving hard drives around from machine to machine, as I only have 1 main machine (tower case with 3.5" drives) and a few laptops using 2.5" drives.
And for my Centos root partition, it will have a root label something like:
LABEL=Centos-5-root / ext3 defaults 1 1
Again there will only be one entry in /etc/fstab for a particular active root partition.
Kind Regards,
Keith Roberts
----------------------------------------------------------------- Websites: http://www.php-debuggers.net http://www.karsites.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------
On 08/18/10 1:17 PM, Keith Roberts wrote:
Personally I can't see myself moving hard drives around from machine to machine, as I only have 1 main machine (tower case with 3.5" drives) and a few laptops using 2.5" drives.
the scenario where I've done that is when I'm fixing or recovering data off a crashed system.
On Wed, 18 Aug 2010, John R Pierce wrote:
To: CentOS mailing list centos@centos.org From: John R Pierce pierce@hogranch.com Subject: Re: [CentOS] SDA and HDA
On 08/18/10 1:17 PM, Keith Roberts wrote:
Personally I can't see myself moving hard drives around from machine to machine, as I only have 1 main machine (tower case with 3.5" drives) and a few laptops using 2.5" drives.
the scenario where I've done that is when I'm fixing or recovering data off a crashed system.
Hi John.
Maybe the best thing to do would be use the Gparted live CD partition editor, to boot directly off the CD, and then check there are no conflicts with your partition labels?
If so you could edit the partition labels using Gparted (or a similar tool) without having to mount any of the hard drives?
There are a lot of other partition tools mentioned on the Gparted page at:
http://gparted.sourceforge.net/livecd.php
Kind Regards,
Keith Roberts
----------------------------------------------------------------- Websites: http://www.php-debuggers.net http://www.karsites.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------
With the default settings in my Supermicro motherboard CentOS calls my SATA drive /dev/hda. If in bios setup I change 'Native Mode Operation' from auto to 'Serial ATA' it boots up calling the drive /dev/sda. I keep thinking its likely better under /dev/sda not? Any problem switching it to that after install?
So I guess another question here. Is it better to my SATA interface in Serial ATA mode or AUTO in BIOS? The motherboard calls it sda when in serial ata mode but hda when in auto mode. Will there be a performance difference?
Matt
On Thursday, August 19, 2010 10:54:32 am Matt wrote:
So I guess another question here. Is it better to my SATA interface in Serial ATA mode or AUTO in BIOS? The motherboard calls it sda when in serial ata mode but hda when in auto mode. Will there be a performance difference?
It depends on which kernel module gets used, and which version of CentOS we're talking about as to which will perform better. So research the libata module that drives it when in SATA mode (/dev/sda) versus the straight IDE layer (/dev/hda).
Later kernels and newer CentOS is going to go to /dev/sda either way; /dev/hda is gone from later dists.
Which Supermicro board is this?
So I guess another question here. Is it better to my SATA interface in Serial ATA mode or AUTO in BIOS? The motherboard calls it sda when in serial ata mode but hda when in auto mode. Will there be a performance difference?
It depends on which kernel module gets used, and which version of CentOS we're talking about as to which will perform better. So research the libata module that drives it when in SATA mode (/dev/sda) versus the straight IDE layer (/dev/hda).
Later kernels and newer CentOS is going to go to /dev/sda either way; /dev/hda is gone from later dists.
Which Supermicro board is this?
This is CentOS 5.x 64 bit updated to latest. Supermicro MBD-PDSBM-LN2+-O. North Bridge: Intel 946GZ South Bridge: Intel ICH7R.
I always use Supermicro cases and motherboards anymore. Not too pricey and pretty good quality. I like there compact 1u cases that are relatively inexpensive as well.
Matt
At Thu, 19 Aug 2010 09:54:32 -0500 CentOS mailing list centos@centos.org wrote:
With the default settings in my Supermicro motherboard CentOS calls my SATA drive /dev/hda. If in bios setup I change 'Native Mode Operation' from auto to 'Serial ATA' it boots up calling the drive /dev/sda. I keep thinking its likely better under /dev/sda not? Any problem switching it to that after install?
So I guess another question here. Is it better to my SATA interface in Serial ATA mode or AUTO in BIOS? The motherboard calls it sda when in serial ata mode but hda when in auto mode. Will there be a performance difference?
Yes. SATA is going to be faster. Note: your 'motherboard' is not calling it sda or hda. What your motherboard is doing is either *native* Serial ATA mode or *emulated* Parallel ATA (aka IDE) mode (also known as 'legacy' mode). The linux *kernel* then either sees IDE disk(s) (*emulated* Parallel ATA mode) or native Serial ATA disks, and loads a Serial ATA driver, which uses the SCSI disk abstraction layer (sd). The *native* Serial ATA mode is faster and more feature-rich, such as including things like hot-swapping, should you install a SATA hot-swap bay. This is not possible with IDE disks and the IDE disk driver does not really support it. Also, motherboards with more than 4 SATA ports will only make 4 available when in 'IDE' mode. If there are more than 4 SATA ports on your motherboard, you need to be in native SATA mode to use all of them. This includes any E-SATA ports as well.
The only problems with switching after install is:
1) you need to be sure the initrd has the (proper) SATA kernel module(s) in it. If necessary, you'll have to use mkinitrd to re-create the initrd file to include the proper driver modules.
2) /etc/fstab needs to be fixed, either to use LABEL= (rather than /dev/hdaN) and your file systems (including swap) need to have file sytem labels. (LVM volumes won't be a problem.)
Matt _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
The only problems with switching after install is:
- you need to be sure the initrd has the (proper) SATA kernel module(s)
in it. If necessary, you'll have to use mkinitrd to re-create the initrd file to include the proper driver modules.
- /etc/fstab needs to be fixed, either to use LABEL= (rather than
/dev/hdaN) and your file systems (including swap) need to have file sytem labels. (LVM volumes won't be a problem.)
I changed it in bios to sata mode. Now after boot up it calls it sda instead of hda and disk I/O is much faster.
I see in this file:
# cat /boot/grub/device.map # this device map was generated by anaconda (hd0) /dev/hda
Should I change this too sda? It works and boots the way it is but just wandering?
Here is fstab:
# cat /etc/fstab /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0
Matt
Matt wrote:
The only problems with switching after install is:
- you need to be sure the initrd has the (proper) SATA kernel module(s)
in it. If necessary, you'll have to use mkinitrd to re-create the initrd file to include the proper driver modules.
- /etc/fstab needs to be fixed, either to use LABEL= (rather than
/dev/hdaN) and your file systems (including swap) need to have file sytem labels. (LVM volumes won't be a problem.)
I changed it in bios to sata mode. Now after boot up it calls it sda instead of hda and disk I/O is much faster.
I see in this file:
# cat /boot/grub/device.map # this device map was generated by anaconda (hd0) /dev/hda
Should I change this too sda? It works and boots the way it is but just wandering?
No - I believe grub just refers to hd as hard drive and this does not relate to /dev/sda or /dev/hda
Here is fstab:
# cat /etc/fstab /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0
Matt _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
At Sun, 22 Aug 2010 17:12:14 -0400 CentOS mailing list centos@centos.org wrote:
Matt wrote:
The only problems with switching after install is:
- you need to be sure the initrd has the (proper) SATA kernel module(s)
in it. If necessary, you'll have to use mkinitrd to re-create the initrd file to include the proper driver modules.
- /etc/fstab needs to be fixed, either to use LABEL= (rather than
/dev/hdaN) and your file systems (including swap) need to have file sytem labels. (LVM volumes won't be a problem.)
I changed it in bios to sata mode. Now after boot up it calls it sda instead of hda and disk I/O is much faster.
I see in this file:
# cat /boot/grub/device.map # this device map was generated by anaconda (hd0) /dev/hda
Should I change this too sda? It works and boots the way it is but just wandering?
No - I believe grub just refers to hd as hard drive and this does not relate to /dev/sda or /dev/hda
PS: since the OP did not need to 'rewrite' the MBR for any reason, not changing this was not a problem and I expect won't be unless/until that needs to be done (eg if/when the disk is ever replaced).
Here is fstab:
# cat /etc/fstab /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0
And the CentOS installer did the 'smart' thing WRT the fstab, and I expect also in the grub.conf file (eg kernel ... root=/dev/VolGroup00/LogVol00), making the change from 'legacy' (IDE) mode to 'native' (SATA) mode painless, so long as the SATA kernel module was present in the initrd. Appearently, the installer included this module, even though the BIOS was faking the disk as an IDE disk.
At Sun, 22 Aug 2010 17:12:14 -0400 CentOS mailing list centos@centos.org wrote:
Matt wrote:
The only problems with switching after install is:
- you need to be sure the initrd has the (proper) SATA kernel module(s)
in it. If necessary, you'll have to use mkinitrd to re-create the initrd file to include the proper driver modules.
- /etc/fstab needs to be fixed, either to use LABEL= (rather than
/dev/hdaN) and your file systems (including swap) need to have file sytem labels. (LVM volumes won't be a problem.)
I changed it in bios to sata mode. Now after boot up it calls it sda instead of hda and disk I/O is much faster.
I see in this file:
# cat /boot/grub/device.map # this device map was generated by anaconda (hd0) /dev/hda
Should I change this too sda? It works and boots the way it is but just wandering?
No - I believe grub just refers to hd as hard drive and this does not relate to /dev/sda or /dev/hda
I am not so sure. Actually, what the above line does is map *Grub's* 'hd0' to the *Linux* *device file* /dev/hda -- the primary master IDE (PATA) disk, which is correct for a machine with 'standard' IDE disks. I expect this is wrong for machines with true SCSI, SATA w/SCSI abstraction (all native SATA drivers use SCSI abstraction) or PATA (IDE) w/SCSI abstraction (newer specialized IDE drivers with SCSI abstraction). I expect this is only used by grub installer (that writes the grub stage one loader into the MBR and then maps the BIOS device to the grub device. The *Grub loader* is only going to be using BIOS I/O calls. Grub's loader file(s) use 'hdN' to access file systems (partitions).
On the systems I have seen where there have never been 'native' IDE disks (eg either SATA with a SATA w/SCSI abstraction or PATA w/SCSI abstraction) the grub device.map has:
(hd0) /dev/sda
At Sun, 22 Aug 2010 16:09:00 -0500 CentOS mailing list centos@centos.org wrote:
The only problems with switching after install is:
- you need to be sure the initrd has the (proper) SATA kernel module(s)
in it. If necessary, you'll have to use mkinitrd to re-create the initrd file to include the proper driver modules.
- /etc/fstab needs to be fixed, either to use LABEL= (rather than
/dev/hdaN) and your file systems (including swap) need to have file sytem labels. (LVM volumes won't be a problem.)
I changed it in bios to sata mode. Now after boot up it calls it sda instead of hda and disk I/O is much faster.
Yes, this is expected.
I see in this file:
# cat /boot/grub/device.map # this device map was generated by anaconda (hd0) /dev/hda
Should I change this too sda? It works and boots the way it is but just wandering?
Yes, definately!
On Sun, Aug 22, 2010 at 3:35 PM, Robert Heller heller@deepsoft.com wrote:
At Sun, 22 Aug 2010 16:09:00 -0500 CentOS mailing list centos@centos.org wrote:
I see in this file:
# cat /boot/grub/device.map # this device map was generated by anaconda (hd0) /dev/hda
Should I change this too sda? It works and boots the way it is but just wandering?
Yes, definately!
No, don't. Grub doesn't care.
Mark