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
linux
add a comment |
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
linux
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 a comment |
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
linux
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
linux
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 a comment |
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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