[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Google
  Web www.spinics.net

Re: iSCSI and LVM



Hi,

First thanks a lot for your help.
I read your mail carefully but I still haven't managed to make it work...
The thing is that I have the Pb even when I merely restart the iSCSI
driver...
I shouldn't have to restart LVM, isn't it ?

> I changed this so LVM is loaded twice and searches for PVs once before
the iSCSI devices
> become available and once after that, so that all 'local' VGs are
available instantly and
> all iSCSI VGs as soon as the iSCSI connection is made.
When and how precisely do you restart LVM ?
/etc/init.d/boot.lvm before iscsi-mountall in file /etc/init.d/iscsi ?

Here is the procedure I followed:
Note: at this stage the iSCSI driver is up

$ ls -ls /dev/disk/by-id
total 8
4 drwxr-xr-x  2 root root 4096 Sep 28 11:50 .
4 drwxr-xr-x  4 root root 4096 Sep 20 10:29 ..
0 lrwxrwxrwx  1 root root    9 Sep 28 11:50
iscsi-iqn.1992-05.com.emc:ck2000348002100000-2-0 -> ../../sdc

$ pvcreate /dev/disk/by-id/iscsi-iqn.1992-05.com.emc:ck2000348002100000-2-0

$ pvdisplay
/dev/disk/by-id/iscsi-iqn.1992-05.com.emc:ck2000348002100000-2-0
  --- NEW Physical volume ---
  PV Name               /dev/sdc
  VG Name
  PV Size               4.88 GB
  Allocatable           NO
  PE Size (KByte)       0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               bxmVq1-El4c-qmka-7yml-Lb4d-O7gD-oY2hNd

$ vgcreate -s 16M vg_test
/dev/disk/by-id/iscsi-iqn.1992-05.com.emc\:ck2000348002100000-2-0

$ lvcreate -L4992M -n lv_test01 vg_test

$ vgdisplay -v
    Finding all volume groups
    Finding volume group "vg_test"
  --- Volume group ---
  VG Name               vg_test
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               4.88 GB
  PE Size               16.00 MB
  Total PE              312
  Alloc PE / Size       312 / 4.88 GB
  Free  PE / Size       0 / 0
  VG UUID               Kr1KL5-2nOp-QdPn-QjUB-zXLg-nEOD-5M4dpy

  --- Logical volume ---
  LV Name                /dev/vg_test/lv_test01
  VG Name                vg_test
  LV UUID                SzHitj-Euzo-4isB-LLYJ-sN7p-nND3-MHgC6D
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                4.88 GB
  Current LE             312
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Physical volumes ---
  PV Name               /dev/sdc
  PV UUID               6n62YC-SX5E-YgKl-DadU-gAcU-vXCB-uyWB3v
  PV Status             allocatable
  Total PE / Free PE    312 / 0

$ mkreiserfs /dev/vg_test/lv_test01

$ cat /etc/fstab.iscsi
| /dev/vg_cvs/lv_cvs01 /remote/testcvs_iscsi reiserfs defaults 0 0

$ iscsi-mountall

So far everything is fine.

# Stop iscsi driver
$ /etc/init.d/iscsi stop

# Start iscsi driver
| ...
| The problem has occurred looks like a hardware problem. If you have
| bad blocks, we advise you to get a new hard drive, because once you
| get one bad block  that the disk  drive internals  cannot hide from
| your sight,the chances of getting more are generally said to become
| much higher  (precise statistics are unknown to us), and  this disk
| drive is probably not expensive enough  for you to you to risk your
| time and  data on it.  If you don't want to follow that follow that
| advice then  if you have just a few bad blocks,  try writing to the
| bad blocks  and see if the drive remaps  the bad blocks (that means
| it takes a block  it has  in reserve  and allocates  it for use for
| of that block number).  If it cannot remap the block,  use badblock
| option (-B) with  reiserfs utils to handle this block correctly.
|
| Warning... fsck.reiserfs for device /dev/vg_cvs/lv_cvs01 exited with
signal 6.
| fsck.reiserfs /dev/vg_cvs/lv_cvs01 failed (status 0x8). Run manually!
| *** probe failed, 0 retries remaining

$ ls -ls /dev/disk/by-id
total 8
4 drwxr-xr-x  2 root root 4096 Sep 28 11:50 .
4 drwxr-xr-x  4 root root 4096 Sep 20 10:29 ..
0 lrwxrwxrwx  1 root root    9 Sep 28 11:50
iscsi-iqn.1992-05.com.emc:ck2000348002100000-2-0 -> ../../sdd

As you can see the device node is now /dev/sdd and not /dev/sdc as it used
to.
A fsck doesn't change anything... what to do ?
Have I missed sthg ?

Sabrina


                                                                           
                                                                           
                                                                           
                                                                        To 
                                      linux-iscsi-users@xxxxxxxxxxxxxxxxxx 
                                      net                                  
                                                                        cc 
                                                                           
                                                                           
    Jens Wahnes                                                            
    <wahnes@xxxxxxxxxxxx>                                          Subject 
                                      Re:  iSCSI and    
                                      LVM                                  
    Sent by:                                                               
    linux-iscsi-users-admin@l                                              
    ists.sourceforge.net                                                   
    27/09/2005 13:23                                                       
                                                                           
                                                                           




On Mon, Sep 26 2005, at 14:00:01 +0200, Sabrina Lautier wrote:

> Actually, LVM keeps using the regular device name (/dev/sda, /dev/sdb,
> etc.) instead of the udev by-id one.

IMHO, that shouldn't be a problem since LVM put UUIDs on the PVs (and
LVs as well) and thus can tell which VG a PV belongs to when scanning
for PVs at startup.  At least on my machine, LVM flawlessly figured out
which PV belongs to which VG the one time /dev/sda became /dev/sdb.

> Has anybody already managed to make LVM work with iSCSI drives ?

Yes, it works fine here with LVM2 using 'regular' device names.  The
only problem is that on my Debian system, LVM is loaded before the
network drivers are, so the iSCSI devices are not yet available at the
time LVM scans for PVs.  I changed this so LVM is loaded twice and
searches for PVs once before the iSCSI devices become available and
once after that, so that all 'local' VGs are available instantly and
all iSCSI VGs as soon as the iSCSI connection is made.


Jens


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
linux-iscsi-users mailing list
linux-iscsi-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/linux-iscsi-users




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
linux-iscsi-users mailing list
linux-iscsi-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/linux-iscsi-users

[IP Storage]     [IETF]     [Linux SCSI]     [iSCSI Book]     [Linux Resources]     [Yosemite News]     [Photo]     [Home]     [IETF Announcements]     [IETF Discussion]     [SCSI Hardware]