New Local Storage example in Linux XenServer

Source: Internet
Author: User
Tags local time uuid

[Root@xenserver-ds-monitor02 ~]# Smartctl--all/dev/sdb


SMARTCTL 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0+10] (local build)


Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org





= = = START of Information section = = =


Model family:seagate Barracuda 7200.14 (AF)


Device model:st3000dm001-1er166


Serial Number:w502pmvc


LU WWN Device id:5 000C50 09b03e160


Firmware version:cc26


User capacity:3,000,592,982,016 bytes [3.00 TB]


Sector sizes:512 bytes logical 4096 bytes


Rotation rate:7200 rpm


Device is:in smartctl Database [for details use:-P show]


ATA Version is:acs-2, ACS-3 t13/2161-d revision 3b


SATA Version Is:sata 3.1, 6.0 GB/s (current:6.0 GB/s)


local time Is:fri Aug 01:07:32 2016 CST





==> warning:a firmware update for this drive the May is available,


The following Seagate Web pages:


Http://knowledge.seagate.com/articles/en_US/FAQ/207931en


Http://knowledge.seagate.com/articles/en_US/FAQ/223651en





Smart Support Is:available-device has smart capability.


SMART Support is:enabled





= = START of READ SMART DATA section = =


SMART overall-health Self-Assessment Test result:passed





General SMART Values:


Offline Data Collection Status: (0x00) Offline data collection activity


was never started.


Auto Offline Data collection:disabled.


Self-Test Execution Status: (0) The previous self-test routine completed


Without error or no self-test has ever


been run.


Total time to complete Offline


Data collection: (seconds).


Offline data collection


Capabilities: (0x73) SMART execute Offline immediate.


Auto Offline data collection On/off support.


Suspend Offline Collection Upon new


Command.


No Offline surface Scan supported.


Self-Test supported.


Conveyance self-test supported.


Selective self-test supported.


Smart capabilities: (0x0003) saves smart data before entering


power-saving mode.


Supports SMART Auto Save timer.


Error logging capability: (0X01) error logging supported.


General purpose Logging supported.


Short Self-Test Routine


Recommended polling time: (1) minutes.


Extended self-test Routine


Recommended polling time: (minutes).


Conveyance self-test Routine


Recommended Polling Time: (2) minutes.


SCT capabilities: (0x1085) SCT Status supported.





SMART Attributes Data Structure revision number:10


Vendor specific SMART Attributes with thresholds:


id# attribute_name FLAG VALUE worst thresh TYPE UPDATED when_failed


1 raw_read_error_rate 0x000f 006 pre-fail Always-374688


3 spin_up_time 0x0003 094 094 pre-fail Always-0


4 Start_stop_count 0x0032 020 old_age Always-16


5 reallocated_sector_ct 0x0033 010 pre-fail Always-0


7 seek_error_rate 0x000f 253 030 Pre-fail Always-143


9 power_on_hours 0x0032 Old_age Always-1


Spin_retry_count 0x0013 097 Pre-fail Always-0


Power_cycle_count 0x0032 020 old_age Always-16


183 Runtime_bad_block 0x0032 Old_age Always-0


184 end-to-end_error 0x0032 099 old_age Always-0


187 Reported_uncorrect 0x0032 Old_age Always-0


188 command_timeout 0x0032 old_age Always-0 0 0


189 high_fly_writes 0x003a Old_age Always-0


190 Airflow_temperature_cel 0x0022 071 070 045 old_age Always-29 (Min/max 26/29)


191 g-sense_error_rate 0x0032 Old_age Always-0


0x0032 Power-off_retract_count Old_age Always-3


193 Load_cycle_count 0x0032 Old_age Always-34


194 Temperature_celsius 0x0022 029 040 old_age (0 24 0 0 0)


197 Current_pending_sector 0x0012 Old_age Always-0


198 offline_uncorrectable 0x0010 Old_age Offline-0


199 Udma_crc_error_count 0x003e Old_age Always-0


Head_flying_hours 0x0000 253 old_age offline-0h+24m+34.501s


241 Total_lbas_written 0x0000 253 old_age Offline-20728


242 total_lbas_read 0x0000 253 old_age Offline-25675





SMART Error Log Version:1


No Errors Logged





SMART self-test Log Structure revision number 1


No self-tests have been logged. [To run Self-tests, Use:smartctl-t]








SMART Selective self-test log Data structure revision number 1


SPAN Min_lba Max_lba Current_test_status


1 0 0 not_testing


2 0 0 not_testing


3 0 0 Not_testing


4 0 0 Not_testing


5 0 0 Not_testing


Selective self-test Flags (0x0):


After scanning selected spans, does not read-scan remainder of disk.


If selective self-test is pending in power-up, resume after 0 minute delay.





[Root@xenserver-ds-monitor02 ~]# Xe Host-list


[Root@xenserver-ds-monitor02 ~]# Xe Host-list


UUID (RO): e46c7c34-5d62-4b73-93d2-1dae3a47eb47


Name-label (RW): Xenserver-ds-monitor02


Name-description (RW): Default Install








[Root@xenserver-ds-monitor02 ~]# Xe Host-list|awk ' Nr==1{print $} '


RO)


[Root@xenserver-ds-monitor02 ~]# Xe host-list|awk-f ': ' Nr==1{print $} '


E46c7c34-5d62-4b73-93d2-1dae3a47eb47


[Root@xenserver-ds-monitor02 ~]# Xe host-list|awk-f ': ' Nr==1{print $} '


E46c7c34-5d62-4b73-93d2-1dae3a47eb47


[Root@xenserver-ds-monitor02 ~]# Xe sr-create content-type=user Device-config:device=/dev/sda3 host-uuid=$ (XE Host-list|awk-f ': ' Nr==1{print $} ') name-label= "local Storage" Shared=false TYPE=LVM


1bf6873f-243a-8e78-af92-df1d43a49566


[Root@xenserver-ds-monitor02 ~]# Xe Sr-list


UUID (RO): 5344a404-3c3f-eaed-6ad3-688c5af50c00


Name-label (RW): Removable Storage


Name-description (RW):


Host (RO): Xenserver-ds-monitor02


Type (RO): Udev


Content-type (RO): Disk








UUID (RO): 1bf6873f-243a-8e78-af92-df1d43a49566


Name-label (RW): Local storage


Name-description (RW):


Host (RO): Xenserver-ds-monitor02


Type (RO): LVM


Content-type (RO): User








UUID (RO): 1a8d857d-7789-22a2-0107-b50557eee7b7


Name-label (RW): DVD drives


Name-description (RW): Physical DVD Drives


Host (RO): Xenserver-ds-monitor02


Type (RO): Udev


Content-type (RO): ISO








UUID (RO): ed3cc2ee-c279-9faa-a025-0d25259a6c3e


Name-label (RW): XenServer Tools


Name-description (RW): XenServer Tools ISOs


Host (RO): Xenserver-ds-monitor02


Type (RO): ISO


Content-type (RO): ISO








[Root@xenserver-ds-monitor02 ~]# sgdisk-p/dev/sdb


Caution:invalid main GPT header, but valid backup; Regenerating main Header


From backup!





Invalid Partition data!


[Root@xenserver-ds-monitor02 ~]# Sgdisk-og/dev/sdb


Caution:invalid main GPT header, but valid backup; Regenerating main Header


From backup!





Invalid Partition data!


Information:creating Fresh partition table; would override earlier problems!


The operation has completed successfully.


[Root@xenserver-ds-monitor02 ~]#

From the above information can be seen that this is a new disk, now need to add this disk to the XenServer local storage, the following to start the operation
Set the/DEV/SDB disk to GPT partition first

[Root@xenserver-ds-monitor02 ~]# Sgdisk-og/dev/sdb


Caution:invalid main GPT header, but valid backup; Regenerating main Header


From backup!





Invalid Partition data!


Information:creating Fresh partition table; would override earlier problems!


The operation has completed successfully.


[Root@xenserver-ds-monitor02 ~]# sgdisk-p/dev/sdb


Found valid GPT with corrupt MBR; Using GPT and would write new


Protective MBR on save.


disk/dev/sdb:5860533168 sectors, 2.7 TiB


Logical Sector size:512 bytes


Disk identifier (GUID): a4c214e2-b75b-45d5-a8e9-b29e761c439d


Partition table holds up to 128 entries


Usable sector is 5860533134 usable sector


Partitions is aligned on 2048-sector boundaries


Total free spaces is 5860533101 sectors (2.7 TiB)





Number Start (sector) end (sector) Size Code Name


[Root@xenserver-ds-monitor02 ~]#

Create a new disk partition/DEV/SDB1

[Root@xenserver-ds-monitor02 ~]# sgdisk-n 1:0-C 1: "LVM"-t 1:8e00/dev/sdb


Found valid GPT with corrupt MBR; Using GPT and would write new


Protective MBR on save.


The operation has completed successfully.


[Root@xenserver-ds-monitor02 ~]# sgdisk-p/dev/sdb


disk/dev/sdb:5860533168 sectors, 2.7 TiB


Logical Sector size:512 bytes


Disk identifier (GUID): a4c214e2-b75b-45d5-a8e9-b29e761c439d


Partition table holds up to 128 entries


Usable sector is 5860533134 usable sector


Partitions is aligned on 2048-sector boundaries


Total free spaces is 2014 sectors (1007.0 KiB)





Number Start (sector) end (sector) Size Code Name


1 2048 5860533134 2.7 TiB 8E00 LVM


[Root@xenserver-ds-monitor02 ~]#

Once the partitions are ready, we can add the disk directly to the XenServer local storage.

[Root@xenserver-ds-monitor02 ~]# Xe Host-list


UUID (RO): e46c7c34-5d62-4b73-93d2-1dae3a47eb47


Name-label (RW): Xenserver-ds-monitor02


Name-description (RW): Default Install








[Root@xenserver-ds-monitor02 ~]# Xe sr-create content-type=user device-config:device=/dev/sdb1 host-uuid= e46c7c34-5d62-4b73-93d2-1d9ae3a47eb47 name-label= "Local storage 2" Shared=false TYPE=LVM


bebbe4f1-a492-c434-ea7f-1f7cc679070c


[Root@xenserver-ds-monitor02 ~]# Xe sr-list name-label= "Local Storage 2"


UUID (RO): bebbe4f1-a492-c434-ea7f-1f7cc679070c


Name-label (RW): Local Storage 2


Name-description (RW):


Host (RO): Xenserver-ds-monitor02


Type (RO): LVM


Content-type (RO): User








[Root@xenserver-ds-monitor02 ~]#

" IMG src= "yun_qi_img/image57af256c9189e2.31976365.jpg" alt= "Linux xenserver new Local storage example-xenserver local storage" >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.