LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 02-11-2012, 05:22 PM   #1
misterpat
LQ Newbie
 
Registered: Dec 2011
Distribution: Debian
Posts: 10

Rep: Reputation: Disabled
Upgraded from squeeze to wheezy. Hard disk list is backwards.


Greetings!

I updated from Squeeze to Wheezy this morning and upon rebooting my Hard disks changed order.

My system has a 60gb ssd for the os, used to be sda. Then comes the 8 2tb drives in a raid 6. They used to be sdb through sdi.

Now the 6 raid disks are sda through sdh and the 60gb drive is sdi.

Is it possible to get it back to it used to be and will adding disks to the raid disrupt this ordering as the os drive will keep getting a new letter?

Output from fdisk -l

Code:
root@mega:~# fdisk -l

Disk /dev/sdi: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bdb1b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1   *        2048   117229567    58613760   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sde: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdf'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdf: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdg'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdg: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdh'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdh: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1  3907029167  1953514583+  ee  GPT

Disk /dev/md0: 12002.4 GB, 12002380480512 bytes
2 heads, 4 sectors/track, -1364698624 cylinders, total 23442149376 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 393216 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table
Thanks for any help with this.

EDIT.

Upon further google'ing, someone mentioned to check /boot/grub/device.map. Here is mine.

Code:
(hd0)	/dev/disk/by-id/ata-OCZ-SOLID3_OCZ-P01Y7SJ31E850619
(hd1)	/dev/disk/by-id/ata-Hitachi_HDS721010CLA332_JP2911HQ1R26YH
(hd2)	/dev/disk/by-id/ata-Hitachi_HDS721010CLA332_JPG930HD0W603G
(hd3)	/dev/disk/by-id/ata-Hitachi_HDS721010CLA332_JP2940HD16ZNWC
(hd4)	/dev/disk/by-id/ata-Hitachi_HDS721010CLA332_JP2911HQ0HEARA
(hd5)	/dev/disk/by-id/ata-WL2000GSA6472E_WOL240207487
(hd6)	/dev/disk/by-id/ata-Hitachi_HDS721010CLA332_JP2930HQ2BX3HP
(hd7)	/dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN1220F32589AD
(hd8)	/dev/disk/by-id/ata-Hitachi_HDS721010CLA332_JP2911HQ0UYZGA
I see the 60gb OS drive is listed first as hd0

Last edited by misterpat; 02-11-2012 at 06:03 PM.
 
Old 02-11-2012, 10:37 PM   #2
misterpat
LQ Newbie
 
Registered: Dec 2011
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: Disabled
Some more google'ing I found some people talking about drive letters are assigned on a first come, first serve basis. I booted back into the previous kernel, 2.6.32 and did a lsmod. Here are the last 20 or so lines.

Code:
async_memcpy            1198  2 raid456,async_raid6_recov
async_tx                1734  5 raid456,async_raid6_recov,async_pq,async_xor,async_memcpy
ses                     5144  0
enclosure               5503  1 ses
sg                     24069  0
sd_mod                 29937  18
sr_mod                 12602  0
crc_t10dif              1276  1 sd_mod
cdrom                  29415  1 sr_mod
usbhid                 33292  0
hid                    63257  1 usbhid
ata_generic             3239  0
mpt2sas                87869  8
thermal                11674  0
scsi_transport_sas     19865  1 mpt2sas
ata_piix               21124  1
thermal_sys            11942  2 processor,thermal
libata                133776  2 ata_generic,ata_piix
ehci_hcd               32097  0
e1000e                124756  0
usbcore               123122  3 usbhid,ehci_hcd
nls_base                6377  1 usbcore
scsi_mod              126725  7 ses,sg,sd_mod,sr_mod,mpt2sas,scsi_transport_sas,libata
I then booted back into the 3.2 kernel and did the same.

Code:
async_memcpy           12387  2 raid456,async_raid6_recov
async_tx               12604  5 raid456,async_raid6_recov,async_pq,async_xor,async_memcpy
ses                    13106  0
enclosure              13263  1 ses
sd_mod                 36136  18
sr_mod                 21899  0
cdrom                  35401  1 sr_mod
crc_t10dif             12348  1 sd_mod
usbhid                 36379  0
hid                    81288  1 usbhid
ata_generic            12479  0
ata_piix               25439  1
libata                140589  2 ata_generic,ata_piix
ehci_hcd               40215  0
mpt2sas               115425  8
scsi_transport_sas     29388  1 mpt2sas
raid_class             12832  1 mpt2sas
usbcore               128498  3 usbhid,ehci_hcd
e1000e                124918  0
usb_common             12354  1 usbcore
scsi_mod              162417  7 ses,sd_mod,sr_mod,libata,mpt2sas,scsi_transport_sas,raid_class
I noticed in 2.6 that libata was loaded before mpt2sas. In 3.2, mpt2sas is loaded first. Would this be the problem?
 
Old 02-12-2012, 09:03 AM   #3
wpeckham
Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix
Posts: 832

Rep: Reputation: 181Reputation: 181
Better than ordering

MD software raid has its own metadata for recognizing raid members and building groups, this should work without your intervention.

Grub and Lilo require a little help, you should be using either labels or UUID strings in the grub configuration and in fstab ot make sure the correct drive partitions mount as you need them. The device order is really irrelevant if you have everything else set up properly.

Device migration/shifting has been a problem since udev was new, and all of the problems have been functionally resolved. Alas, that does NOT mean resolved by letting the operator decide how to allocate the device names, rather by making the device names less relevant.

Last edited by wpeckham; 02-12-2012 at 10:20 AM.
 
1 members found this post helpful.
Old 02-12-2012, 10:46 AM   #4
misterpat
LQ Newbie
 
Registered: Dec 2011
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: Disabled
Ok, Only reason I was concerned with this was I was running CentOS prior to switching back to Debian. I had the same issue as I have here. Every time I would add a drive to expand my array, It would throw off the drive letters and break the raid. Then I would have to rebuild the raid prior to adding in the new drive. It was very time consuming to say the least.

If this wont be a problem here, I'll just leave it.

Here are my mdadm.conf,fstab and grub files. Do they look set up properly as to not cause an issue?

mdadm.conf

Code:
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR ***********@gmail.com

# definitions of existing MD arrays
ARRAY /dev/md/0 metadata=1.2 UUID=58ad9cae:e1e82031:fcfde786:ba99b399 name=Mega-Nas:0

# This file was auto-generated on Sun, 22 Jan 2012 13:12:36 -0500
# by mkconf 3.1.4-1+8efb9d1
fstab

Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda1 during installation
UUID=624d1796-f87e-4a09-a6b5-9fd36c8cc117 /               ext3    errors=remount-ro 0       1
/dev/scd1       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/scd0       /media/cdrom1   udf,iso9660 user,noauto     0       0
/dev/scd1       /media/floppy0  auto    rw,user,noauto  0       0
UUID=56ffd1ad-fd59-458e-9a69-c6a42aa126c0  /mnt/home  ext4  defaults  0  0
grub.cfg

Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 624d1796-f87e-4a09-a6b5-9fd36c8cc117
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos1)'
  search --no-floppy --fs-uuid --set=root 624d1796-f87e-4a09-a6b5-9fd36c8cc117
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 3.2.0-1-amd64' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 624d1796-f87e-4a09-a6b5-9fd36c8cc117
	echo	'Loading Linux 3.2.0-1-amd64 ...'
	linux	/boot/vmlinuz-3.2.0-1-amd64 root=UUID=624d1796-f87e-4a09-a6b5-9fd36c8cc117 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.2.0-1-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 624d1796-f87e-4a09-a6b5-9fd36c8cc117
	echo	'Loading Linux 3.2.0-1-amd64 ...'
	linux	/boot/vmlinuz-3.2.0-1-amd64 root=UUID=624d1796-f87e-4a09-a6b5-9fd36c8cc117 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.2.0-1-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 624d1796-f87e-4a09-a6b5-9fd36c8cc117
	echo	'Loading Linux 2.6.32-5-amd64 ...'
	linux	/boot/vmlinuz-2.6.32-5-amd64 root=UUID=624d1796-f87e-4a09-a6b5-9fd36c8cc117 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 624d1796-f87e-4a09-a6b5-9fd36c8cc117
	echo	'Loading Linux 2.6.32-5-amd64 ...'
	linux	/boot/vmlinuz-2.6.32-5-amd64 root=UUID=624d1796-f87e-4a09-a6b5-9fd36c8cc117 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Thanks!

Last edited by misterpat; 02-12-2012 at 07:26 PM.
 
Old 02-12-2012, 07:24 PM   #5
misterpat
LQ Newbie
 
Registered: Dec 2011
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: Disabled
I just wanted to add that I installed a new 2tb disk today. Everything worked fine and the raid didn't break. Added the new drive to the array and its reshaping fine. Thanks!

Lesson learned. As long as You use the UUID's in those 3 files, drive lettering, as previously mentioned, is irrelevant.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Downgrading From Wheezy to Squeeze Bradj47 Debian 9 07-17-2013 06:18 PM
[SOLVED] Upgraded to Wheezy; Now what with the repositories? feeblebrain Debian 7 08-09-2011 09:27 AM
[SOLVED] upgraded lenny to squeeze: where did usbkbd.ko go? linux_user_123 Debian 2 04-01-2011 03:23 PM
Debian squeeze will not show free and used disk space on EXT4 formatted hard drives sillas2001 Debian 5 03-06-2011 07:56 AM
Upgraded to Debian Squeeze, and now apt-get has gone insane Changes Linux - General 3 10-26-2009 11:52 AM


All times are GMT -5. The time now is 01:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration