Migrace systému na SSD disky

pokus

Re:Migrace systému na SSD disky
« Odpověď #15 kdy: 20. 06. 2014, 12:30:13 »
vypíše to tuto chybu viz. obrázek http://postimg.org/image/4r3lso38d/
když dám ls /dev/sd* tak to žádný disk nezobrazí takže jak kdyby to disky nevidělo přičemž grub z disku najede a disky jsou videt v biosu.


Mirec

Re:Migrace systému na SSD disky
« Odpověď #16 kdy: 20. 06. 2014, 12:34:03 »
asi bych zkusil upravit grub, kam bych nedaval uuid disku, ale primo cestu k md.

pokus

Re:Migrace systému na SSD disky
« Odpověď #17 kdy: 20. 06. 2014, 12:48:50 »
To jsem taky zkoušel ale napíše to tu samou chybu akorát místo uuid bude /dev/md0.... když mi to zkončí tou chybou tak se tam dají psát jednoduché příkazy třeba ls /dev/md* nebo ls /dev/sd* v obou případech to disky nevidí

samalama

Re:Migrace systému na SSD disky
« Odpověď #18 kdy: 20. 06. 2014, 12:50:56 »
upravit mdadm.conf v initrd

pokus

Re:Migrace systému na SSD disky
« Odpověď #19 kdy: 20. 06. 2014, 12:54:27 »
posílám konfiguracu grubu nevešlo se mi to na jednu fotku tak je to na dvou http://postimg.org/image/5pkvfqqwl/ http://postimg.org/image/z31i9h2y7/


pokus

Re:Migrace systému na SSD disky
« Odpověď #20 kdy: 20. 06. 2014, 13:13:03 »
upravit mdadm.conf v initrd

Jak si toto prosím myslel? Nemám s tímto zkušenosti poraď prosím.

samalama

Re:Migrace systému na SSD disky
« Odpověď #21 kdy: 20. 06. 2014, 13:31:05 »
ak sa dobre pamatam a nemylim (raz som riesil rovnaky problem pri migracii raid1 na nove disky), treba aktualizovat mdam konfig v initrd, kedze sa ti zmenili uuid. skus sa cez live cd chrootnut do systemu na raide (treba mountnu /proc, /dev a /dev/pts) a spust update-initramfs -u -k all. ak nepomoze, tak potom rozbalit initrd a urobit upravu rucne:

mkdir /tmp/initrd
cp /mnt/root/boot/initrd.img-X.Y.Z.img /tmp/initrd.gz
cd /tmp/initrd
gunzip initrd.gz
cpio -id < initrd.img-X.Y.Z
rm initrd.img-X.Y.Z

--- upravit mdadm.conf ---
find . | cpio --create --format='newc' > /tmp/initrd.img-X.Y.Z
gzip /tmp/initrd.img-X.Y.Z
cp /tmp/initrd.img-X.Y.Z.gz /mnt/root/boot/initrd.img-X.Y.Z.img


samalama

Re:Migrace systému na SSD disky
« Odpověď #22 kdy: 20. 06. 2014, 13:38:13 »
novy mdadm.config vygenerujes takto nejako:

echo "DEVICE partitions" > mdadm.conf
echo "HOMEHOST <system>" >> mdadm.conf
for dev in $(find /dev/ -type b -name 'sd*'); do mdadm --examine --scan $dev; done | sort | uniq >> mdadm.conf


konfig najdes v tom rozbalenom ramdisku na klasickom mieste /etc/mdadm/mdadm.conf

pokus

Re:Migrace systému na SSD disky
« Odpověď #23 kdy: 20. 06. 2014, 14:17:26 »
Udělal sjem vše dle tvých rad, šlo to fajně akorát mě překvapilo že při přegenerování mdadm.conf zůstaly uuid disku nezměněné oproti původní vezri... samozřejmě původní mdadm jsem zálohoval a tvožil jsem nový mdadm dle návodu..... každopádně vypsalo to teď tut hlášku viz obrázek http://postimg.org/image/d2blyux5r/1b8228b8/

pokus

Re:Migrace systému na SSD disky
« Odpověď #24 kdy: 20. 06. 2014, 14:31:28 »
Opravil jsem grub a píšt to toto http://postimg.org/image/yuzg8fzrl/

samalama

Re:Migrace systému na SSD disky
« Odpověď #25 kdy: 20. 06. 2014, 15:35:11 »
urcite mas dobre nastaveny fstab?

pokus

Re:Migrace systému na SSD disky
« Odpověď #26 kdy: 20. 06. 2014, 15:47:14 »
za chvilku tady dám screen fstabu

samalama

Re:Migrace systému na SSD disky
« Odpověď #27 kdy: 20. 06. 2014, 15:54:02 »
v grube (ked nabootuje) skontroluj, ci ma root spravny uuid

pokus

Re:Migrace systému na SSD disky
« Odpověď #28 kdy: 20. 06. 2014, 16:02:51 »
Udělal jsem textový výstup z konfiguramu fstab, uuid, mdadm, a grub

prosím zkontroluj třeba je tam fakt chyba

fstab
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' 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/md0 during installation
UUID=610cce82:7ad1:4cb8:a733:8973d8e246fc /               ext3    errors=remount-ro 0       1
# /home was on /dev/md2 during installation
UUID=b91e63e:7571:480c:b21a:0add4ce14ccf /home           xfs     defaults,nobarrier        0       2
# swap was on /dev/md1 during installation
UUID=f67507f9:5d8e:4941:838a:b9e0963c069f none            swap    sw              0       0
/dev/sdc1       /media/cdrom0   udf,iso9660 user,noauto     0       0
10.10.10.1:/home/backups/ /mnt/backups/ nfs rsize=32768,wsize=32768,timeo=14,intr



ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Jun 20 15:55 00E0-53EE -> ../../sdd1
lrwxrwxrwx 1 root root 11 Jun 20 15:48 610cce82-7ad1-4cb8-a733-8973d8e246fc -> ../../md127
lrwxrwxrwx 1 root root 10 Jun 20 15:48 6225-CE68 -> ../../sda1
lrwxrwxrwx 1 root root 11 Jun 20 15:48 b91e635e-7571-480c-b21a-0add4ce14ccf -> ../../md126
lrwxrwxrwx 1 root root 11 Jun 20 15:48 f67507f9-5d8e-4941-838a-b9e0963c069f -> ../../md125


/etc/mdadm/mdadm.conf
# 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 root

# definitions of existing MD arrays
ARRAY /dev/md0 metadata=1.2 UUID=8475ff67:bf743625:a81e3560:6e00630d name=skiservis:0
ARRAY /dev/md1 metadata=1.2 UUID=ba2d154a:0003806d:c2d5600b:21661334 name=skiservis:1
ARRAY /dev/md2 metadata=1.2 UUID=35ffe47b:37ea7a32:1afe0ace:c01a875d name=skiservis:2



/boot/grub/grub.cfg
#
# 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
}

terminal_input console
terminal_output console
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 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
   insmod raid
   insmod mdraid
   insmod part_msdos
   insmod part_msdos
   insmod ext2
   set root='(md/0)'
   search --no-floppy --fs-uuid --set 610cce82-7ad1-4cb8-a733-8973d8e246fc
   echo   'Loading Linux 2.6.32-5-amd64 ...'
   linux   /boot/vmlinuz-2.6.32-5-amd64 root=UUID=610cce82-7ad1-4cb8-a733-8973d8e246fc 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 raid
   insmod mdraid
   insmod part_msdos
   insmod part_msdos
   insmod ext2
   set root='(md/0)'
   search --no-floppy --fs-uuid --set 610cce82-7ad1-4cb8-a733-8973d8e246fc
   echo   'Loading Linux 2.6.32-5-amd64 ...'
   linux   /boot/vmlinuz-2.6.32-5-amd64 root=UUID=610cce82-7ad1-4cb8-a733-8973d8e246fc 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 ###


pokus

Re:Migrace systému na SSD disky
« Odpověď #29 kdy: 20. 06. 2014, 16:07:58 »
Ještě jsem zapoměnl na výstup mdadm. Vše je z chrootnutého systému

/dev/md125:
        Version : 1.2
  Creation Time : Thu Jun  5 17:45:15 2014
     Raid Level : raid1
     Array Size : 6296024 (6.00 GiB 6.45 GB)
  Used Dev Size : 6296024 (6.00 GiB 6.45 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Wed Jun 18 16:55:13 2014
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : skiservis:1
           UUID : ba2d154a:0003806d:c2d5600b:21661334
         Events : 40

    Number   Major   Minor   RaidDevice State
       0       8       37        0      active sync   /dev/sdc5
       1       8       21        1      active sync   /dev/sdb5
/dev/md126:
        Version : 1.2
  Creation Time : Thu Jun  5 17:45:25 2014
     Raid Level : raid1
     Array Size : 217637212 (207.56 GiB 222.86 GB)
  Used Dev Size : 217637212 (207.56 GiB 222.86 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Fri Jun 20 15:32:07 2014
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : skiservis:2
           UUID : 35ffe47b:37ea7a32:1afe0ace:c01a875d
         Events : 99

    Number   Major   Minor   RaidDevice State
       0       8       38        0      active sync   /dev/sdc6
       1       8       22        1      active sync   /dev/sdb6
/dev/md127:
        Version : 1.2
  Creation Time : Thu Jun  5 17:43:31 2014
     Raid Level : raid1
     Array Size : 10491932 (10.01 GiB 10.74 GB)
  Used Dev Size : 10491932 (10.01 GiB 10.74 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Fri Jun 20 16:06:22 2014
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : skiservis:0
           UUID : 8475ff67:bf743625:a81e3560:6e00630d
         Events : 171

    Number   Major   Minor   RaidDevice State
       2       8       33        0      active sync   /dev/sdc1
       1       8       17        1      active sync   /dev/sdb1