Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device size not recognized correctly on dm-linear devices #2

Open
hayley-leblanc opened this issue Jan 26, 2024 · 0 comments
Open

Device size not recognized correctly on dm-linear devices #2

hayley-leblanc opened this issue Jan 26, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@hayley-leblanc
Copy link
Collaborator

Use dm-linear to map two 1 GB PM devices:

$ echo -e "0 `sudo blockdev --getsz /dev/pmem0` linear /dev/pmem0 0 "\\n"`sudo blockdev --getsz /dev/pmem0` `sudo blockdev --getsz /dev/pmem1` linear /dev/pmem1 0" | sudo dmsetup create linear-pmem
$ lsblk /dev/pmem*
NAME          MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
pmem0         259:0    0   1G  0 disk 
└─linear-pmem 252:0    0   2G  0 dm   
pmem1         259:1    0   1G  0 disk 
└─linear-pmem 252:0    0   2G  0 dm 
$ sudo mount -t hayleyfs -o init /dev/mapper/linear-pmem /mnt/pmem/
$ df -h
Filesystem               Size  Used Avail Use% Mounted on
tmpfs                    2.2G  1.2M  2.2G   1% /run
/dev/sda3                 98G   47G   46G  51% /
tmpfs                     11G     0   11G   0% /dev/shm
tmpfs                    5.0M     0  5.0M   0% /run/lock
/dev/sda2                512M  5.3M  507M   2% /boot/efi
tmpfs                    2.2G   84K  2.2G   1% /run/user/1000
/dev/mapper/linear-pmem  1.0G     0  1.0G   0% /mnt/pmem

The size on the last line should be 2G. ext4-DAX handles this correctly.

@vijay03 vijay03 added the help wanted Extra attention is needed label Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants