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

Adding a mountable LVM in Xenserver 7


Paul Matthews

Question

12 answers to this question

Recommended Posts

  • 0

Apologies, Tobias for the delayed reply.  Yes, I meant additional local storage  ( local SR)

 

I tried Alan's link and it did indeed create an lvm but as far as I can tell not one that is mountable 

 

/dev/VG_XenStorage-42383796-9ceb-5e85-b9e2-f6b627b9c319/MGT

 

So on this LVM I would like to create a filesystem that can be mountable as /data.  The plan is to store exported vms under filesystem /data

 

Is it just a case of running mkfs.ext4 /dev/VG_XenStorage-42383796-9ceb-5e85-b9e2-f6b627b9c319/MGT  and then putting an entry in /etc/fstab in order to mount at boot?

 

 

Thanks

Paul

Link to comment
  • 0

Hi Tobias,

My setup is  :-

 

Machine 1: disk1 - xenserver os and datastore, 

                           disk2  - /data containing nightly exports

 

Machine 2: disk1 - /data containing rsyncs from machine1:/data  ( i.e. a backup stored on another host)

 

Ideally I would like to avoid nfs and have the speed and flexibility of restoring from the directly attached disk drive

 

Thanks

Paul

 

Link to comment
  • 0

OK. I'd not want to put your storage on your XenServer hosts at all, bbut rather on an external source tht can be shared to all your XenServer hosts. That's what we do, using in our case a stand-along Linux box with some internal storage.

 

You could do this with a pooled SR, but you cannot easily share a local SR with another XS host.

 

You miht be able to export your directory from your one host to another - have not tried that, but you'd have to make sure the NFS daemon is running and an export entry and granted permissions are in place.

Link to comment
  • 0

Hi Tobias, Alan,

 

I know it's not advisable to have storage on the same host but I do copy it to another server on a nightly basis. It's there for speed reasons as I have found network storage to be a lot slower

 

Here's the method I used

 

# vi /etc/lvm/lvm.conf

Edit /etc/lvm/lvm.conf to correct the parameter metadata_read_only

Change it from metadata_read_only=1

                to

 metadata_read_only=0

 

# pvcreate /dev/nvme1n1
# vgcreate datavg /dev/nvme1n1

# lvcreate -n datavol -L 600G datavg
# mkfs.ext4 /dev/datavg/datavol
# vi /etc/fstab

/dev/mapper/datavg-datavol    /data         ext4     defaults   0  2
# mkdir /data
# mount /data

 

Regards

Paul

Link to comment
  • 0

You should be able to write directly to /dev/VG_XenStorage-42383796-9ceb-5e85-b9e2-f6b627b9c319/ with a standard file; it of course will eat up space away from your standard VM storage but as long as that device can be written to on the local server, it should work. It is of course highly unconventional and not supported! It will also only be available on the one local host.

 

-=Tobias

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