SSD with 8K blocksize on Linux











up vote
1
down vote

favorite












I have a SSD drive that uses 8K block size. On x86_64 Linux, ext4/xfs won't support blocksize larger than Linux PAGE_SIZE, which is 4K.



I have tried using LVM and mdadm RAID0 with stripping set to 8K hoping that the drive will be sent 8K sizeed IO requests, but unfortunately all IO requests are 4K only.



How can I can setup the drive in such a way that the file system is 4K based (to keep ext4/xfs happy) but the requests sent to the drive are 8K?



Or is there some code that I can write to make this happen? Perhaps play around with /dev/mapper? I'm open to ideas and suggestions.



The SSD drive I'm using is an eval unit that has not been released yet. Works under Windows, being tested on Linux.



TIA










share|improve this question
























  • Add the make/model of SSD to your question.
    – LawrenceC
    Nov 21 at 16:47










  • You can't format comments. You can edit your question (preferred over comments; comments may not stick around), and format properly in the question.
    – dirkt
    Nov 22 at 7:04















up vote
1
down vote

favorite












I have a SSD drive that uses 8K block size. On x86_64 Linux, ext4/xfs won't support blocksize larger than Linux PAGE_SIZE, which is 4K.



I have tried using LVM and mdadm RAID0 with stripping set to 8K hoping that the drive will be sent 8K sizeed IO requests, but unfortunately all IO requests are 4K only.



How can I can setup the drive in such a way that the file system is 4K based (to keep ext4/xfs happy) but the requests sent to the drive are 8K?



Or is there some code that I can write to make this happen? Perhaps play around with /dev/mapper? I'm open to ideas and suggestions.



The SSD drive I'm using is an eval unit that has not been released yet. Works under Windows, being tested on Linux.



TIA










share|improve this question
























  • Add the make/model of SSD to your question.
    – LawrenceC
    Nov 21 at 16:47










  • You can't format comments. You can edit your question (preferred over comments; comments may not stick around), and format properly in the question.
    – dirkt
    Nov 22 at 7:04













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have a SSD drive that uses 8K block size. On x86_64 Linux, ext4/xfs won't support blocksize larger than Linux PAGE_SIZE, which is 4K.



I have tried using LVM and mdadm RAID0 with stripping set to 8K hoping that the drive will be sent 8K sizeed IO requests, but unfortunately all IO requests are 4K only.



How can I can setup the drive in such a way that the file system is 4K based (to keep ext4/xfs happy) but the requests sent to the drive are 8K?



Or is there some code that I can write to make this happen? Perhaps play around with /dev/mapper? I'm open to ideas and suggestions.



The SSD drive I'm using is an eval unit that has not been released yet. Works under Windows, being tested on Linux.



TIA










share|improve this question















I have a SSD drive that uses 8K block size. On x86_64 Linux, ext4/xfs won't support blocksize larger than Linux PAGE_SIZE, which is 4K.



I have tried using LVM and mdadm RAID0 with stripping set to 8K hoping that the drive will be sent 8K sizeed IO requests, but unfortunately all IO requests are 4K only.



How can I can setup the drive in such a way that the file system is 4K based (to keep ext4/xfs happy) but the requests sent to the drive are 8K?



Or is there some code that I can write to make this happen? Perhaps play around with /dev/mapper? I'm open to ideas and suggestions.



The SSD drive I'm using is an eval unit that has not been released yet. Works under Windows, being tested on Linux.



TIA







linux






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 17:07

























asked Nov 21 at 16:40









Mia Dawson

62




62












  • Add the make/model of SSD to your question.
    – LawrenceC
    Nov 21 at 16:47










  • You can't format comments. You can edit your question (preferred over comments; comments may not stick around), and format properly in the question.
    – dirkt
    Nov 22 at 7:04


















  • Add the make/model of SSD to your question.
    – LawrenceC
    Nov 21 at 16:47










  • You can't format comments. You can edit your question (preferred over comments; comments may not stick around), and format properly in the question.
    – dirkt
    Nov 22 at 7:04
















Add the make/model of SSD to your question.
– LawrenceC
Nov 21 at 16:47




Add the make/model of SSD to your question.
– LawrenceC
Nov 21 at 16:47












You can't format comments. You can edit your question (preferred over comments; comments may not stick around), and format properly in the question.
– dirkt
Nov 22 at 7:04




You can't format comments. You can edit your question (preferred over comments; comments may not stick around), and format properly in the question.
– dirkt
Nov 22 at 7:04










1 Answer
1






active

oldest

votes

















up vote
2
down vote













You can achieve this by using LVM anda stripe width. Rather than try to explain it in my own words, there's a very good write up on the problem similar to yours, how to partition the disk, format it with the correct stripe, etc.



https://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/



Would be interesting to see benchmarks before and after using this method.






share|improve this answer





















  • Thank you. After reading the article I ran the following commands but I still get only 4K accesses to the SSD device. 1. fdisk -H 224 -S 56 /dev/nvme0n1 2. pvcreate /dev/nvme0n1p1 3. vgcreate --metadatasize 250k nvmedisk /dev/nvme0n1p1 4. lvcreate -l 100%FREE --name n1 nvmedisk 5. mkfs.ext4 -E nodiscard,stripe-width=32 /dev/nvmedisk/n1 I also tried the above commands using stripe-width=2
    – Mia Dawson
    Nov 21 at 23:56










  • sorry, I was unable to format my comment. I tried using two spaces at the end of each line and also 4 spaces before each line but neither of them managed to format my reply
    – Mia Dawson
    Nov 22 at 0:01












  • Welcome to Super User. When all of the meat of an answer is in an external link, the answer can become useless if the link breaks. Even while the link is good, readers need to go somewhere else for the solution. With a little more rep, you will be able to post a helpful link in a comment. For an answer post, please include the essential information within the answer, and use the link for attribution and further reading. Thanks.
    – fixer1234
    Nov 25 at 2:13











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377347%2fssd-with-8k-blocksize-on-linux%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













You can achieve this by using LVM anda stripe width. Rather than try to explain it in my own words, there's a very good write up on the problem similar to yours, how to partition the disk, format it with the correct stripe, etc.



https://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/



Would be interesting to see benchmarks before and after using this method.






share|improve this answer





















  • Thank you. After reading the article I ran the following commands but I still get only 4K accesses to the SSD device. 1. fdisk -H 224 -S 56 /dev/nvme0n1 2. pvcreate /dev/nvme0n1p1 3. vgcreate --metadatasize 250k nvmedisk /dev/nvme0n1p1 4. lvcreate -l 100%FREE --name n1 nvmedisk 5. mkfs.ext4 -E nodiscard,stripe-width=32 /dev/nvmedisk/n1 I also tried the above commands using stripe-width=2
    – Mia Dawson
    Nov 21 at 23:56










  • sorry, I was unable to format my comment. I tried using two spaces at the end of each line and also 4 spaces before each line but neither of them managed to format my reply
    – Mia Dawson
    Nov 22 at 0:01












  • Welcome to Super User. When all of the meat of an answer is in an external link, the answer can become useless if the link breaks. Even while the link is good, readers need to go somewhere else for the solution. With a little more rep, you will be able to post a helpful link in a comment. For an answer post, please include the essential information within the answer, and use the link for attribution and further reading. Thanks.
    – fixer1234
    Nov 25 at 2:13















up vote
2
down vote













You can achieve this by using LVM anda stripe width. Rather than try to explain it in my own words, there's a very good write up on the problem similar to yours, how to partition the disk, format it with the correct stripe, etc.



https://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/



Would be interesting to see benchmarks before and after using this method.






share|improve this answer





















  • Thank you. After reading the article I ran the following commands but I still get only 4K accesses to the SSD device. 1. fdisk -H 224 -S 56 /dev/nvme0n1 2. pvcreate /dev/nvme0n1p1 3. vgcreate --metadatasize 250k nvmedisk /dev/nvme0n1p1 4. lvcreate -l 100%FREE --name n1 nvmedisk 5. mkfs.ext4 -E nodiscard,stripe-width=32 /dev/nvmedisk/n1 I also tried the above commands using stripe-width=2
    – Mia Dawson
    Nov 21 at 23:56










  • sorry, I was unable to format my comment. I tried using two spaces at the end of each line and also 4 spaces before each line but neither of them managed to format my reply
    – Mia Dawson
    Nov 22 at 0:01












  • Welcome to Super User. When all of the meat of an answer is in an external link, the answer can become useless if the link breaks. Even while the link is good, readers need to go somewhere else for the solution. With a little more rep, you will be able to post a helpful link in a comment. For an answer post, please include the essential information within the answer, and use the link for attribution and further reading. Thanks.
    – fixer1234
    Nov 25 at 2:13













up vote
2
down vote










up vote
2
down vote









You can achieve this by using LVM anda stripe width. Rather than try to explain it in my own words, there's a very good write up on the problem similar to yours, how to partition the disk, format it with the correct stripe, etc.



https://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/



Would be interesting to see benchmarks before and after using this method.






share|improve this answer












You can achieve this by using LVM anda stripe width. Rather than try to explain it in my own words, there's a very good write up on the problem similar to yours, how to partition the disk, format it with the correct stripe, etc.



https://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/



Would be interesting to see benchmarks before and after using this method.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 21 at 17:58









nelgin

312




312












  • Thank you. After reading the article I ran the following commands but I still get only 4K accesses to the SSD device. 1. fdisk -H 224 -S 56 /dev/nvme0n1 2. pvcreate /dev/nvme0n1p1 3. vgcreate --metadatasize 250k nvmedisk /dev/nvme0n1p1 4. lvcreate -l 100%FREE --name n1 nvmedisk 5. mkfs.ext4 -E nodiscard,stripe-width=32 /dev/nvmedisk/n1 I also tried the above commands using stripe-width=2
    – Mia Dawson
    Nov 21 at 23:56










  • sorry, I was unable to format my comment. I tried using two spaces at the end of each line and also 4 spaces before each line but neither of them managed to format my reply
    – Mia Dawson
    Nov 22 at 0:01












  • Welcome to Super User. When all of the meat of an answer is in an external link, the answer can become useless if the link breaks. Even while the link is good, readers need to go somewhere else for the solution. With a little more rep, you will be able to post a helpful link in a comment. For an answer post, please include the essential information within the answer, and use the link for attribution and further reading. Thanks.
    – fixer1234
    Nov 25 at 2:13


















  • Thank you. After reading the article I ran the following commands but I still get only 4K accesses to the SSD device. 1. fdisk -H 224 -S 56 /dev/nvme0n1 2. pvcreate /dev/nvme0n1p1 3. vgcreate --metadatasize 250k nvmedisk /dev/nvme0n1p1 4. lvcreate -l 100%FREE --name n1 nvmedisk 5. mkfs.ext4 -E nodiscard,stripe-width=32 /dev/nvmedisk/n1 I also tried the above commands using stripe-width=2
    – Mia Dawson
    Nov 21 at 23:56










  • sorry, I was unable to format my comment. I tried using two spaces at the end of each line and also 4 spaces before each line but neither of them managed to format my reply
    – Mia Dawson
    Nov 22 at 0:01












  • Welcome to Super User. When all of the meat of an answer is in an external link, the answer can become useless if the link breaks. Even while the link is good, readers need to go somewhere else for the solution. With a little more rep, you will be able to post a helpful link in a comment. For an answer post, please include the essential information within the answer, and use the link for attribution and further reading. Thanks.
    – fixer1234
    Nov 25 at 2:13
















Thank you. After reading the article I ran the following commands but I still get only 4K accesses to the SSD device. 1. fdisk -H 224 -S 56 /dev/nvme0n1 2. pvcreate /dev/nvme0n1p1 3. vgcreate --metadatasize 250k nvmedisk /dev/nvme0n1p1 4. lvcreate -l 100%FREE --name n1 nvmedisk 5. mkfs.ext4 -E nodiscard,stripe-width=32 /dev/nvmedisk/n1 I also tried the above commands using stripe-width=2
– Mia Dawson
Nov 21 at 23:56




Thank you. After reading the article I ran the following commands but I still get only 4K accesses to the SSD device. 1. fdisk -H 224 -S 56 /dev/nvme0n1 2. pvcreate /dev/nvme0n1p1 3. vgcreate --metadatasize 250k nvmedisk /dev/nvme0n1p1 4. lvcreate -l 100%FREE --name n1 nvmedisk 5. mkfs.ext4 -E nodiscard,stripe-width=32 /dev/nvmedisk/n1 I also tried the above commands using stripe-width=2
– Mia Dawson
Nov 21 at 23:56












sorry, I was unable to format my comment. I tried using two spaces at the end of each line and also 4 spaces before each line but neither of them managed to format my reply
– Mia Dawson
Nov 22 at 0:01






sorry, I was unable to format my comment. I tried using two spaces at the end of each line and also 4 spaces before each line but neither of them managed to format my reply
– Mia Dawson
Nov 22 at 0:01














Welcome to Super User. When all of the meat of an answer is in an external link, the answer can become useless if the link breaks. Even while the link is good, readers need to go somewhere else for the solution. With a little more rep, you will be able to post a helpful link in a comment. For an answer post, please include the essential information within the answer, and use the link for attribution and further reading. Thanks.
– fixer1234
Nov 25 at 2:13




Welcome to Super User. When all of the meat of an answer is in an external link, the answer can become useless if the link breaks. Even while the link is good, readers need to go somewhere else for the solution. With a little more rep, you will be able to post a helpful link in a comment. For an answer post, please include the essential information within the answer, and use the link for attribution and further reading. Thanks.
– fixer1234
Nov 25 at 2:13


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377347%2fssd-with-8k-blocksize-on-linux%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Актюбинская область

QoS: MAC-Priority for clients behind a repeater

AnyDesk - Fatal Program Failure