Jump to content
Welcome to our new Citrix community!
  • 0

Logical Volume mount/activate error


Question

Hello everyone!

 

I have a XenServer 6.2 with 2 Hardisks, in the first (1 TB) are installed XenServer and is the deafult local storage, the second one is a SSDisk of 100 GB.

 

The problem arises when powered off the server to add a second NIC. The second NIC was recognized without any problems, but the Local Storage SR show as Unplugged. I tried from the XenCenter with Repair option but it show the error: "Logical Volume mount/activate error"

 

I tried from the CLI but showed the same error with a little more information:

 

 xe pbd-plug uuid=44351663-da03-9702-7ec6-34fe87509cf2
Error code: SR_BACKEND_FAILURE_52
Error parameters: , Logical Volume mount/activate error [opterr=FSCK failed on /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2/27a15733-5e66-c96a-68c7-2b6f1452d8d2. Errno is 4]
 
I tried even to destroy and recreate the PBD but didn't work and show the same error.
 
I also tried the command:
 
fsck.ext3 /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2
 
And this is the result:
 
e2fsck 1.39 (29-May-2006)
fsck.ext3: Is a directory while trying to open /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2
 
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

 

Anyone who had been confronted with this error or any suggestions to repair the SR?

 

Thanks in advance!

 

Regards!!

 

 

Link to comment

Recommended Posts

  • 0

Ok, I hope we see the device in /dev/disk/by-id/ folder

 

You should see device with 3 partitions (default layout from XS install, where dom 0 is located in partition 1). Partition 3 is typically used for Local Storage, but Local Storage can be spread over more than 1 (if configured this way during install). We should be using the same command for fsck as we see it in the failed attempt for fsck process ...

 

Jul 11 12:17:34 xenergixmobile SM: [7527] ['fsck', '-a', '/dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2/27a15733-5e66-c96a-68c7-2b6f1452d8d2']

 

So here is command:

fsck -a /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2/27a15733-5e66-c96a-68c7-2b6f1452d8d2

 

You could also run with -ay so you do not need to say yes after each fix.

  • Like 2
Link to comment
  • 1

Well, it says that the partition table for / (located on partition 1 of device sda) is good. :)

 

The EXT3 file system used by your local storage is located in a volume group. So, once you boot up XenServer, type "mount" and then you will see what needs to be unmounted for fsck and then remounted after fsck.

  • Like 1
Link to comment
  • 0

Hi Hector,

 

The First thing you will want to do is allow the fsck to repair the SR. If host has been up a long time, there may be a fsck in progress (may see it in top command). If this is true, allow the fsck to complete, and then repair the SR. Repair will not work while fsck is in progress!

 

 

You could try destroy and recreate the PBD (but not the SR!).

You will want to do:

 

xe pbd-list sr-uuid=<UUID of SR>  params=all

 

With the detail from the above, You can then do a pbd-create ... pbd-plug and should be Ok. I would check on status of fsck first.

Link to comment
  • 0

Hi Hector,

 

The First thing you will want to do is allow the fsck to repair the SR. If host has been up a long time, there may be a fsck in progress (may see it in top command). If this is true, allow the fsck to complete, and then repair the SR. Repair will not work while fsck is in progress!

 

 

You could try destroy and recreate the PBD (but not the SR!).

You will want to do:

 

xe pbd-list sr-uuid=<UUID of SR>  params=all

 

With the detail from the above, You can then do a pbd-create ... pbd-plug and should be Ok. I would check on status of fsck first.

 

Actually, I destroyed and created a new PBD, but I will check the status of FSCK. Thank you!! 

 

Is it an LVM volume? If so, try running "vgchange -ay" and then pvdisplay and see if the volume shows up at all. Can you see the raw device if you run "fdisk -l" ?

 

No, is an EXT3 volume, any suggestions on that? thank yuo for your help!!

Link to comment
  • 0

Hello and thanks for your help.

 

I left the server last night to wait, in case of the command fsck was running, I also check the top command but didn't see any reference to fsck, made a Repair through Xencenter but I get the same error.

 

This is what I obtain when run the command fdisk -l:

 

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


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
256 heads, 63 sectors/track, 121126 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1      121127   976762583+  ee  EFI GPT

 

That is my Hard Disk but I'm still unable to repair the SR, any other suggestion?

 

Thank you very much for your help!!

 

Regards!!

Link to comment
  • 0

There is no parted utility on XenServer installations. It just creates that as the device type, which can be ignored. A regular fsck shouldwork. If you do a "cat /etc/mtab" you'll see something like:

 

/dev/sda1 / ext3 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
none /dev/shm tmpfs rw 0 0
 

indicating it's just an ext3 partition. Could you post the output you get if you run "fsck.ext3 -v /dev/sda1" ?

The error above you got above was because you tried to run fsck on the volume and not on the device itself (/dev/sda).

 

-=Tobias

Link to comment
  • 0

Thank you Tobias.

 

The system warning me with this:

 

[root@xenergixmobile ~]# fsck.ext3 -v /dev/sda1
e2fsck 1.39 (29-May-2006)
/dev/sda1 is mounted.  

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)?

 

I tried to unmount the volume but I get the following:

 

[root@xenergixmobile ~]# umount /dev/sda1
umount: /: device is busy
umount: /: device is busy

 

Thanks!

Link to comment
  • 0

When you reboot your XenServer, run "tail -f /varlog/SMlog", you very well may see a fsck started. We need to see if it finished, or finished with error. To do a fsck, you would need to boot off of install media, switch to virtual console, then run fsck on unmounted file system (just like with Linux).

Link to comment
  • 0

When you reboot your XenServer, run "tail -f /varlog/SMlog", you very well may see a fsck started. We need to see if it finished, or finished with error. To do a fsck, you would need to boot off of install media, switch to virtual console, then run fsck on unmounted file system (just like with Linux).

 

Thanks again.

 

As you suggest I check the SMlog and I found this in many entries on the log:

 

ul 11 12:17:34 xenergixmobile SM: [7527] set_dirty 'OpaqueRef:a269fa6a-397f-c862-6a74-fb0a6fcb98d1' failed (flag already set?)

Jul 11 12:17:34 xenergixmobile SM: [7527] ['lvchange', '-ay', '/dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2/27a15733-5e66-c96a-68c7-2b6f1452d8d2']

Jul 11 12:17:34 xenergixmobile SM: [7527]   pread SUCCESS

Jul 11 12:17:34 xenergixmobile SM: [7527] ['fsck', '-a', '/dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2/27a15733-5e66-c96a-68c7-2b6f1452d8d2']

Jul 11 12:27:55 xenergixmobile SM: [7527] FAILED in util.pread: (rc 4) stdout: 'fsck 1.39 (29-May-2006)

Jul 11 12:27:55 xenergixmobile SM: [7527] /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2/27a15733-5e66-c96a-68c7-2b6f1452d8d2 contains a file system with errors, check forced.

Jul 11 12:27:55 xenergixmobile SM: [7527] Error reading block 93946079 (Attempt to read block from filesystem resulted in short read) while doing inode scan.  ', stderr: '

Jul 11 12:27:55 xenergixmobile SM: [7527]

Jul 11 12:27:55 xenergixmobile SM: [7527] /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2/27a15733-5e66-c96a-68c7-2b6f1452d8d2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

Jul 11 12:27:55 xenergixmobile SM: [7527]     (i.e., without -a or -p options)

Jul 11 12:27:55 xenergixmobile SM: [7527] '

Jul 11 12:27:55 xenergixmobile SM: [7527] Raising exception [52, Logical Volume mount/activate error [opterr=FSCK failed on /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2/27a15733-5e66-c96a-68c7-2b6f1452d8d2. Errno is 4]]

Jul 11 12:27:55 xenergixmobile SM: [7527] lock: released /var/lock/sm/27a15733-5e66-c96a-68c7-2b6f1452d8d2/sr

Jul 11 12:27:55 xenergixmobile SM: [7527] ***** generic exception: sr_attach: EXCEPTION SR.SROSError, Logical Volume mount/activate error [opterr=FSCK failed on /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2/27a15733-5e66-c96a-68c7-2b6f1452d8d2. Errno is 4]

 

I will try run the FSCK from booting from the install media, thanks again.

 

Regards!!

Link to comment
  • 0

Ok, error message in SMlog shows the device I pasted, but if you look at your screen grab, when you run mount command, it shows it on /dev/mapper ....

 

That is why you get error "not mounted"

 

Instead of taking photo of monitor, it may be easier to use SSH to XenServer and then screen grab of SSH session. This would make it a bit easier to read. ;)

Link to comment
  • 0

Thank you James.

 

Sorry about the picture, in that moment it was the only way to take a screenshot.

 

I checked what you realize about the mount command, but I think it refers to another device, anyway I tried to run the umount command in /dev/mapper... but in that way the device isn't found.

 

I attached a screen grab of the ouptut from Putty.

 

Thank you again.

 

Regards!!

post-10390132-0-78949500-1405357266_thumb.png

Link to comment
  • 0

Hi Hector,

 

If you look closely at the output of the mount command, it shows /dev/mapper/XSLocalEXT-a46....

 

Your umount command show /dev/mapper/XSLocalEXT-27a...

 

You have different UUIDs in output of mount and umount commands. So, it looks like the file is not mounted with the UUID XSLocalEXT-a46.... This means, you can run the fsck command. :)

Link to comment
  • 0

Hello again.

 

Just to clarify, (because I think I have made a mess with this for myself)

 

I have 2 hard disks in my XenServer one of them is attached correctly and have no problems, but the other (the principal local storage) is the one with the problem. If I run the command "xe sr-list type=ext

" this is the output:

 

[root@xenergixmobile ~]# xe sr-list type=ext
uuid ( RO)                : a46f70f0-b7dc-1cf4-21c7-3487e3b7e90f
         
name-label ( RW): SR_SSD
    name-description ( RW):
                host ( RO): xenergixmobile
                type ( RO): ext
        content-type ( RO): user


uuid ( RO)                : 27a15733-5e66-c96a-68c7-2b6f1452d8d2
         
name-label ( RW): Local storage
    name-description ( RW):
                host ( RO): xenergixmobile
                type ( RO): ext
        content-type ( RO): user

 

The first (SR_SSD) is attached correctly to XenServer.

 

Just how you said, If I want to run the fsck command it must be on the XSLocalEXT-27a...device, that is actually not mounted.

 

When I run the fsck command "fsck.ext3 -b 8193 /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2" the output is as follows:

 

[root@xenergixmobile ~]# fsck.ext3 -b 8193 /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2
e2fsck 1.39 (29-May-2006)
fsck.ext3: Is a directory while trying to open /dev/XSLocalEXT-27a15733-5e66-c96a-68c7-2b6f1452d8d2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

 

I hope I have not confused more, I really appreciate all your help.

 

Regards!!

 

 

 

 

 

 

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...