According to https://xfs.org/index.php/Shrinking_Support :
"Currently XFS Filesystems can't be shrunk."
You need backup the data and recreate the file system to shrink it.
But if you have a big xfs filesystem with not too much space used, For example, a 2T xfs volume with 100G data.
And you can take some risk to lose data.
Here is a way to shrink it without using new space.
The idea is:
1.temporary reduce the logic volume size, you can still read from xfs filesystem even after the partition or volume is shrunk if the real data is not wrote at the shrunk part
2.create a new volume
3.copy data
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--/* | |
* http://learnbasic.id1945.com/ | |
* http://lholhox.wordpress.com/ | |
* Use is subject to license terms. | |
*/ | |
/** | |
* | |
* @Raden Mas Lholhox | |
* --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Refactor of absolute path check from Express | |
module.exports = function (path){ | |
var pathIsAbsolute = false, | |
firstCharIsSlash = path[0] === '/', | |
containsWinChars = path[1] === ':' && path[2] === '\\'; | |
if(firstCharIsSlash || containsWinChars) { | |
pathIsAbsolute = true; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jshint strict:false */ | |
'use strict'; | |
// Create a new angular module. | |
var MessageCenterModule = angular.module('MessageCenterModule', []); | |
// Define a service to inject. | |
MessageCenterModule | |
.provider("$messageCenterService", function() { | |
var _this = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
//Normal way - won't work if function is extracted to a module | |
app.use(function(req, res, next) { | |
'use strict'; | |
app.locals.greeting = 'hello'; | |
next(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Assuming you're already in an angular controller... | |
$scope.user = {}; | |
//$scope.user will get filled with "email" and "password" keys | |
var enteredUsername = angular.copy($scope.username); | |
$scope.register = function() { | |
var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com"); | |
var user = angular.copy($scope.user); | |
ref.createUser({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.editor { font-family: 'Roboto Mono', monospace; font-size: 12px; outline: none; overflow-y: auto; padding-left: 48px; counter-reset: line; } | |
.editor div { display: block; position: relative; white-space: pre-wrap; } | |
.editor div::before { content: counter(line); counter-increment: line; position: absolute; right: calc(100% + 16px); opacity: 0.5; } | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check if the user is ready to play! | |
confirm("Are you ready to play!"); | |
var age= prompt("What is your age?"); | |
if (age< 13) | |
{ | |
//do this code// | |
confirm("ask your parent if you can play."); | |
} | |
else | |
//"otherwise"// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//NON ES6 way | |
function actionWord () { | |
//Put your action here | |
} | |
//for example | |
//CREATE the function | |
function drive () { | |
console.log('I am driving now') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr = []; | |
var obj = {}; | |
var fun = function () {}; | |
var shoppingList = [ | |
'cheese', | |
'milk', | |
'bacon' | |
]; |
NewerOlder