How to get major/minor numbers for raw devices
#!/usr/bin/env perl while () { /^s*#/ and next; /(S+)s+(d+)s+(d+)/ and do { ($rawname, $major, $minor) = ($1, $2, $3); $syspath = qx!find /sys/block -name dev | xargs grep -l “^$major:$minor$” !;
#!/usr/bin/env perl while () { /^s*#/ and next; /(S+)s+(d+)s+(d+)/ and do { ($rawname, $major, $minor) = ($1, $2, $3); $syspath = qx!find /sys/block -name dev | xargs grep -l “^$major:$minor$” !;