You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
added diswk label
This commit is contained in:
@@ -6149,7 +6149,14 @@ namespace oam
|
|||||||
}
|
}
|
||||||
|
|
||||||
//get device name based on dbroot ID
|
//get device name based on dbroot ID
|
||||||
string deviceName = getAWSdeviceName( *pt1 );
|
storageID_t st;
|
||||||
|
try {
|
||||||
|
st = getAWSdeviceName( *pt1 );
|
||||||
|
}
|
||||||
|
catch(...) {}
|
||||||
|
|
||||||
|
string deviceName = boost::get<0>(st);
|
||||||
|
string labelName = boost::get<1>(st);
|
||||||
|
|
||||||
//attach volumes to local instance
|
//attach volumes to local instance
|
||||||
retry = 0;
|
retry = 0;
|
||||||
@@ -6170,7 +6177,10 @@ namespace oam
|
|||||||
|
|
||||||
//format attached volume
|
//format attached volume
|
||||||
cout << " Formatting DBRoot #" << itoa(*pt1) << ", please wait..." << endl;
|
cout << " Formatting DBRoot #" << itoa(*pt1) << ", please wait..." << endl;
|
||||||
string cmd = "mkfs.ext2 -F " + deviceName + " > /dev/null 2>&1";
|
string cmd = "mkfs.ext2 -F " + deviceName + " " + "-L " + labelName + " > /tmp/format.log 2>&1";
|
||||||
|
|
||||||
|
writeLog("addDbroot format cmd: " + cmd, LOG_TYPE_DEBUG );
|
||||||
|
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
//detach
|
//detach
|
||||||
@@ -6182,13 +6192,13 @@ namespace oam
|
|||||||
//write volume and device name
|
//write volume and device name
|
||||||
try {
|
try {
|
||||||
sysConfig->setConfig(Section, volumeNameID, volumeName);
|
sysConfig->setConfig(Section, volumeNameID, volumeName);
|
||||||
sysConfig->setConfig(Section, deviceNameID, deviceName);
|
sysConfig->setConfig(Section, deviceNameID, labelName);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//update /etc/fstab with mount
|
//update /etc/fstab with mount
|
||||||
string entry = deviceName + " " + InstallDir + "/data" + itoa(*pt1) + " ext2 noatime,nodiratime,noauto 0 0";
|
string entry = labelName + " " + InstallDir + "/data" + itoa(*pt1) + " ext2 noatime,nodiratime,noauto 0 0";
|
||||||
|
|
||||||
//use from addmodule later
|
//use from addmodule later
|
||||||
cmd = "echo " + entry + " >> " + InstallDir + "/local/etc/pm1/fstab";
|
cmd = "echo " + entry + " >> " + InstallDir + "/local/etc/pm1/fstab";
|
||||||
@@ -6895,13 +6905,13 @@ namespace oam
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
std::string Oam::getAWSdeviceName( const int dbrootid)
|
storageID_t Oam::getAWSdeviceName( const int dbrootid)
|
||||||
{
|
{
|
||||||
//calulate id numbers from DBRoot ID
|
//calulate id numbers from DBRoot ID
|
||||||
int lid = (dbrootid-1) / 10;
|
int lid = (dbrootid-1) / 10;
|
||||||
int did = dbrootid - (dbrootid * lid);
|
int did = dbrootid - (dbrootid * lid);
|
||||||
|
|
||||||
return PMdeviceName + deviceLetter[lid] + itoa(did);
|
return boost::make_tuple(PMdeviceName + deviceLetter[lid] + itoa(did), "LABEL=DBROOT" + itoa(dbrootid));
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
@@ -1077,6 +1077,15 @@ namespace oam
|
|||||||
|
|
||||||
typedef boost::tuple<uint16_t, std::string, uint16_t> myProcessStatus_t;
|
typedef boost::tuple<uint16_t, std::string, uint16_t> myProcessStatus_t;
|
||||||
|
|
||||||
|
/** @brief Store Device ID Structure
|
||||||
|
*
|
||||||
|
* Structure that is returned by the getMyProcessStatus API for the
|
||||||
|
* Local Process OAM Status data stored in the Process Status file
|
||||||
|
* Returns: Process ID, Process Name, and Process State
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef boost::tuple<std::string, std::string> storageID_t;
|
||||||
|
|
||||||
/** @brief User Configuration Structure
|
/** @brief User Configuration Structure
|
||||||
*
|
*
|
||||||
* Structure that is returned by the getHardwareUserConfig API for the
|
* Structure that is returned by the getHardwareUserConfig API for the
|
||||||
@@ -2279,7 +2288,7 @@ namespace oam
|
|||||||
/**
|
/**
|
||||||
*@brief get AWS Device Name for DBRoot ID
|
*@brief get AWS Device Name for DBRoot ID
|
||||||
*/
|
*/
|
||||||
EXPORT std::string getAWSdeviceName( const int dbrootid);
|
EXPORT storageID_t getAWSdeviceName( const int dbrootid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@brief set System DBRoot Count
|
*@brief set System DBRoot Count
|
||||||
|
Reference in New Issue
Block a user