[Linuxtrent] Re: nuova partizione con RAID1

  • From: Marco Ciampa <ciampix@xxxxxxxxx>
  • To: linuxtrent@xxxxxxxxxxxxx
  • Date: Sun, 10 Oct 2010 17:04:06 +0200

On Sat, Oct 09, 2010 at 04:52:06PM +0200, Luca Zucchelli wrote:
> >
> > Strano, fa parte di parted, prova ad installarlo sulla live e riprova
> >
> > io come live uso il cd di installazione di ubuntu server-> ripara sistema
> danneggiato->in avvia in modo ripristino, seleziono non usare un file system
> di root ed accedo alla shell
> 
> cat /proc/partitions prima e dopo chroot che da?
> prima di chroot
> 
> 8    16     sdb
> 8    17     sdb1
> 8    18     sdd2
> 8    19     sdb3
> 8    0       sda
> 8    1       sda1
> 8    2       sda2
> 8    3       sda3
> 8    4       sda4
> 9    0       md0
> 9    1      md1
> 9    2      md2
> 
> dopo chroot
> è uguale
> 

ah ecco!

com'è che sda e sdb sono diversi?
md0 è a posto? fsck.ext4 che dice?
in md1 e md2 che c'è? Sono a posto? Sono previste?

in fstab che c'è?

Un esempio di sistema raid1 funzionante:

cat /proc/partitions 
major minor  #blocks  name

   8        0  976762584 sda
   8        1  975948718 sda1
   8        2     811282 sda2
   8       16  976762584 sdb
   8       17  975948718 sdb1
   8       18     811282 sdb2
   9        0  975948608 md0
   9        1     811200 md1

cat /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 level=raid1 num-devices=2 
UUID=4b9851e1:0eccdc7f:3e2299d0:94c1272e
ARRAY /dev/md1 level=raid1 num-devices=2 
UUID=53d2800b:1912e431:3e2299d0:94c1272e

cat /etc/fstab
# /etc/fstab: filesystem table.
#
# filesystemmountpointtypeoptionsdumppass
UUID=7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91/ext3defaults,errors=remount-ro01
#/dev/md0/ext3defaults,errors=remount-ro01
UUID=2eb21e02-2264-4890-b9ab-71b158982dccnoneswapdefaults00
#/dev/md1noneswapdefaults00
proc/procprocdefaults00
/dev/fd0/mnt/floppyvfatdefaults,user,noauto,showexec,umask=02200
usbdevfs/proc/bus/usbusbdevfsdefaults00
sysfs/syssysfsdefaults00
/dev/sr0/media/dvdromiso9660,udfdefaults,ro,user,noexec,noauto00
/dev/sr1/media/dvdrecorderiso9660,udfdefaults,ro,user,noexec,noauto00

cat /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
}

insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
set locale_dir=($root)/boot/grub/locale
set lang=it
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
insmod png
if background_image /boot/grub/moreblue-orbit-grub.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class 
gnu-linux --class gnu --class os {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
echo'Loading Linux 2.6.32-5-686 ...'
linux/boot/vmlinuz-2.6.32-5-686 root=UUID=7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91 
ro  quiet
echo'Loading initial ramdisk ...'
initrd/boot/initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686 (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='(md0)'
search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
echo'Loading Linux 2.6.32-5-686 ...'
linux/boot/vmlinuz-2.6.32-5-686 root=UUID=7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91 
ro single 
echo'Loading initial ramdisk ...'
initrd/boot/initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-3-686' --class debian --class 
gnu-linux --class gnu --class os {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
echo'Loading Linux 2.6.32-3-686 ...'
linux/boot/vmlinuz-2.6.32-3-686 root=UUID=7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91 
ro  quiet
echo'Loading initial ramdisk ...'
initrd/boot/initrd.img-2.6.32-3-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-3-686 (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='(md0)'
search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
echo'Loading Linux 2.6.32-3-686 ...'
linux/boot/vmlinuz-2.6.32-3-686 root=UUID=7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91 
ro single 
echo'Loading initial ramdisk ...'
initrd/boot/initrd.img-2.6.32-3-686
}
### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod raid
    insmod mdraid
    insmod part_msdos
    insmod part_msdos
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
    linux16     /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod raid
    insmod mdraid
    insmod part_msdos
    insmod part_msdos
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
    linux16     /boot/memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
    insmod raid
    insmod mdraid
    insmod part_msdos
    insmod part_msdos
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
    multiboot   /boot/memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental 
multiboot)" {
    insmod raid
    insmod mdraid
    insmod part_msdos
    insmod part_msdos
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 7e6c0e34-64c6-42c8-9b0a-1b2d6bcc2d91
    multiboot   /boot/memtest86+_multiboot.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### 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 ###

cat /etc/default/grub 
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Spero possa essere utile.

PS: dalla live chrootata prova a fare:

update-initramfs -u

...

-- 


Marco Ciampa

+--------------------+
| Linux User  #78271 |
| FSFE fellow   #364 |
+--------------------+
-- 
Per iscriversi  (o disiscriversi), basta spedire un  messaggio con OGGETTO
"subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx


Other related posts: